C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackMasterDark | Configuration context for the Master-dark tool. |
cmpack_mdark_init | Make new context for the Master-dark tool. |
cmpack_mdark_set_console | Attach console to the context. |
cmpack_mdark_set_bitpix | Set output data format. |
cmpack_mdark_get_bitpix | Get output data format. |
cmpack_mdark_set_scalable | Set output data format. |
cmpack_mdark_get_scalable | Get output data format. |
cmpack_mdark_set_border | Set image border size. |
cmpack_mdark_get_border | Get image flip flags. |
cmpack_mdark_open | Open output file. |
cmpack_mdark_read | Add a frame to the accumulation buffer. |
cmpack_mdark_close | Make master-dark frame and save it to the file. |
Set of functions defined in this module allows user to make a master-dark frame from a set of CCD frames.
Configuration context for the Master-dark tool.
typedef struct _CmpackMasterDark CmpackMasterDark
This private data structure holds the configuration parameters for the master-dark tool
Make new context for the Master-dark tool.
CmpackMasterDark * cmpack_mdark_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 new master-dark context or zero on failure
Attach console to the context.
void cmpack_mdark_set_console (CmpackMasterDark * 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-dark context |
con | [in] | console context |
Set output data format.
int cmpack_mdark_set_bitpix (CmpackMasterDark * ctx, CmpackBitpix bitpix)
ctx | [in] | master-dark context |
bitpix | [in] | output data format |
zero on success or error code on failure
Get output data format.
int cmpack_mdark_get_bitpix (CmpackMasterDark * ctx, CmpackBitpix * bitpix)
ctx | [in] | master-dark context |
bitpix | [out] | output data format |
zero on success or error code on failure
Set output data format.
int cmpack_mdark_set_scalable (CmpackMasterDark * ctx, int scalable)
ctx | [in] | master-dark context |
scalable | [in] | 1 = make scalable dark frame |
zero on success or error code on failure
Get output data format.
int cmpack_mdark_get_scalable (CmpackMasterDark * ctx, int * scalable)
ctx | [in] | master-dark context |
scalable | [out] | 1 = make scalable dark frame |
zero on success or error code on failure
Set image border size.
void cmpack_mdark_set_border (CmpackMasterDark * 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-dark context |
border | [in] | border size in pixels |
Get image flip flags.
void cmpack_mdark_get_border (CmpackMasterDark * ctx, CmpackBorder * border)
ctx | [in] | master-dark context |
border | [out] | border size in pixels |
Open output file.
int cmpack_mdark_open (CmpackMasterDark * ctx, CmpackCcdFile * outfile)
Opens new master-dark frame. The caller is responsible to close the file by calling the cmpack_mdark_close() function.
ctx | [in] | master-dark context |
outfile | [in] | output file context |
zero on success or error code on failure.
Add a frame to the accumulation buffer.
int cmpack_mdark_read (CmpackMasterDark * ctx, CmpackCcdFile * infile)
The function reads the frame from specified CCD-frame file into memory.
ctx | [in] | output file context |
infile | [in] | input file context |
zero on success or error code on failure.
Make master-dark frame and save it to the file.
int cmpack_mdark_close (CmpackMasterDark * ctx)
The function computes the output CCD data, writes it to the file, closes the output file and frees allocated data.
ctx | [in] | output file context |
zero on success or error code on failure.