C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackMasterFlat | Master-flat output frame context. |
cmpack_mflat_init | Make new context for the Master-flat tool. |
cmpack_mflat_set_console | Attach console to the context. |
cmpack_mflat_set_bitpix | Set output data format. |
cmpack_mflat_get_bitpix | Get output data format. |
cmpack_mflat_set_level | Set average output level. |
cmpack_mflat_get_level | Get average output level. |
cmpack_mflat_set_border | Set image border size. |
cmpack_mflat_get_border | Get image flip flags. |
cmpack_mflat_open | Open output file. |
cmpack_mflat_read | Add a frame to the accumulation buffer. |
cmpack_mflat_close | Make master-flat frame and save it to the file. |
Set of functions defined in this module allows user to make a master-flat frame from a set of CCD frames.
Master-flat output frame context.
typedef struct _CmpackMasterFlat CmpackMasterFlat
This private data structure holds information needed to build one master-flat frame.
Make new context for the Master-flat tool.
CmpackMasterFlat * cmpack_mflat_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-flat context or zero on failure
Attach console to the context.
void cmpack_mflat_set_console (CmpackMasterFlat * 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-flat context |
con | [in] | console context |
Set output data format.
void cmpack_mflat_set_bitpix (CmpackMasterFlat * ctx, CmpackBitpix bitpix)
ctx | [in] | master-flat context |
bitpix | [in] | output data format |
Get output data format.
CmpackBitpix cmpack_mflat_get_bitpix (CmpackMasterFlat * ctx)
ctx | [in] | master-flat context |
output data format
Set average output level.
void cmpack_mflat_set_level (CmpackMasterFlat * ctx, double level)
ctx | [in] | master-flat context |
level | [in] | mean level in ADU |
Get average output level.
double cmpack_mflat_get_level (CmpackMasterFlat * ctx)
ctx | [in] | master-flat context |
mean level in ADU
Set image border size.
void cmpack_mflat_set_border (CmpackMasterFlat * 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-flat context |
border | [in] | border size in pixels |
Get image flip flags.
void cmpack_mflat_get_border (CmpackMasterFlat * ctx, CmpackBorder * border)
ctx | [in] | master-flat context |
border | [out] | border size in pixels |
Open output file.
int cmpack_mflat_open (CmpackMasterFlat * ctx, CmpackCcdFile * outfile)
Opens new master-flat frame. The caller is responsible to close the file by calling the cmpack_mflat_close() function.
ctx | [in] | master-flat context |
outfile | [in] | output file context |
zero on success or error code on failure.
Add a frame to the accumulation buffer.
int cmpack_mflat_read (CmpackMasterFlat * ctx, CmpackCcdFile * infile)
The function reads the frame from specified CCD-frame file into memory.
ctx | [in] | master-flat context |
infile | [in] | input file context |
zero on success or error code on failure.
Make master-flat frame and save it to the file.
int cmpack_mflat_close (CmpackMasterFlat * ctx)
The function computes the output CCD data, writes it to the file, closes the output file and frees allocated data.
ctx | [in] | master-flat context |
zero on success or error code on failure.