C-Munipack 1.2 / Application programming interface / API reference

Functions for the bias-frame correction.

cmpack_bias.h

Type definitions

CmpackBiasCorrBias-frame correction context.

Functions

cmpack_bias_initMake new bias-frame correction context.
cmpack_bias_set_consoleAttach console to the context.
cmpack_bias_set_borderSet image border size.
cmpack_bias_get_borderGet image flip flags.
cmpack_bias_rbiasSet correction frame.
cmpack_biasExecute bias-frame correction.
cmpack_bias_exExecute bias-frame correction.

Description

Set of functions defined in this module allows user to apply bias-frame correction to CCD frames.

CmpackBiasCorr (data type)

Bias-frame correction context.

Synopsis

typedef struct _CmpackBiasCorr CmpackBiasCorr

Description

This private data structure holds the parameter for bias-frame correction as well as the bias frame itself.

cmpack_bias_init (function)

Make new bias-frame correction context.

Synopsis

CmpackBiasCorr * cmpack_bias_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 bias correction context context or zero on failure

cmpack_bias_set_console (function)

Attach console to the context.

Synopsis

void cmpack_bias_set_console (CmpackBiasCorr * 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] bias correction context
con[in] console context

cmpack_bias_set_border (function)

Set image border size.

Synopsis

void cmpack_bias_set_border (CmpackBiasCorr * ctx, const CmpackBorder * border)

Description

If you set the border to nonzero size, the conversion function will set the pixels which belongs to the border area to zero. You can use this feature to clear an unusable part of a frame.

Parameters

ctx[in] bias correction context
border[in] border size in pixels

cmpack_bias_get_border (function)

Get image flip flags.

Synopsis

void cmpack_bias_get_border (CmpackBiasCorr * ctx, CmpackBorder * border)

Parameters

ctx[in] bias correction context
border[out] border size in pixels

cmpack_bias_rbias (function)

Set correction frame.

Synopsis

int cmpack_bias_rbias (CmpackBiasCorr * ctx, CmpackCcdFile * biasfile)

Description

The function reads the correction frame from the given frame context. The internal copy of the image data is made, no reference to the frame is held, so you can free it when this function has returned.

Parameters

ctx[in] bias correction context
biasfile[in] bias frame context

Return value

zero on success or error code on failure

cmpack_bias (function)

Execute bias-frame correction.

Synopsis

int cmpack_bias (CmpackBiasCorr * ctx, CmpackCcdFile * file)

Description

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

Parameters

ctx[in] bias correction context
file[inout] CCD frame context

Return value

zero on success or error code on failure

cmpack_bias_ex (function)

Execute bias-frame correction.

Synopsis

int cmpack_bias_ex (CmpackBiasCorr * ctx, CmpackCcdFile * infile, CmpackCcdFile * outfile)

Description

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

Parameters

ctx[in] bias-frame correction context
infile[in] input frame context
outfile[in] output frame context

Return value

zero on success or error code on failure