C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackMasterBias | Configuration context for the Master-bias tool. |
cmpack_mbias_init | Make new context for the Master-bias tool. |
cmpack_mbias_set_console | Attach console to the context. |
cmpack_mbias_set_bitpix | Set output data format. |
cmpack_mbias_get_bitpix | Get output data format. |
cmpack_mbias_set_border | Set image border size. |
cmpack_mbias_get_border | Get image flip flags. |
cmpack_mbias_open | Open output file. |
cmpack_mbias_read | Add a frame to the accumulation buffer. |
cmpack_mbias_close | Make master-bias frame and save it to the file. |
Set of functions defined in this module allows user to make a master-bias frame from a set of CCD frames.
Configuration context for the Master-bias tool.
typedef struct _CmpackMasterBias CmpackMasterBias
This private data structure holds the configuration parameter for the master-bias tool.
Make new context for the Master-bias tool.
CmpackMasterBias * cmpack_mbias_init (void)
The reference counter is set to one. The caller is responsible to call cmpack_unref() when it is no longer needed.
pointer to the new master-bias context or zero on failure
Attach console to the context.
void cmpack_mbias_set_console (CmpackMasterBias * ctx, CmpackConsole * con)
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.
ctx | [in] | master-bias context |
con | [in] | console context |
Set output data format.
void cmpack_mbias_set_bitpix (CmpackMasterBias * ctx, CmpackBitpix bitpix)
ctx | [in] | master-bias context |
bitpix | [in] | output data format |
Get output data format.
CmpackBitpix cmpack_mbias_get_bitpix (CmpackMasterBias * ctx)
ctx | [in] | master-bias context |
output data format
Set image border size.
void cmpack_mbias_set_border (CmpackMasterBias * ctx, const CmpackBorder * border)
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.
ctx | [in] | master-bias context |
border | [in] | border size in pixels |
Get image flip flags.
void cmpack_mbias_get_border (CmpackMasterBias * ctx, CmpackBorder * border)
ctx | [in] | master-bias context |
border | [out] | border size in pixels |
Open output file.
int cmpack_mbias_open (CmpackMasterBias * ctx, CmpackCcdFile * outfile)
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.
ctx | [in] | master-bias context |
outfile | [in] | output file context |
zero on success or error code on failure.
Add a frame to the accumulation buffer.
int cmpack_mbias_read (CmpackMasterBias * ctx, CmpackCcdFile * infile)
The function reads the frame from specified CCD-frame file into memory.
ctx | [in] | master-bias context |
infile | [in] | input file context |
zero on success or error code on failure.
Make master-bias frame and save it to the file.
int cmpack_mbias_close (CmpackMasterBias * ctx)
The function computes the output CCD data, writes it to the file, closes the output file and frees allocated data.
ctx | [in] | master-bias context |
zero on success or error code on failure.