C-Munipack 1.2 / Application programming interface / API reference

Functions for matching photometry files.

cmpack_match.h

Type definitions

CmpackMatchMatching configuration context.

Functions

cmpack_match_initMake new matching context.
cmpack_match_set_consoleAttach console to the context.
cmpack_match_set_maxstarsSet max.
cmpack_match_get_maxstarsGet max.
cmpack_match_set_verticesSet number of vertices of polygons.
cmpack_match_get_verticesGet number of vertices of polygons.
cmpack_match_set_thresholdSet clipping threshold.
cmpack_match_get_thresholdGet clipping threshold.
cmpack_match_set_methodSet matching method.
cmpack_match_get_methodGet matching method.
cmpack_match_set_maxoffsetSet Max.
cmpack_match_get_maxoffsetGet Max.
cmpack_match_readref_phtLoad reference frame from the photometry file.
cmpack_match_readref_catLoad reference frame from the catalogue file.
cmpack_matchMatch photometry file to the reference file.
cmpack_match_exMatch photometry file to the reference file.

Description

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.

CmpackMatch (data type)

Matching configuration context.

Synopsis

typedef struct _CmpackMatch CmpackMatch

Description

This private data structure holds the configuration parameters for CCD-frame conversion.

cmpack_match_init (function)

Make new matching context.

Synopsis

CmpackMatch * cmpack_match_init (void)

Description

The reference counter is set to one. The caller is responsible to call cmpack_unref() when it is no longer needed.

Return value

pointer to context or zero on failure

cmpack_match_set_console (function)

Attach console to the context.

Synopsis

void cmpack_match_set_console (CmpackMatch * ctx, CmpackConsole * con)

Description

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.

Parameters

ctx[in] air-mass computation context
con[in] console context

cmpack_match_set_maxstars (function)

Set max.

Synopsis

void cmpack_match_set_maxstars (CmpackMatch * ctx, int nstars)

Description

number of stars used for matching

Parameters

ctx[in] matching context
nstars[in] number of stars

cmpack_match_get_maxstars (function)

Get max.

Synopsis

int cmpack_match_get_maxstars (CmpackMatch * ctx)

Description

number of stars used for matching

Parameters

ctx[in] matching context

Return value

number of stars

cmpack_match_set_vertices (function)

Set number of vertices of polygons.

Synopsis

void cmpack_match_set_vertices (CmpackMatch * ctx, int vertices)

Parameters

ctx[in] matching context
vertices[in] number of vertices

cmpack_match_get_vertices (function)

Get number of vertices of polygons.

Synopsis

int cmpack_match_get_vertices (CmpackMatch * ctx)

Parameters

ctx[in] matching context

Return value

number of vertices

cmpack_match_set_threshold (function)

Set clipping threshold.

Synopsis

void cmpack_match_set_threshold (CmpackMatch * ctx, double threshold)

Parameters

ctx[in] matching context
threshold[in] threshold

cmpack_match_get_threshold (function)

Get clipping threshold.

Synopsis

double cmpack_match_get_threshold (CmpackMatch * ctx)

Parameters

ctx[in] matching context

Return value

current clipping threshold

cmpack_match_set_method (function)

Set matching method.

Synopsis

void cmpack_match_set_method (CmpackMatch * ctx, int method)

Parameters

ctx[in] matching context
method[in] (0=Standard, 1=Auto, 2=Sparse_fields)

cmpack_match_get_method (function)

Get matching method.

Synopsis

int cmpack_match_get_method (CmpackMatch * ctx)

Parameters

ctx[in] matching context

Return value

(0=Standard, 1=Auto, 2=Sparse_fields)

cmpack_match_set_maxoffset (function)

Set Max.

Synopsis

void cmpack_match_set_maxoffset (CmpackMatch * ctx, double maxoffset)

Description

offset for 'sparse fields' method

Parameters

ctx[in] matching context
maxoffset[in] offset in pixels

cmpack_match_get_maxoffset (function)

Get Max.

Synopsis

double cmpack_match_get_maxoffset (CmpackMatch * ctx)

Description

offset for 'sparse fields' method

Parameters

ctx[in] matching context

Return value

offset in pixels

cmpack_match_readref_pht (function)

Load reference frame from the photometry file.

Synopsis

int cmpack_match_readref_pht (CmpackMatch * ctx, CmpackPhtFile * reffile)

Description

The function reads photometry file into the context.

Parameters

ctx[in] matching context
reffile[in] reference file context

Return value

zero on success or error code on failure

cmpack_match_readref_cat (function)

Load reference frame from the catalogue file.

Synopsis

int cmpack_match_readref_cat (CmpackMatch * ctx, CmpackCatFile * reffile)

Description

The function reads catalogue file into the context.

Parameters

ctx[in] matching context
reffile[in] reference file context

Return value

zero on success or error code on failure

cmpack_match (function)

Match photometry file to the reference file.

Synopsis

int cmpack_match (CmpackMatch * ctx, CmpackPhtFile * file, int * mstars)

Description

The function reads the intput file, finds crossreferences to the reference frame and set the reference IDs.

Parameters

ctx[in] matching context
file[in] photometry file context
mstars[out] number of stars matched

Return value

zero on success or error code on failure

cmpack_match_ex (function)

Match photometry file to the reference file.

Synopsis

int cmpack_match_ex (CmpackMatch * ctx, CmpackPhtFile * infile, CmpackPhtFile * outfile, int * mstars)

Description

The function reads input file, finds crossreferences to the reference or catalogue file stored in the context and writes the output to another file.

Parameters

ctx[in] matching context
infile[in] input file context
outfile[in] output file context
mstars[out] number of stars matched

Return value

zero on success or error code on failure