C-Munipack 1.2 / Application programming interface / API reference

Functions for the merging (combining) CCD frames.

cmpack_kombine.h

Type definitions

CmpackKombineOutput frame context for kombine tool.

Functions

cmpack_kombine_initMake new kombine context.
cmpack_kombine_set_consoleAttach console to the context.
cmpack_kombine_set_bitpixSet output data format.
cmpack_kombine_get_bitpixGet output data format.
cmpack_kombine_set_borderSet image border size.
cmpack_kombine_get_borderGet image flip flags.
cmpack_kombine_openOpen output file.
cmpack_kombine_readAdd a frame to the accumulation buffer.
cmpack_kombine_closeMake combined CCD frame and writes it to the file.

Description

Set of functions defined in this module allows user to merge (combine) a set of CCD frames.

CmpackKombine (data type)

Output frame context for kombine tool.

Synopsis

typedef struct _CmpackKombine CmpackKombine

Description

This private data structure holds the accumulated data for single output frame.

cmpack_kombine_init (function)

Make new kombine context.

Synopsis

CmpackKombine * cmpack_kombine_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 kombine context or zero on failure

cmpack_kombine_set_console (function)

Attach console to the context.

Synopsis

void cmpack_kombine_set_console (CmpackKombine * 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] kombine context
con[in] console context

cmpack_kombine_set_bitpix (function)

Set output data format.

Synopsis

void cmpack_kombine_set_bitpix (CmpackKombine * ctx, CmpackBitpix bitpix)

Parameters

ctx[in] output file context
bitpix[in] output data format

Return value

zero on success or error code on failure

cmpack_kombine_get_bitpix (function)

Get output data format.

Synopsis

CmpackBitpix cmpack_kombine_get_bitpix (CmpackKombine * ctx)

Parameters

ctx[in] output file context

Return value

output data format

cmpack_kombine_set_border (function)

Set image border size.

Synopsis

void cmpack_kombine_set_border (CmpackKombine * 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] conversion context
border[in] border size in pixels

cmpack_kombine_get_border (function)

Get image flip flags.

Synopsis

void cmpack_kombine_get_border (CmpackKombine * ctx, CmpackBorder * border)

Parameters

ctx[in] conversion context
border[out] border size in pixels

cmpack_kombine_open (function)

Open output file.

Synopsis

int cmpack_kombine_open (CmpackKombine * ctx, CmpackCcdFile * outfile)

Description

Opens new combined frame. Close the file by calling the cmpack_kombine_close() function.

Parameters

ctx[in] kombine context
outfile[in] output file context

Return value

zero on success or error code on failure.

cmpack_kombine_read (function)

Add a frame to the accumulation buffer.

Synopsis

int cmpack_kombine_read (CmpackKombine * ctx, CmpackCcdFile * ccdfile, CmpackPhtFile * phtfile)

Description

The function reads the frame from specified CCD-frame file. It reads also the position offset from specified photometry file. Then shifts the frame by the offset and adds it to the accumulation buffer.

Parameters

ctx[in] kombine context
ccdfile[in] CCD frame file
phtfile[in] photometry file

Return value

zero on success or error code on failure.

cmpack_kombine_close (function)

Make combined CCD frame and writes it to the file.

Synopsis

int cmpack_kombine_close (CmpackKombine * ctx)

Description

The function computes the output CCD data, writes it to the file, closes the output frame.

Parameters

ctx[in] kombine context

Return value

zero on success or error code on failure.