C-Munipack 1.2 / Application programming interface / API reference

Functions for the heliocentric correction.

cmpack_hcorr.h

Enumerations

CmpackHCorrFlagsCorrection flags.

Type definitions

CmpackHelCorrHeliocentric correction context.

Functions

cmpack_hcorr_initMake new heliocentric correction context.
cmpack_hcorr_set_consoleAttach console to the context.
cmpack_hcorr_set_raSet object's right ascension.
cmpack_hcorr_get_raGet object's right ascension.
cmpack_hcorr_set_decSet object's declination.
cmpack_hcorr_get_decGet object's declination.
cmpack_hcorrMake heliocentric correction of data stored in a table.
cmpack_hcorr_jdCompute heliocentric correction for single julian date.

Description

Set of functions defined in this module allows user to apply heliocentric correction to light-curve data files.

CmpackHelCorr (data type)

Heliocentric correction context.

Synopsis

typedef struct _CmpackHelCorr CmpackHelCorr

Description

This private data structure holds the parameter for heliocentric correction.

CmpackHCorrFlags (enumeration)

Correction flags.

Synopsis

enum CmpackHCorrFlags
{
     CMPACK_HCORR_DEFAULT = 0,
     CMPACK_HCORR_REVERSE = (1<<0),
     CMPACK_HCORR_ADDVALUE = (1<<1),
     CMPACK_HCORR_NOMODIFY = (1<<2)
};

Enumerators

CMPACK_HCORR_DEFAULTDefault behavior.
CMPACK_HCORR_REVERSEJD is heliocentric, compute geocentric JD.
CMPACK_HCORR_ADDVALUEAdd value of hel.
CMPACK_HCORR_NOMODIFYDo not modify values of JD.

cmpack_hcorr_init (function)

Make new heliocentric correction context.

Synopsis

CmpackHelCorr * cmpack_hcorr_init (void)

Description

The reference counter is set to one. The caller is responsible to call cmpack_unref() when it is no longer needed.

Return value

pointer to context or zero on failure

cmpack_hcorr_set_console (function)

Attach console to the context.

Synopsis

void cmpack_hcorr_set_console (CmpackHelCorr * ctx, CmpackConsole * con)

Description

Increment console's reference counter. Only one console can be attached to a single context. If another console is attached, by calling this function dettaches it. Set console to NULL to dettach the current console.

Parameters

ctx[in] air-mass computation context
con[in] console context

cmpack_hcorr_set_ra (function)

Set object's right ascension.

Synopsis

void cmpack_hcorr_set_ra (CmpackHelCorr * ctx, double ra)

Parameters

ctx[in] heliocentric correction context
ra[in] right ascension in hours

cmpack_hcorr_get_ra (function)

Get object's right ascension.

Synopsis

int cmpack_hcorr_get_ra (CmpackHelCorr * ctx, double * ra)

Parameters

ctx[in] heliocentric correction context
ra[out] right ascension in hours

Return value

zero on success or error code on failure

cmpack_hcorr_set_dec (function)

Set object's declination.

Synopsis

void cmpack_hcorr_set_dec (CmpackHelCorr * ctx, double dec)

Parameters

ctx[in] heliocentric correction context
dec[in] declination in degrees

cmpack_hcorr_get_dec (function)

Get object's declination.

Synopsis

int cmpack_hcorr_get_dec (CmpackHelCorr * ctx, double * dec)

Parameters

ctx[in] heliocentric correction context
dec[out] declination in degrees

Return value

zero on success or error code on failure

cmpack_hcorr (function)

Make heliocentric correction of data stored in a table.

Synopsis

int cmpack_hcorr (CmpackHelCorr * ctx, CmpackTable * table, int column, CmpackHCorrFlags flags)

Parameters

ctx[in] correction context
table[in] table
column[in] column containing values of JD
flags[in] see CMPACK_HCORR_xxx constants

Return value

zero on success or error code on failure.

cmpack_hcorr_jd (function)

Compute heliocentric correction for single julian date.

Synopsis

int cmpack_hcorr_jd (CmpackHelCorr * ctx, double jd, double * helcor)

Parameters

ctx[in] heliocentric correction context
jd[in] julian date of observation
helcor[out] heliocentric correction in days

Return value

zero on success or error code on failure