C-Munipack 1.2 / Application programming interface / API reference

Functions for the making master-dark correction frame.

cmpack_mdark.h

Type definitions

CmpackMasterDarkConfiguration context for the Master-dark tool.

Functions

cmpack_mdark_initMake new context for the Master-dark tool.
cmpack_mdark_set_consoleAttach console to the context.
cmpack_mdark_set_bitpixSet output data format.
cmpack_mdark_get_bitpixGet output data format.
cmpack_mdark_set_scalableSet output data format.
cmpack_mdark_get_scalableGet output data format.
cmpack_mdark_set_borderSet image border size.
cmpack_mdark_get_borderGet image flip flags.
cmpack_mdark_openOpen output file.
cmpack_mdark_readAdd a frame to the accumulation buffer.
cmpack_mdark_closeMake master-dark frame and save it to the file.

Description

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

CmpackMasterDark (data type)

Configuration context for the Master-dark tool.

Synopsis

typedef struct _CmpackMasterDark CmpackMasterDark

Description

This private data structure holds the configuration parameters for the master-dark tool

cmpack_mdark_init (function)

Make new context for the Master-dark tool.

Synopsis

CmpackMasterDark * cmpack_mdark_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 new master-dark context or zero on failure

cmpack_mdark_set_console (function)

Attach console to the context.

Synopsis

void cmpack_mdark_set_console (CmpackMasterDark * 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-dark context
con[in] console context

cmpack_mdark_set_bitpix (function)

Set output data format.

Synopsis

int cmpack_mdark_set_bitpix (CmpackMasterDark * ctx, CmpackBitpix bitpix)

Parameters

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

Return value

zero on success or error code on failure

cmpack_mdark_get_bitpix (function)

Get output data format.

Synopsis

int cmpack_mdark_get_bitpix (CmpackMasterDark * ctx, CmpackBitpix * bitpix)

Parameters

ctx[in] master-dark context
bitpix[out] output data format

Return value

zero on success or error code on failure

cmpack_mdark_set_scalable (function)

Set output data format.

Synopsis

int cmpack_mdark_set_scalable (CmpackMasterDark * ctx, int scalable)

Parameters

ctx[in] master-dark context
scalable[in] 1 = make scalable dark frame

Return value

zero on success or error code on failure

cmpack_mdark_get_scalable (function)

Get output data format.

Synopsis

int cmpack_mdark_get_scalable (CmpackMasterDark * ctx, int * scalable)

Parameters

ctx[in] master-dark context
scalable[out] 1 = make scalable dark frame

Return value

zero on success or error code on failure

cmpack_mdark_set_border (function)

Set image border size.

Synopsis

void cmpack_mdark_set_border (CmpackMasterDark * 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-dark context
border[in] border size in pixels

cmpack_mdark_get_border (function)

Get image flip flags.

Synopsis

void cmpack_mdark_get_border (CmpackMasterDark * ctx, CmpackBorder * border)

Parameters

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

cmpack_mdark_open (function)

Open output file.

Synopsis

int cmpack_mdark_open (CmpackMasterDark * ctx, CmpackCcdFile * outfile)

Description

Opens new master-dark frame. The caller is responsible to close the file by calling the cmpack_mdark_close() function.

Parameters

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

Return value

zero on success or error code on failure.

cmpack_mdark_read (function)

Add a frame to the accumulation buffer.

Synopsis

int cmpack_mdark_read (CmpackMasterDark * ctx, CmpackCcdFile * infile)

Description

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

Parameters

ctx[in] output file context
infile[in] input file context

Return value

zero on success or error code on failure.

cmpack_mdark_close (function)

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

Synopsis

int cmpack_mdark_close (CmpackMasterDark * 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] output file context

Return value

zero on success or error code on failure.