C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackPhot | Configuration context for the Photometry tool. |
cmpack_phot_init | Make new photometry configuration context. |
cmpack_phot_set_console | Attach console to the context. |
cmpack_phot_set_rnoise | Set readout noise level. |
cmpack_phot_get_rnoise | Get readout noise level. |
cmpack_phot_set_adcgain | Set ADC gain. |
cmpack_phot_get_adcgain | Get ADC gain. |
cmpack_phot_set_minval | Set threshold for bad pixels. |
cmpack_phot_get_minval | Get threshold for bad pixels. |
cmpack_phot_set_maxval | Set threshold for overexposed pixels. |
cmpack_phot_get_maxval | Get threshold for overexposed pixels. |
cmpack_phot_set_fwhm | Set expected value of FWHM of objects. |
cmpack_phot_get_fwhm | Get expected value of FWHM of objects. |
cmpack_phot_set_thresh | Set detection threshold. |
cmpack_phot_get_thresh | Get detection threshold. |
cmpack_phot_set_minshrp | Set min. |
cmpack_phot_get_minshrp | Get min. |
cmpack_phot_set_maxshrp | Set max. |
cmpack_phot_get_maxshrp | Get max. |
cmpack_phot_set_minrnd | Set min. |
cmpack_phot_get_minrnd | Get min. |
cmpack_phot_set_maxrnd | Set max. |
cmpack_phot_get_maxrnd | Get max. |
cmpack_phot_set_border | Set image border size. |
cmpack_phot_get_border | Get image flip flags. |
cmpack_phot_set_skyin | Set inner radius of the sky annulus. |
cmpack_phot_get_skyin | Get inner radius of the sky annulus. |
cmpack_phot_set_skyout | Set outer radius of the sky annulus. |
cmpack_phot_get_skyout | Get outer radius of the sky annulus. |
cmpack_phot_set_aper | Set apertures. |
cmpack_phot_get_aper | Get apertures. |
cmpack_phot | Make photometry file from a calibrated CCD frame. |
Set of functions defined in this module allows user to make a photometry file from a CCD frame.
Configuration context for the Photometry tool.
typedef struct _CmpackPhot CmpackPhot
This private data structure holds the configuration parameters for the photometry.
Make new photometry configuration context.
CmpackPhot * cmpack_phot_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 context or zero on failure
Attach console to the context.
void cmpack_phot_set_console (CmpackPhot * 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] | air-mass computation context |
con | [in] | console context |
Set readout noise level.
void cmpack_phot_set_rnoise (CmpackPhot * file, double rnoise)
file | [in] | output file context |
rnoise | [in] | readout noise |
Get readout noise level.
double cmpack_phot_get_rnoise (CmpackPhot * file)
file | [in] | output file context |
current value of readout noise level
Set ADC gain.
void cmpack_phot_set_adcgain (CmpackPhot * file, double adcgain)
file | [in] | output file context |
adcgain | [in] | ADC gain |
zero on success or error code on failure
Get ADC gain.
double cmpack_phot_get_adcgain (CmpackPhot * file)
file | [in] | output file context |
current ADC gain
Set threshold for bad pixels.
void cmpack_phot_set_minval (CmpackPhot * file, double minval)
file | [in] | output file context |
minval | [in] | minimal valid value in ADU |
zero on success or error code on failure
Get threshold for bad pixels.
double cmpack_phot_get_minval (CmpackPhot * file)
file | [in] | output file context |
minimal valid value in ADU
Set threshold for overexposed pixels.
void cmpack_phot_set_maxval (CmpackPhot * file, double maxval)
file | [in] | output file context |
maxval | [in] | maximal valid value in ADU + 1 |
zero on success or error code on failure
Get threshold for overexposed pixels.
double cmpack_phot_get_maxval (CmpackPhot * file)
file | [in] | output file context |
current value of threshold for overexposed pixels
Set expected value of FWHM of objects.
void cmpack_phot_set_fwhm (CmpackPhot * file, double fwhm)
file | [in] | output file context |
fwhm | [in] | FWHM in pixels |
Get expected value of FWHM of objects.
double cmpack_phot_get_fwhm (CmpackPhot * file)
file | [in] | output file context |
FWHM in pixels
Set detection threshold.
void cmpack_phot_set_thresh (CmpackPhot * file, double thresh)
file | [in] | output file context |
thresh | [in] | threshold |
Get detection threshold.
double cmpack_phot_get_thresh (CmpackPhot * file)
file | [in] | output file context |
threshold
Set min.
void cmpack_phot_set_minshrp (CmpackPhot * file, double minshrp)
sharpness threshold
file | [in] | output file context |
minshrp | [in] | threshold |
zero on success or error code on failure
Get min.
double cmpack_phot_get_minshrp (CmpackPhot * file)
sharpness threshold
file | [in] | output file context |
current value of min. sharpness threshold
Set max.
void cmpack_phot_set_maxshrp (CmpackPhot * file, double maxshrp)
sharpness threshold
file | [in] | output file context |
maxshrp | [in] | threshold |
zero on success or error code on failure
Get max.
double cmpack_phot_get_maxshrp (CmpackPhot * file)
sharpness threshold
file | [in] | output file context |
current value of max. sharpness threshold
Set min.
void cmpack_phot_set_minrnd (CmpackPhot * file, double minrnd)
roundness threshold
file | [in] | output file context |
minrnd | [in] | threshold |
zero on success or error code on failure
Get min.
double cmpack_phot_get_minrnd (CmpackPhot * file)
roundness threshold
file | [in] | output file context |
current value of min. roundness threshold
Set max.
void cmpack_phot_set_maxrnd (CmpackPhot * file, double maxrnd)
roundness threshold
file | [in] | output file context |
maxrnd | [in] | threshold |
zero on success or error code on failure
Get max.
double cmpack_phot_get_maxrnd (CmpackPhot * file)
roundness threshold
file | [in] | output file context |
current value of max. roundness threshold
Set image border size.
void cmpack_phot_set_border (CmpackPhot * file, 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.
file | [in] | conversion context |
border | [in] | border size in pixels |
Get image flip flags.
void cmpack_phot_get_border (CmpackPhot * file, CmpackBorder * border)
file | [in] | conversion context |
border | [out] | border size in pixels |
Set inner radius of the sky annulus.
void cmpack_phot_set_skyin (CmpackPhot * file, double skyin)
file | [in] | output file context |
skyin | [in] | radius in pixels |
zero on success or error code on failure
Get inner radius of the sky annulus.
double cmpack_phot_get_skyin (CmpackPhot * file)
file | [in] | output file context |
current value of inner radius of the sky annulus
Set outer radius of the sky annulus.
void cmpack_phot_set_skyout (CmpackPhot * file, double skyout)
file | [in] | output file context |
skyout | [in] | radius in pixels |
zero on success or error code on failure
Get outer radius of the sky annulus.
double cmpack_phot_get_skyout (CmpackPhot * file)
file | [in] | output file context |
current value of outer radius of the sky annulus
Set apertures.
void cmpack_phot_set_aper (CmpackPhot * file, const double * items, int nitems)
file | [in] | output file context |
items | [in] | table of aperture radii |
nitems | [in] | number of apertures |
zero on success or error code on failure
Get apertures.
void cmpack_phot_get_aper (CmpackPhot * file, double ** items, int * nitems)
The function makes copy of the data and returns the pointer to it. The caller is reponsible to free the memory by means of the cmpack_free() method.
file | [in] | output file context |
items | [out] | table of aperture radii |
nitems | [out] | number of apertures |
zero on success or error code on failure
Make photometry file from a calibrated CCD frame.
int cmpack_phot (CmpackPhot * ctx, CmpackCcdFile * infile, CmpackPhtFile * outfile, int * nstars)
The function reads input frame, finds stars and determine their brightness. The result is stored in the photometry file.
ctx | [in] | photometry configuration context |
infile | [in] | input file context |
outfile | [in] | output file context |
nstars | [out] | number of stars detected |
zero on success or error code on failure