C-Munipack 1.2 / Application programming interface / API reference

Functions for the flat-frame correction.

cmpack_flat.h

Type definitions

CmpackFlatCorrFlat-frame correction context.

Functions

cmpack_flat_initMake new flat-frame correction context.
cmpack_flat_set_consoleAttach console to the context.
cmpack_flat_set_borderSet image border size.
cmpack_flat_get_borderGet image flip flags.
cmpack_flat_rflatLoad flat-frame from a file.
cmpack_flatExecute flat-frame correction.
cmpack_flat_exExecute flat-frame correction.

Description

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

CmpackFlatCorr (data type)

Flat-frame correction context.

Synopsis

typedef struct _CmpackFlatCorr CmpackFlatCorr

Description

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

cmpack_flat_init (function)

Make new flat-frame correction context.

Synopsis

CmpackFlatCorr * cmpack_flat_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 flat frame context or zero on failure

cmpack_flat_set_console (function)

Attach console to the context.

Synopsis

void cmpack_flat_set_console (CmpackFlatCorr * 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] flat correction context
con[in] console context

cmpack_flat_set_border (function)

Set image border size.

Synopsis

void cmpack_flat_set_border (CmpackFlatCorr * 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] flat correction context
border[in] border size in pixels

cmpack_flat_get_border (function)

Get image flip flags.

Synopsis

void cmpack_flat_get_border (CmpackFlatCorr * ctx, CmpackBorder * border)

Parameters

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

cmpack_flat_rflat (function)

Load flat-frame from a file.

Synopsis

int cmpack_flat_rflat (CmpackFlatCorr * ctx, CmpackCcdFile * flatfile)

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] flat correction context
flatfile[in] bias frame context

Return value

zero on success or error code on failure

cmpack_flat (function)

Execute flat-frame correction.

Synopsis

int cmpack_flat (CmpackFlatCorr * ctx, CmpackCcdFile * file)

Description

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

Parameters

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

Return value

zero on success or error code on failure

cmpack_flat_ex (function)

Execute flat-frame correction.

Synopsis

int cmpack_flat_ex (CmpackFlatCorr * ctx, CmpackCcdFile * infile, CmpackCcdFile * outfile)

Description

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

Parameters

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

Return value

zero on success or error code on failure