C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackHCorrFlags | Correction flags. |
CmpackHelCorr | Heliocentric correction context. |
cmpack_hcorr_init | Make new heliocentric correction context. |
cmpack_hcorr_set_console | Attach console to the context. |
cmpack_hcorr_set_ra | Set object's right ascension. |
cmpack_hcorr_get_ra | Get object's right ascension. |
cmpack_hcorr_set_dec | Set object's declination. |
cmpack_hcorr_get_dec | Get object's declination. |
cmpack_hcorr | Make heliocentric correction of data stored in a table. |
cmpack_hcorr_jd | Compute heliocentric correction for single julian date. |
Set of functions defined in this module allows user to apply heliocentric correction to light-curve data files.
Heliocentric correction context.
typedef struct _CmpackHelCorr CmpackHelCorr
This private data structure holds the parameter for heliocentric correction.
Correction flags.
enum CmpackHCorrFlags
{
CMPACK_HCORR_DEFAULT = 0,
CMPACK_HCORR_REVERSE = (1<<0),
CMPACK_HCORR_ADDVALUE = (1<<1),
CMPACK_HCORR_NOMODIFY = (1<<2)
};
CMPACK_HCORR_DEFAULT | Default behavior. |
CMPACK_HCORR_REVERSE | JD is heliocentric, compute geocentric JD. |
CMPACK_HCORR_ADDVALUE | Add value of hel. |
CMPACK_HCORR_NOMODIFY | Do not modify values of JD. |
Make new heliocentric correction context.
CmpackHelCorr * cmpack_hcorr_init (void)
The reference counter is set to one. The caller is responsible to call cmpack_unref() when it is no longer needed.
pointer to context or zero on failure
Attach console to the context.
void cmpack_hcorr_set_console (CmpackHelCorr * ctx, CmpackConsole * con)
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.
ctx | [in] | air-mass computation context |
con | [in] | console context |
Set object's right ascension.
void cmpack_hcorr_set_ra (CmpackHelCorr * ctx, double ra)
ctx | [in] | heliocentric correction context |
ra | [in] | right ascension in hours |
Get object's right ascension.
int cmpack_hcorr_get_ra (CmpackHelCorr * ctx, double * ra)
ctx | [in] | heliocentric correction context |
ra | [out] | right ascension in hours |
zero on success or error code on failure
Set object's declination.
void cmpack_hcorr_set_dec (CmpackHelCorr * ctx, double dec)
ctx | [in] | heliocentric correction context |
dec | [in] | declination in degrees |
Get object's declination.
int cmpack_hcorr_get_dec (CmpackHelCorr * ctx, double * dec)
ctx | [in] | heliocentric correction context |
dec | [out] | declination in degrees |
zero on success or error code on failure
Make heliocentric correction of data stored in a table.
int cmpack_hcorr (CmpackHelCorr * ctx, CmpackTable * table, int column, CmpackHCorrFlags flags)
ctx | [in] | correction context |
table | [in] | table |
column | [in] | column containing values of JD |
flags | [in] | see CMPACK_HCORR_xxx constants |
zero on success or error code on failure.
Compute heliocentric correction for single julian date.
int cmpack_hcorr_jd (CmpackHelCorr * ctx, double jd, double * helcor)
ctx | [in] | heliocentric correction context |
jd | [in] | julian date of observation |
helcor | [out] | heliocentric correction in days |
zero on success or error code on failure