C-Munipack 1.2 / Application programming interface / API reference

Functions for making output data files.

cmpack_list.h

Enumerations

CmpackListFormatOutput format identifiers.

Type definitions

CmpackListerListing process context.

Functions

cmpack_list_initMake new listing context.
cmpack_list_set_consoleAttach console to the context.
cmpack_list_set_apertureSet aperture index.
cmpack_list_get_apertureGet aperture index.
cmpack_list_set_varSet list of variable stars.
cmpack_list_set_compSet list of comparison stars.
cmpack_list_set_checkSet list of check stars.
cmpack_list_openStart listing to a table.
cmpack_list_readRead single frame from a photometry file and process it.
cmpack_list_closeFlush all data, close reading sequence.

Description

Set of functions defined in this module allows user to read a set of information from photometry files and make output file (a light curve, a track list, ...)

CmpackLister (data type)

Listing process context.

Synopsis

typedef struct _CmpackLister CmpackLister

Description

This private data structure holds the temporary data, which are used during listing process.

CmpackListFormat (enumeration)

Output format identifiers.

Synopsis

enum CmpackListFormat
{
     CMPACK_LIST_DIFFMAG,
     CMPACK_LIST_INSTMAG,
     CMPACK_LIST_TRACKLST,
     CMPACK_LIST_STDDEV
};

Enumerators

CMPACK_LIST_DIFFMAGDifferential magnitudes (default).
CMPACK_LIST_INSTMAGInstrumental magnitudes.
CMPACK_LIST_TRACKLSTTrack list.
CMPACK_LIST_STDDEVStandard deviations.

cmpack_list_init (function)

Make new listing context.

Synopsis

CmpackLister * cmpack_list_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_list_set_console (function)

Attach console to the context.

Synopsis

void cmpack_list_set_console (CmpackLister * 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_list_set_aperture (function)

Set aperture index.

Synopsis

void cmpack_list_set_aperture (CmpackLister * proc, int index)

Parameters

proc[in] listing context
index[in] aperture index (starts by 1)

cmpack_list_get_aperture (function)

Get aperture index.

Synopsis

int cmpack_list_get_aperture (CmpackLister * proc)

Parameters

proc[in] listing context

Return value

aperture index (starts by 1)

cmpack_list_set_var (function)

Set list of variable stars.

Synopsis

void cmpack_list_set_var (CmpackLister * proc, const int * items, int nitems)

Parameters

proc[in] listing context
items[in] array of star identifiers
nitems[in] number of items

cmpack_list_set_comp (function)

Set list of comparison stars.

Synopsis

void cmpack_list_set_comp (CmpackLister * proc, const int * items, int nitems)

Parameters

proc[in] listing context
items[in] array of star identifiers
nitems[in] number of items

cmpack_list_set_check (function)

Set list of check stars.

Synopsis

void cmpack_list_set_check (CmpackLister * proc, const int * items, int nitems)

Parameters

proc[in] listing context
items[in] array of star identifiers
nitems[in] number of items

cmpack_list_open (function)

Start listing to a table.

Synopsis

int cmpack_list_open (CmpackLister * proc, CmpackTable * table, CmpackListFormat format, int flags)

Description

The function clears the content of the table, sets its columns. Use cmpack_list_close() to finish the operation. If the 'table' parameter is NULL, it makes a new table instance. You can get the pointer to it by calling the cmpack_list_get_table function.

Parameters

proc[in] listing process context
table[in] table context
format[in] output format
flags[in] flags

Return value

zero on success or error code on failure

cmpack_list_read (function)

Read single frame from a photometry file and process it.

Synopsis

int cmpack_list_read (CmpackLister * proc, CmpackPhtFile * file, int frame)

Parameters

proc[in] listing process context
file[in] matched photometry file context
frame[in] frame ordinal number

Return value

zero on success or error code on failure

cmpack_list_close (function)

Flush all data, close reading sequence.

Synopsis

int cmpack_list_close (CmpackLister * proc)

Description

The function finishes up the computation of output data.

Parameters

proc[in] listing process context

Return value

zero on success or error code on failure