C-Munipack 1.2 / Application programming interface / API reference

Functions for the time correction.

cmpack_tcorr.h

Type definitions

CmpackTimeCorrBias-frame correction context.

Functions

cmpack_tcorr_initMake new time correction context.
cmpack_tcorr_set_consoleAttach console to the context.
cmpack_tcorr_set_corrSet time correction.
cmpack_tcorr_get_corrGet time correction.
cmpack_tcorrExecute time correction on a file.
cmpack_tcorr_exExecute time correction on a file.

Description

Set of functions defined in this module allows user to apply time correction to CCD frames.

CmpackTimeCorr (data type)

Bias-frame correction context.

Synopsis

typedef struct _CmpackTimeCorr CmpackTimeCorr

Description

This private data structure holds the parameter for time correction as well as the time itself.

cmpack_tcorr_init (function)

Make new time correction context.

Synopsis

CmpackTimeCorr * cmpack_tcorr_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 the new time correction context or zero on failure

cmpack_tcorr_set_console (function)

Attach console to the context.

Synopsis

void cmpack_tcorr_set_console (CmpackTimeCorr * 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] time correction context
con[in] console context

cmpack_tcorr_set_corr (function)

Set time correction.

Synopsis

void cmpack_tcorr_set_corr (CmpackTimeCorr * ctx, double corr)

Parameters

ctx[in] time correction context
corr[in] correction in seconds

cmpack_tcorr_get_corr (function)

Get time correction.

Synopsis

double cmpack_tcorr_get_corr (CmpackTimeCorr * ctx)

Parameters

ctx[in] time correction context

Return value

current value of time correction in seconds

cmpack_tcorr (function)

Execute time correction on a file.

Synopsis

int cmpack_tcorr (CmpackTimeCorr * ctx, CmpackCcdFile * file)

Description

The function reads header data from the file context, performs the time correction and stores the output to the same context.

Parameters

ctx[in] time correction context
file[inout] frame context

Return value

zero on success or error code on failure

cmpack_tcorr_ex (function)

Execute time correction on a file.

Synopsis

int cmpack_tcorr_ex (CmpackTimeCorr * ctx, CmpackCcdFile * infile, CmpackCcdFile * outfile)

Description

The function reads header data from the infile context, performs the time correction and stores the output image to the outfile context.

Parameters

ctx[in] time correction context
infile[in] input frame context
outfile[in] output frame context

Return value

zero on success or error code on failure