C-Munipack 1.2 / Application programming interface / API reference

Functions for the making master-bias correction frame.

cmpack_mbias.h

Type definitions

CmpackMasterBiasConfiguration context for the Master-bias tool.

Functions

cmpack_mbias_initMake new context for the Master-bias tool.
cmpack_mbias_set_consoleAttach console to the context.
cmpack_mbias_set_bitpixSet output data format.
cmpack_mbias_get_bitpixGet output data format.
cmpack_mbias_set_borderSet image border size.
cmpack_mbias_get_borderGet image flip flags.
cmpack_mbias_openOpen output file.
cmpack_mbias_readAdd a frame to the accumulation buffer.
cmpack_mbias_closeMake master-bias frame and save it to the file.

Description

Set of functions defined in this module allows user to make a master-bias frame from a set of CCD frames.

CmpackMasterBias (data type)

Configuration context for the Master-bias tool.

Synopsis

typedef struct _CmpackMasterBias CmpackMasterBias

Description

This private data structure holds the configuration parameter for the master-bias tool.

cmpack_mbias_init (function)

Make new context for the Master-bias tool.

Synopsis

CmpackMasterBias * cmpack_mbias_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 master-bias context or zero on failure

cmpack_mbias_set_console (function)

Attach console to the context.

Synopsis

void cmpack_mbias_set_console (CmpackMasterBias * 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] master-bias context
con[in] console context

cmpack_mbias_set_bitpix (function)

Set output data format.

Synopsis

void cmpack_mbias_set_bitpix (CmpackMasterBias * ctx, CmpackBitpix bitpix)

Parameters

ctx[in] master-bias context
bitpix[in] output data format

cmpack_mbias_get_bitpix (function)

Get output data format.

Synopsis

CmpackBitpix cmpack_mbias_get_bitpix (CmpackMasterBias * ctx)

Parameters

ctx[in] master-bias context

Return value

output data format

cmpack_mbias_set_border (function)

Set image border size.

Synopsis

void cmpack_mbias_set_border (CmpackMasterBias * 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] master-bias context
border[in] border size in pixels

cmpack_mbias_get_border (function)

Get image flip flags.

Synopsis

void cmpack_mbias_get_border (CmpackMasterBias * ctx, CmpackBorder * border)

Parameters

ctx[in] master-bias context
border[out] border size in pixels

cmpack_mbias_open (function)

Open output file.

Synopsis

int cmpack_mbias_open (CmpackMasterBias * ctx, CmpackCcdFile * outfile)

Description

Opens new master-bias frame and returns its context structure. The caller is responsible to close the file and free the allocated memory by calling the cmpack_mbias_close() function.

Parameters

ctx[in] master-bias context
outfile[in] output file context

Return value

zero on success or error code on failure.

cmpack_mbias_read (function)

Add a frame to the accumulation buffer.

Synopsis

int cmpack_mbias_read (CmpackMasterBias * ctx, CmpackCcdFile * infile)

Description

The function reads the frame from specified CCD-frame file into memory.

Parameters

ctx[in] master-bias context
infile[in] input file context

Return value

zero on success or error code on failure.

cmpack_mbias_close (function)

Make master-bias frame and save it to the file.

Synopsis

int cmpack_mbias_close (CmpackMasterBias * ctx)

Description

The function computes the output CCD data, writes it to the file, closes the output file and frees allocated data.

Parameters

ctx[in] master-bias context

Return value

zero on success or error code on failure.