C-Munipack 1.2 / Application programming interface / API reference
C-Munipack 1.2 / Application programming interface / API reference
CmpackMatch | Matching configuration context. |
cmpack_match_init | Make new matching context. |
cmpack_match_set_console | Attach console to the context. |
cmpack_match_set_maxstars | Set max. |
cmpack_match_get_maxstars | Get max. |
cmpack_match_set_vertices | Set number of vertices of polygons. |
cmpack_match_get_vertices | Get number of vertices of polygons. |
cmpack_match_set_threshold | Set clipping threshold. |
cmpack_match_get_threshold | Get clipping threshold. |
cmpack_match_set_method | Set matching method. |
cmpack_match_get_method | Get matching method. |
cmpack_match_set_maxoffset | Set Max. |
cmpack_match_get_maxoffset | Get Max. |
cmpack_match_readref_pht | Load reference frame from the photometry file. |
cmpack_match_readref_cat | Load reference frame from the catalogue file. |
cmpack_match | Match photometry file to the reference file. |
cmpack_match_ex | Match photometry file to the reference file. |
Set of functions defined in this module allows user to find matching files, i.e. to find crossreferences in two sets of stars by their positions.
Matching configuration context.
typedef struct _CmpackMatch CmpackMatch
This private data structure holds the configuration parameters for CCD-frame conversion.
Make new matching context.
CmpackMatch * cmpack_match_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_match_set_console (CmpackMatch * 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 max.
void cmpack_match_set_maxstars (CmpackMatch * ctx, int nstars)
number of stars used for matching
ctx | [in] | matching context |
nstars | [in] | number of stars |
Get max.
int cmpack_match_get_maxstars (CmpackMatch * ctx)
number of stars used for matching
ctx | [in] | matching context |
number of stars
Set number of vertices of polygons.
void cmpack_match_set_vertices (CmpackMatch * ctx, int vertices)
ctx | [in] | matching context |
vertices | [in] | number of vertices |
Get number of vertices of polygons.
int cmpack_match_get_vertices (CmpackMatch * ctx)
ctx | [in] | matching context |
number of vertices
Set clipping threshold.
void cmpack_match_set_threshold (CmpackMatch * ctx, double threshold)
ctx | [in] | matching context |
threshold | [in] | threshold |
Get clipping threshold.
double cmpack_match_get_threshold (CmpackMatch * ctx)
ctx | [in] | matching context |
current clipping threshold
Set matching method.
void cmpack_match_set_method (CmpackMatch * ctx, int method)
ctx | [in] | matching context |
method | [in] | (0=Standard, 1=Auto, 2=Sparse_fields) |
Get matching method.
int cmpack_match_get_method (CmpackMatch * ctx)
ctx | [in] | matching context |
(0=Standard, 1=Auto, 2=Sparse_fields)
Set Max.
void cmpack_match_set_maxoffset (CmpackMatch * ctx, double maxoffset)
offset for 'sparse fields' method
ctx | [in] | matching context |
maxoffset | [in] | offset in pixels |
Get Max.
double cmpack_match_get_maxoffset (CmpackMatch * ctx)
offset for 'sparse fields' method
ctx | [in] | matching context |
offset in pixels
Load reference frame from the photometry file.
int cmpack_match_readref_pht (CmpackMatch * ctx, CmpackPhtFile * reffile)
The function reads photometry file into the context.
ctx | [in] | matching context |
reffile | [in] | reference file context |
zero on success or error code on failure
Load reference frame from the catalogue file.
int cmpack_match_readref_cat (CmpackMatch * ctx, CmpackCatFile * reffile)
The function reads catalogue file into the context.
ctx | [in] | matching context |
reffile | [in] | reference file context |
zero on success or error code on failure
Match photometry file to the reference file.
int cmpack_match (CmpackMatch * ctx, CmpackPhtFile * file, int * mstars)
The function reads the intput file, finds crossreferences to the reference frame and set the reference IDs.
ctx | [in] | matching context |
file | [in] | photometry file context |
mstars | [out] | number of stars matched |
zero on success or error code on failure
Match photometry file to the reference file.
int cmpack_match_ex (CmpackMatch * ctx, CmpackPhtFile * infile, CmpackPhtFile * outfile, int * mstars)
The function reads input file, finds crossreferences to the reference or catalogue file stored in the context and writes the output to another file.
ctx | [in] | matching context |
infile | [in] | input file context |
outfile | [in] | output file context |
mstars | [out] | number of stars matched |
zero on success or error code on failure