Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 032485049d7e921c525a457ac3d3be1e > files > 202

munipack-1.2.10-2.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html><head>
<link rel="stylesheet" type="text/css" href="cmunipack.css">
<title>Functions for reading and writing catalogue files. </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body><div class="main_head"><p class="head"><a href="index.html">C-Munipack 1.2</a> / <a href="node014.html">Application programming interface</a> / <a href="node020.html">API reference</a></p><h1>Functions for reading and writing catalogue files. </h1></div><h2>cmpack_catfile.h</h2><h3>Enumerations</h3><table><tr><td>CmpackSelectionType</td><td>Selection types. </td></tr></table><h3>Type definitions</h3><table><tr><td>CmpackCatFile</td><td>Catalogue file context. </td></tr><tr><td>CmpackCatStar</td><td>Star definition in catalogue file. </td></tr><tr><td>CmpackCatSelection</td><td>Selection in catalogue file. </td></tr></table><h3>Functions</h3><table><tr><td>cmpack_cat_init</td><td>Create a new catalogue file context. </td></tr><tr><td>cmpack_cat_load</td><td>Load catalogue file from file. </td></tr><tr><td>cmpack_cat_save</td><td>Save changed, close file and free allocated memory. </td></tr><tr><td>cmpack_cat_clear</td><td>Clear all data. </td></tr><tr><td>cmpack_cat_copy</td><td>Make a copy of a catalogue file. </td></tr><tr><td>cmpack_cat_make</td><td>Make catalogue file from a photometry file. </td></tr><tr><td>cmpack_cat_test</td><td>Test if given file seems to be a catalogue file. </td></tr><tr><td>cmpack_cat_test_buffer</td><td>Test if the content of the buffer might be a catalogue file. </td></tr><tr><td>cmpack_cat_get_size</td><td>Get frame size in pixels. </td></tr><tr><td>cmpack_cat_get_jd</td><td>Get julian date of observation. </td></tr><tr><td>cmpack_cat_get_exptime</td><td>Get exposure duration. </td></tr><tr><td>cmpack_cat_get_filter</td><td>Get optical filter name. </td></tr><tr><td>cmpack_cat_get_object</td><td>Get object's designation. </td></tr><tr><td>cmpack_cat_get_objra</td><td>Get object's right ascension (R.A. </td></tr><tr><td>cmpack_cat_get_objdec</td><td>Get object's declination (Dec. </td></tr><tr><td>cmpack_cat_pkys</td><td>Set parameter value in file header (string). </td></tr><tr><td>cmpack_cat_pkyi</td><td>Set parameter value in file header (integer). </td></tr><tr><td>cmpack_cat_pkyd</td><td>Set parameter value in file header (double). </td></tr><tr><td>cmpack_cat_gkys</td><td>Get value of parameter in file header (string). </td></tr><tr><td>cmpack_cat_gkyi</td><td>Get value of parameter in file header (integer number). </td></tr><tr><td>cmpack_cat_gkyd</td><td>Get value of parameter in file header (real number). </td></tr><tr><td>cmpack_cat_gkyc</td><td>Get comment text of parameter in file header. </td></tr><tr><td>cmpack_cat_nkey</td><td>Get number of parameters in file header. </td></tr><tr><td>cmpack_cat_gkyn</td><td>Get the parameter from file header by its index. </td></tr><tr><td>cmpack_cat_dkey</td><td>Delete parameter from file header. </td></tr><tr><td>cmpack_cat_nstar</td><td>Gets number of stars defined in the file. </td></tr><tr><td>cmpack_cat_add_star</td><td>Add a star to a catalogue file. </td></tr><tr><td>cmpack_cat_get_star</td><td>Get star by its index. </td></tr><tr><td>cmpack_cat_find_star</td><td>Find star by identifier. </td></tr><tr><td>cmpack_cat_star_get_id</td><td>Get star indentifier. </td></tr><tr><td>cmpack_cat_star_set_center</td><td>Set position of a star. </td></tr><tr><td>cmpack_cat_star_get_center</td><td>Get position of a star. </td></tr><tr><td>cmpack_cat_star_set_magnitude</td><td>Set magnitude of a star. </td></tr><tr><td>cmpack_cat_star_get_magnitude</td><td>Get magnitude of a star. </td></tr><tr><td>cmpack_cat_clear_selection</td><td>Set selection type of all stars to CMPACK_SELECT_NONE. </td></tr><tr><td>cmpack_cat_set_star_type</td><td>Set selection type of a single star. </td></tr><tr><td>cmpack_cat_get_star_type</td><td>Get selection type of a single star. </td></tr><tr><td>cmpack_cat_get_selection</td><td>Get selection context from a catalogue file. </td></tr><tr><td>cmpack_cat_selection_clear</td><td>Clear the selection context. </td></tr><tr><td>cmpack_cat_selection_append</td><td>Append a list of stars. </td></tr><tr><td>cmpack_cat_selection_set</td><td>Set selection. </td></tr><tr><td>cmpack_cat_selection_nitems</td><td>Get number of stars in a selection. </td></tr><tr><td>cmpack_cat_selection_get</td><td>Get list of stars. </td></tr><tr><td>cmpack_cat_selection_item</td><td>Get a star by index. </td></tr></table><h3>Description</h3><p>Catalogue files contain information relative position of stars and position of variable, comparison and check stars. It is designed to simplify the final phase of the reduction process. The application loads the selection from a catalogue file and user only checks and confirms it.</p><p>The catalogue file is a XML document, see the Reference manual for its document type definition.</p><h2>CmpackCatFile (data type)</h2><p>Catalogue file context.</p><h3>Synopsis</h3><p>typedef struct _CmpackCatFile CmpackCatFile</p><h3>Description</h3><p>This private structure holds the content of the catalogue file.</p><h2>CmpackCatStar (data type)</h2><p>Star definition in catalogue file.</p><h3>Synopsis</h3><p>typedef struct _CmpackCatStar CmpackCatStar</p><h3>Description</h3><p>This structure is used to access a star definitions in a catalogue files.</p><h2>CmpackCatSelection (data type)</h2><p>Selection in catalogue file.</p><h3>Synopsis</h3><p>typedef struct _CmpackCatSelection CmpackCatSelection</p><h3>Description</h3><p>This structure is used to access a selection of stars in a catalogue files.</p><h2>CmpackSelectionType (enumeration)</h2><p>Selection types.</p><h3>Synopsis</h3><p class="synopsis">enum CmpackSelectionType<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_SELECT_NONE,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_SELECT_VAR,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_SELECT_COMP,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_SELECT_CHECK<br>};<h3>Enumerators</h3><table><tr><td>CMPACK_SELECT_NONE</td><td>Ordinary star. </td></tr><tr><td>CMPACK_SELECT_VAR</td><td>Variable star. </td></tr><tr><td>CMPACK_SELECT_COMP</td><td>Comparison star. </td></tr><tr><td>CMPACK_SELECT_CHECK</td><td>Check star. </td></tr></table><h2>cmpack_cat_init (function)</h2><p>Create a new catalogue file context.</p><h3>Synopsis</h3><p class="synopsis">CmpackCatFile * cmpack_cat_init (void)</p><h3>Return value</h3><p>pointer to a new instance</p><h2>cmpack_cat_load (function)</h2><p>Load catalogue file from file.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_load (CmpackCatFile ** file, const char * filename, CmpackLoadMode flags)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[out]</tt>&nbsp;</td><td>new file context </td></tr><tr><td>filename</td><td><tt>[in]</tt>&nbsp;</td><td>path + file name </td></tr><tr><td>flags</td><td><tt>[in]</tt>&nbsp;</td><td>flags (see CMPACK_LOAD_xxx constants) </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_cat_save (function)</h2><p>Save changed, close file and free allocated memory.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_save (CmpackCatFile * file, const char * filename)</p><h3>Description</h3><p>If the file was created by means of cmpack_cat_init() function, no changes are saved.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>filename</td><td><tt>[in]</tt>&nbsp;</td><td>path + file name </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_cat_clear (function)</h2><p>Clear all data.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_clear (CmpackCatFile * file)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h2>cmpack_cat_copy (function)</h2><p>Make a copy of a catalogue file.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_copy (CmpackCatFile * dstfile, CmpackCatFile * srcfile)</p><h3>Description</h3><p>Makes a copy of source file to the destination file. All content of the destination file will be deleted.</p><h3>Parameters</h3><table><tr><td>dstfile</td><td><tt>[in]</tt>&nbsp;</td><td>destination file context </td></tr><tr><td>srcfile</td><td><tt>[in]</tt>&nbsp;</td><td>source file context </td></tr></table><h2>cmpack_cat_make (function)</h2><p>Make catalogue file from a photometry file.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_make (CmpackCatFile * dstfile, CmpackPhtFile * srcfile, int aperture)</p><h3>Description</h3><p>Converts a photometry file to a catalogue file. All content of the destination file will be deleted.</p><h3>Parameters</h3><table><tr><td>dstfile</td><td><tt>[in]</tt>&nbsp;</td><td>destination file context </td></tr><tr><td>srcfile</td><td><tt>[in]</tt>&nbsp;</td><td>source file context </td></tr><tr><td>aperture</td><td><tt>[in]</tt>&nbsp;</td><td>aperture id </td></tr></table><h2>cmpack_cat_test (function)</h2><p>Test if given file seems to be a catalogue file.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_test (const char * filename)</p><h3>Return value</h3><p>nonzero if the file is a photometry file, zero otherwise</p><h2>cmpack_cat_test_buffer (function)</h2><p>Test if the content of the buffer might be a catalogue file.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_test_buffer (const char * buffer, int buflen, int filesize)</p><h3>Description</h3><p>The function checks the data in the buffer and returns nonzero, when the buffer contain first 'buflen' bytes from a catalogue file. This function is used for file format autodetection.</p><h3>Return value</h3><p>nonzero if the file is a photometry file, zero otherwise</p><h2>cmpack_cat_get_size (function)</h2><p>Get frame size in pixels.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_get_size (CmpackCatFile * file, int * width, int * height)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>width</td><td><tt>[out]</tt>&nbsp;</td><td>frame width in pixels (0 = not available) </td></tr><tr><td>height</td><td><tt>[out]</tt>&nbsp;</td><td>frame height in pixels (0 = not available) </td></tr></table><h3>Return value</h3><p>nonzero on success, zero on failure</p><h2>cmpack_cat_get_jd (function)</h2><p>Get julian date of observation.</p><h3>Synopsis</h3><p class="synopsis">double cmpack_cat_get_jd (CmpackCatFile * fc)</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>Julian date or zero on failure</p><h2>cmpack_cat_get_exptime (function)</h2><p>Get exposure duration.</p><h3>Synopsis</h3><p class="synopsis">double cmpack_cat_get_exptime (CmpackCatFile * fc)</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>Exposure duration in seconds or zero on failure</p><h2>cmpack_cat_get_filter (function)</h2><p>Get optical filter name.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_cat_get_filter (CmpackCatFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal buffer. You must not free or modify it.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>Filter name, null terminated string</p><h2>cmpack_cat_get_object (function)</h2><p>Get object's designation.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_cat_get_object (CmpackCatFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal buffer. You must not free or modify it.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>Object's designation, null terminated string</p><h2>cmpack_cat_get_objra (function)</h2><p>Get object's right ascension (R.A.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_cat_get_objra (CmpackCatFile * fc)</p><h3>Description</h3><p>)</p><p>The function returns pointer to the internal buffer. You must not free or modify it.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>Object's R.A., null terminated string</p><h2>cmpack_cat_get_objdec (function)</h2><p>Get object's declination (Dec.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_cat_get_objdec (CmpackCatFile * fc)</p><h3>Description</h3><p>)</p><p>The function returns pointer to the internal buffer. You must not free or modify it.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>Object's Dec., null terminated string</p><h2>cmpack_cat_pkys (function)</h2><p>Set parameter value in file header (string).</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_pkys (CmpackCatFile * file, const char * key, const char * val, const char * com)</p><h3>Description</h3><p>If the parameter does not exist, it makes new entry in the file header. If the parameter exists, its content is changed. Keys are case sensitive.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr><tr><td>val</td><td><tt>[in]</tt>&nbsp;</td><td>parameter value </td></tr><tr><td>com</td><td><tt>[in]</tt>&nbsp;</td><td>comment (parameter description) </td></tr></table><h2>cmpack_cat_pkyi (function)</h2><p>Set parameter value in file header (integer).</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_pkyi (CmpackCatFile * file, const char * key, int val, const char * com)</p><h3>Description</h3><p>If the parameter does not exist, it makes new entry in the file header. If the parameter exists, its content is changed. Keys are case sensitive.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr><tr><td>val</td><td><tt>[in]</tt>&nbsp;</td><td>parameter value </td></tr><tr><td>com</td><td><tt>[in]</tt>&nbsp;</td><td>comment (parameter description) </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_cat_pkyd (function)</h2><p>Set parameter value in file header (double).</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_pkyd (CmpackCatFile * file, const char * key, double val, int prec, const char * com)</p><h3>Description</h3><p>If the parameter does not exist, it makes new entry in the file header. If the parameter exists, its content is changed. Keys are case sensitive.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr><tr><td>val</td><td><tt>[in]</tt>&nbsp;</td><td>parameter value </td></tr><tr><td>prec</td><td><tt>[in]</tt>&nbsp;</td><td>number of decimal places </td></tr><tr><td>com</td><td><tt>[in]</tt>&nbsp;</td><td>comment (parameter description) </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_cat_gkys (function)</h2><p>Get value of parameter in file header (string).</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_cat_gkys (CmpackCatFile * file, const char * key)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr></table><h3>Return value</h3><p>pointer to internal buffer or NULL</p><h2>cmpack_cat_gkyi (function)</h2><p>Get value of parameter in file header (integer number).</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_gkyi (CmpackCatFile * file, const char * key, int defval)</p><h3>Description</h3><p>Keys are case sensitive.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr><tr><td>defval</td><td><tt>[in]</tt>&nbsp;</td><td>default value </td></tr></table><h3>Return value</h3><p>parameter value or default value</p><h2>cmpack_cat_gkyd (function)</h2><p>Get value of parameter in file header (real number).</p><h3>Synopsis</h3><p class="synopsis">double cmpack_cat_gkyd (CmpackCatFile * file, const char * key, double defval)</p><h3>Description</h3><p>Keys are case sensitive. You can set the output parameter to NULL if you want to test the value only.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr><tr><td>defval</td><td><tt>[in]</tt>&nbsp;</td><td>default value </td></tr></table><h3>Return value</h3><p>parameter value or default value</p><h2>cmpack_cat_gkyc (function)</h2><p>Get comment text of parameter in file header.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_cat_gkyc (CmpackCatFile * file, const char * key)</p><h3>Description</h3><p>Keys are case sensitive. The function returns pointer to the internal buffer. You must not free or modify it.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr></table><h3>Return value</h3><p>comment text, null terminated string</p><h2>cmpack_cat_nkey (function)</h2><p>Get number of parameters in file header.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_nkey (CmpackCatFile * file)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>number of parameter or zero if the file is not valid context or if the header is empty.</p><h2>cmpack_cat_gkyn (function)</h2><p>Get the parameter from file header by its index.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_gkyn (CmpackCatFile * file, int index, const char ** key, const char ** val, const char ** com)</p><h3>Description</h3><p>Index of the first parameter is zero. The output parameters receive the pointers to newly allocated memory buffers. The caller is responsible to free it by calling of cmpack_free() function. You can set the value of output parameter to NULL if you do not need to read it.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>index</td><td><tt>[in]</tt>&nbsp;</td><td>parameter index (starting by zero) </td></tr><tr><td>key</td><td><tt>[out]</tt>&nbsp;</td><td>parameter name (can be NULL) </td></tr><tr><td>val</td><td><tt>[out]</tt>&nbsp;</td><td>parameter value (can be NULL) </td></tr><tr><td>com</td><td><tt>[out]</tt>&nbsp;</td><td>comment (can be NULL) </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_cat_dkey (function)</h2><p>Delete parameter from file header.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_dkey (CmpackCatFile * file, const char * key)</p><h3>Description</h3><p>Keys are case sensitive.</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>key</td><td><tt>[in]</tt>&nbsp;</td><td>parameter name </td></tr></table><h2>cmpack_cat_nstar (function)</h2><p>Gets number of stars defined in the file.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_nstar (CmpackCatFile * file)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h3>Return value</h3><p>number of selected stars or zero on failure</p><h2>cmpack_cat_add_star (function)</h2><p>Add a star to a catalogue file.</p><h3>Synopsis</h3><p class="synopsis">CmpackCatStar * cmpack_cat_add_star (CmpackCatFile * file, int star_id)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>star_id</td><td><tt>[in]</tt>&nbsp;</td><td>star identifier </td></tr></table><h3>Return value</h3><p>new reference to a star</p><h2>cmpack_cat_get_star (function)</h2><p>Get star by its index.</p><h3>Synopsis</h3><p class="synopsis">CmpackCatStar * cmpack_cat_get_star (CmpackCatFile * file, int index)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>index</td><td><tt>[in]</tt>&nbsp;</td><td>index </td></tr></table><h2>cmpack_cat_find_star (function)</h2><p>Find star by identifier.</p><h3>Synopsis</h3><p class="synopsis">CmpackCatStar * cmpack_cat_find_star (CmpackCatFile * file, int star_id)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>star_id</td><td><tt>[in]</tt>&nbsp;</td><td>star identifier </td></tr></table><h2>cmpack_cat_star_get_id (function)</h2><p>Get star indentifier.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_star_get_id (CmpackCatStar * star)</p><h3>Parameters</h3><table><tr><td>star</td><td><tt>[in]</tt>&nbsp;</td><td>star context </td></tr></table><h3>Return value</h3><p>identifier of a star or negative value on failure</p><h2>cmpack_cat_star_set_center (function)</h2><p>Set position of a star.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_star_set_center (CmpackCatStar * star, double x, double y)</p><h3>Parameters</h3><table><tr><td>star</td><td><tt>[in]</tt>&nbsp;</td><td>star context </td></tr><tr><td>x</td><td><tt>[in]</tt>&nbsp;</td><td>position in x axis in pixels </td></tr><tr><td>y</td><td><tt>[in]</tt>&nbsp;</td><td>position in y axis in pixels </td></tr></table><h2>cmpack_cat_star_get_center (function)</h2><p>Get position of a star.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_star_get_center (CmpackCatStar * star, double * x, double * y)</p><h3>Parameters</h3><table><tr><td>star</td><td><tt>[in]</tt>&nbsp;</td><td>star context </td></tr><tr><td>x</td><td><tt>[out]</tt>&nbsp;</td><td>position in x axis in pixels </td></tr><tr><td>y</td><td><tt>[out]</tt>&nbsp;</td><td>position in y axis in pixels </td></tr></table><h3>Return value</h3><p>zero on success or error code on failure</p><h2>cmpack_cat_star_set_magnitude (function)</h2><p>Set magnitude of a star.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_star_set_magnitude (CmpackCatStar * star, double mag)</p><h3>Parameters</h3><table><tr><td>star</td><td><tt>[in]</tt>&nbsp;</td><td>star context </td></tr><tr><td>mag</td><td><tt>[in]</tt>&nbsp;</td><td>magnitude </td></tr></table><h2>cmpack_cat_star_get_magnitude (function)</h2><p>Get magnitude of a star.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_star_get_magnitude (CmpackCatStar * star, double * mag)</p><h3>Parameters</h3><table><tr><td>star</td><td><tt>[in]</tt>&nbsp;</td><td>star context </td></tr><tr><td>mag</td><td><tt>[out]</tt>&nbsp;</td><td>magnitude </td></tr></table><h3>Return value</h3><p>nonzero on success or zero on failure</p><h2>cmpack_cat_clear_selection (function)</h2><p>Set selection type of all stars to CMPACK_SELECT_NONE.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_clear_selection (CmpackCatFile * file)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr></table><h2>cmpack_cat_set_star_type (function)</h2><p>Set selection type of a single star.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_set_star_type (CmpackCatFile * file, int star_id, CmpackSelectionType type)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>star_id</td><td><tt>[in]</tt>&nbsp;</td><td>star identifier </td></tr><tr><td>type</td><td><tt>[in]</tt>&nbsp;</td><td>selection type </td></tr></table><h2>cmpack_cat_get_star_type (function)</h2><p>Get selection type of a single star.</p><h3>Synopsis</h3><p class="synopsis">CmpackSelectionType cmpack_cat_get_star_type (CmpackCatFile * file, int star_id)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>star_id</td><td><tt>[in]</tt>&nbsp;</td><td>star identifier </td></tr></table><h3>Return value</h3><p>selection type or CMPACK_SELECT_NONE if the star does not exist.</p><h2>cmpack_cat_get_selection (function)</h2><p>Get selection context from a catalogue file.</p><h3>Synopsis</h3><p class="synopsis">CmpackCatSelection * cmpack_cat_get_selection (CmpackCatFile * file, CmpackSelectionType type)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>type</td><td><tt>[in]</tt>&nbsp;</td><td>selection type </td></tr></table><h3>Return value</h3><p>new reference to the selection context</p><h2>cmpack_cat_selection_clear (function)</h2><p>Clear the selection context.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_selection_clear (CmpackCatSelection * sel)</p><h3>Parameters</h3><table><tr><td>sel</td><td><tt>[in]</tt>&nbsp;</td><td>selection context </td></tr></table><h2>cmpack_cat_selection_append (function)</h2><p>Append a list of stars.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_selection_append (CmpackCatSelection * sel, const int * list, int count)</p><h3>Parameters</h3><table><tr><td>sel</td><td><tt>[in]</tt>&nbsp;</td><td>selection context </td></tr><tr><td>list</td><td><tt>[in]</tt>&nbsp;</td><td>star identifiers </td></tr><tr><td>count</td><td><tt>[in]</tt>&nbsp;</td><td>number of stars </td></tr></table><h2>cmpack_cat_selection_set (function)</h2><p>Set selection.</p><h3>Synopsis</h3><p class="synopsis">void cmpack_cat_selection_set (CmpackCatSelection * sel, const int * list, int count)</p><h3>Parameters</h3><table><tr><td>sel</td><td><tt>[in]</tt>&nbsp;</td><td>selection context </td></tr><tr><td>list</td><td><tt>[in]</tt>&nbsp;</td><td>star identifiers </td></tr><tr><td>count</td><td><tt>[in]</tt>&nbsp;</td><td>number of stars </td></tr></table><h2>cmpack_cat_selection_nitems (function)</h2><p>Get number of stars in a selection.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_selection_nitems (CmpackCatSelection * sel)</p><h3>Parameters</h3><table><tr><td>sel</td><td><tt>[in]</tt>&nbsp;</td><td>selection context </td></tr></table><h3>Return value</h3><p>number of items or zero on failure</p><h2>cmpack_cat_selection_get (function)</h2><p>Get list of stars.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_selection_get (CmpackCatSelection * sel, int * list, int count)</p><h3>Parameters</h3><table><tr><td>sel</td><td><tt>[in]</tt>&nbsp;</td><td>selection context </td></tr><tr><td>list</td><td><tt>[in]</tt>&nbsp;</td><td>buffer which receives star identifiers </td></tr><tr><td>count</td><td><tt>[in]</tt>&nbsp;</td><td>buffer size </td></tr></table><h3>Return value</h3><p>number of items stored to buffer or negative value on failure</p><h2>cmpack_cat_selection_item (function)</h2><p>Get a star by index.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_cat_selection_item (CmpackCatSelection * sel, int index)</p><h3>Parameters</h3><table><tr><td>sel</td><td><tt>[in]</tt>&nbsp;</td><td>selection context </td></tr><tr><td>index</td><td><tt>[in]</tt>&nbsp;</td><td>zero base index </td></tr></table><h3>Return value</h3><p>star identifier or negative value on failure</p></body></html>