C-Munipack 1.2 / Application programming interface / API reference

Functions for converting CCD frames from vendor specific format to the FITS format.

cmpack_konve.h

Type definitions

CmpackKonvConversion context.

Functions

cmpack_konv_initMake new conversion context.
cmpack_konv_set_consoleAttach console to the context.
cmpack_konv_set_bitpixSet output data format.
cmpack_konv_get_bitpixGet output data format.
cmpack_konv_set_trafoSet image flip flags.
cmpack_konv_get_trafoGet image flip flags.
cmpack_konv_set_borderSet image border size.
cmpack_konv_get_borderGet image flip flags.
cmpack_konvConvert a specified file to FITS format.

Description

Set of functions defined in this module allows user to convert the CCD frames to FITS format.

CmpackKonv (data type)

Conversion context.

Synopsis

typedef struct _CmpackKonv CmpackKonv

Description

This private data structure holds the configuration parameters for CCD-frame conversion.

cmpack_konv_init (function)

Make new conversion context.

Synopsis

CmpackKonv * cmpack_konv_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 context or zero on failure

cmpack_konv_set_console (function)

Attach console to the context.

Synopsis

void cmpack_konv_set_console (CmpackKonv * 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] conversion context
con[in] console context

cmpack_konv_set_bitpix (function)

Set output data format.

Synopsis

void cmpack_konv_set_bitpix (CmpackKonv * file, CmpackBitpix bitpix)

Parameters

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

cmpack_konv_get_bitpix (function)

Get output data format.

Synopsis

CmpackBitpix cmpack_konv_get_bitpix (CmpackKonv * file)

Parameters

file[in] conversion context

Return value

output data format

cmpack_konv_set_trafo (function)

Set image flip flags.

Synopsis

void cmpack_konv_set_trafo (CmpackKonv * file, int bitmask)

Parameters

file[in] conversion context
bitmask[in] bitmask of image trasformation flags

cmpack_konv_get_trafo (function)

Get image flip flags.

Synopsis

int cmpack_konv_get_trafo (CmpackKonv * file)

Parameters

file[in] conversion context

Return value

bitmask of image transformation flags

cmpack_konv_set_border (function)

Set image border size.

Synopsis

void cmpack_konv_set_border (CmpackKonv * file, 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

file[in] conversion context
border[in] border size in pixels

cmpack_konv_get_border (function)

Get image flip flags.

Synopsis

void cmpack_konv_get_border (CmpackKonv * file, CmpackBorder * border)

Parameters

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

cmpack_konv (function)

Convert a specified file to FITS format.

Synopsis

int cmpack_konv (CmpackKonv * lc, CmpackCcdFile * infile, CmpackCcdFile * outfile)

Description

This function detects the format of specified source file, read its header and image data and writes it to the output file.

Parameters

lc[in] conversion context
infile[in] source file context
outfile[in] output file context

Return value

zero on success or error code on failure