Sophie

Sophie

distrib > Fedora > 15 > x86_64 > by-pkgid > 967d2ab22510ea682c2fd6fd5faeacb3 > files > 203

munipack-1.2.10-2.fc15.x86_64.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 CCD frames. </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 CCD frames. </h1></div><h2>cmpack_ccdfile.h</h2><h3>Enumerations</h3><table><tr><td>CmpackCcdFormat</td><td>Image format identifiers. </td></tr><tr><td>CmpackImageTrafo</td><td>Image transformation bits. </td></tr></table><h3>Type definitions</h3><table><tr><td>CmpackCcdFile</td><td>CCD frame file context. </td></tr></table><h3>Functions</h3><table><tr><td>cmpack_ccd_test</td><td>Check if the file is a CCD frame. </td></tr><tr><td>cmpack_ccd_test_buffer</td><td>Check if the content in buffer is a beginning of a CCD frame. </td></tr><tr><td>cmpack_ccd_new</td><td>Open a temporary CCD frame (stored in memory only). </td></tr><tr><td>cmpack_ccd_open</td><td>Open a CCD frame file. </td></tr><tr><td>cmpack_ccd_copy</td><td>Make a copy of CCD frame. </td></tr><tr><td>cmpack_ccd_get_format</td><td>Get file format descriptor. </td></tr><tr><td>cmpack_ccd_get_datetime</td><td>Get date and time of observation. </td></tr><tr><td>cmpack_ccd_get_exptime</td><td>Get exposure duration. </td></tr><tr><td>cmpack_ccd_get_ccdtemp</td><td>Get CCD temperature. </td></tr><tr><td>cmpack_ccd_get_filter</td><td>Get optical filter name. </td></tr><tr><td>cmpack_ccd_get_object</td><td>Get object's designation. </td></tr><tr><td>cmpack_ccd_get_objra</td><td>Get object's right ascension (R.A. </td></tr><tr><td>cmpack_ccd_get_objdec</td><td>Get object's declination. </td></tr><tr><td>cmpack_ccd_get_observer</td><td>Get observer's name. </td></tr><tr><td>cmpack_ccd_get_observatory</td><td>Get observatory name. </td></tr><tr><td>cmpack_ccd_get_obslon</td><td>Get observer's longitude. </td></tr><tr><td>cmpack_ccd_get_obslat</td><td>Get observer's latitude. </td></tr><tr><td>cmpack_ccd_get_frames</td><td>Get number of frames combined together. </td></tr><tr><td>cmpack_ccd_get_param</td><td>Parameter enumeration. </td></tr><tr><td>cmpack_ccd_get_str</td><td>Get a string value from a file header. </td></tr><tr><td>cmpack_ccd_get_int</td><td>Get a integer value from a file header. </td></tr><tr><td>cmpack_ccd_get_bool</td><td>Get a logical value from a file header. </td></tr><tr><td>cmpack_ccd_get_double</td><td>Get a real value from a file header. </td></tr><tr><td>cmpack_ccd_get_bitpix</td><td>Get frame size in pixels. </td></tr><tr><td>cmpack_ccd_get_range</td><td>Get image data range. </td></tr><tr><td>cmpack_ccd_get_size</td><td>Get frame size in pixels. </td></tr><tr><td>cmpack_ccd_get_image</td><td>Get image data (signed char). </td></tr><tr><td>cmpack_ccd_print_info</td><td>Print short info about specified CCD-frame. </td></tr><tr><td>cmpack_ccd_print_head</td><td>Print full header from ccd frame of any format. </td></tr></table><h3>Description</h3><p>Set of function defined in this module allows user to read CCD frame files in various formats by means of single interface. Writing files is not supported, use the cfitsio library directly.</p><h2>CmpackCcdFile (data type)</h2><p>CCD frame file context.</p><h3>Synopsis</h3><p>typedef struct _CmpackCcdFile CmpackCcdFile</p><h3>Description</h3><p>This private structure is used to access CCD frame file</p><h2>CmpackCcdFormat (enumeration)</h2><p>Image format identifiers.</p><h3>Synopsis</h3><p class="synopsis">enum CmpackCcdFormat<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FORMAT_UNKNOWN =  0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FORMAT_FITS,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FORMAT_SBIG,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FORMAT_OES<br>};<h3>Enumerators</h3><table><tr><td>CMPACK_FORMAT_UNKNOWN</td><td>Unknown format. </td></tr><tr><td>CMPACK_FORMAT_FITS</td><td>FITS format. </td></tr><tr><td>CMPACK_FORMAT_SBIG</td><td>SBIG format. </td></tr><tr><td>CMPACK_FORMAT_OES</td><td>OES Astro format. </td></tr></table><h2>CmpackImageTrafo (enumeration)</h2><p>Image transformation bits.</p><h3>Synopsis</h3><p class="synopsis">enum CmpackImageTrafo<br>{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FLIP_0 =  0x00,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FLIP_X =  0x01,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FLIP_Y =  0x02,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CMPACK_FLIP_XY =  0x03<br>};<h3>Enumerators</h3><table><tr><td>CMPACK_FLIP_0</td><td>No flipping. </td></tr><tr><td>CMPACK_FLIP_X</td><td>Flip horizontally. </td></tr><tr><td>CMPACK_FLIP_Y</td><td>Flip vertically. </td></tr><tr><td>CMPACK_FLIP_XY</td><td>Rotate image 180 degrees. </td></tr></table><h2>cmpack_ccd_test (function)</h2><p>Check if the file is a CCD frame.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_test (const char * filename)</p><h3>Parameters</h3><table><tr><td>filename</td><td><tt>[in]</tt>&nbsp;</td><td>path + file name </td></tr></table><h3>Return value</h3><p>nonzero if the file is a CCD frame, zero otherwise</p><h2>cmpack_ccd_test_buffer (function)</h2><p>Check if the content in buffer is a beginning of a CCD frame.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_test_buffer (const char * buffer, int buflen, int filesize)</p><h3>Parameters</h3><table><tr><td>buffer</td><td><tt>[in]</tt>&nbsp;</td><td>beginning of the file </td></tr><tr><td>buflen</td><td><tt>[in]</tt>&nbsp;</td><td>number of bytes stored in the buffer </td></tr><tr><td>filesize</td><td><tt>[in]</tt>&nbsp;</td><td>size of file in bytes </td></tr></table><h3>Return value</h3><p>nonzero if the file is a CCD frame, zero otherwise</p><h2>cmpack_ccd_new (function)</h2><p>Open a temporary CCD frame (stored in memory only).</p><h3>Synopsis</h3><p class="synopsis">CmpackCcdFile * cmpack_ccd_new (void)</p><h3>Description</h3><p>The reference counter is set to one. The caller is responsible to call cmpack_unref() when it is no longer needed.</p><h3>Return value</h3><p>pointer to new file context or zero on failure</p><h2>cmpack_ccd_open (function)</h2><p>Open a CCD frame file.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_open (CmpackCcdFile ** fc, const char * filename, CmpackOpenMode flags)</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[out]</tt>&nbsp;</td><td>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>open flags </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_copy (function)</h2><p>Make a copy of CCD frame.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_copy (CmpackCcdFile * fc, CmpackCcdFile * from)</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>target frame context </td></tr><tr><td>from</td><td><tt>[in]</tt>&nbsp;</td><td>source frame context </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_format (function)</h2><p>Get file format descriptor.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_format (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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>file format descriptor or NULL on failure</p><h2>cmpack_ccd_get_datetime (function)</h2><p>Get date and time of observation.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_datetime (CmpackCcdFile * fc, CmpackDateTime * dt)</p><h3>Description</h3><p>The function reads the date and time at the start of the observation.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>dt</td><td><tt>[out]</tt>&nbsp;</td><td>date and time (zeros = not available) </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_exptime (function)</h2><p>Get exposure duration.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_exptime (CmpackCcdFile * fc, double * exptime)</p><h3>Description</h3><p>The function reads exposure duration in seconds.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>exptime</td><td><tt>[in]</tt>&nbsp;</td><td>exposure duration </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_ccdtemp (function)</h2><p>Get CCD temperature.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_ccdtemp (CmpackCcdFile * fc, double * ccdtemp)</p><h3>Description</h3><p>The function reads the CCD temperature in degrees C.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>ccdtemp</td><td><tt>[in]</tt>&nbsp;</td><td>CCD temperature </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_filter (function)</h2><p>Get optical filter name.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_filter (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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 or NULL on failure</p><h2>cmpack_ccd_get_object (function)</h2><p>Get object's designation.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_object (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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>pointer to string or NULL on failure</p><h2>cmpack_ccd_get_objra (function)</h2><p>Get object's right ascension (R.A.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_objra (CmpackCcdFile * fc)</p><h3>Description</h3><p>)</p><p>The function returns pointer to the internal memory. You must not free or modify it. The string are valid as far as the context exists.</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>pointer to string or NULL on failure</p><h2>cmpack_ccd_get_objdec (function)</h2><p>Get object's declination.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_objdec (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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>pointer to string or NULL on failure</p><h2>cmpack_ccd_get_observer (function)</h2><p>Get observer's name.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_observer (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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>pointer to string or NULL on failure</p><h2>cmpack_ccd_get_observatory (function)</h2><p>Get observatory name.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_observatory (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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>pointer to string or NULL on failure</p><h2>cmpack_ccd_get_obslon (function)</h2><p>Get observer's longitude.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_obslon (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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>pointer to string or NULL on failure</p><h2>cmpack_ccd_get_obslat (function)</h2><p>Get observer's latitude.</p><h3>Synopsis</h3><p class="synopsis">const char * cmpack_ccd_get_obslat (CmpackCcdFile * fc)</p><h3>Description</h3><p>The function returns pointer to the internal memory. You must not free or modify it. The string is valid as far as the context exists.</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>pointer to string or NULL on failure</p><h2>cmpack_ccd_get_frames (function)</h2><p>Get number of frames combined together.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_frames (CmpackCcdFile * fc, int * frames)</p><h3>Description</h3><p>The function reads the number of frames. If the field is not defined, it returns zero.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>frames</td><td><tt>[in]</tt>&nbsp;</td><td>number of frames </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_param (function)</h2><p>Parameter enumeration.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_param (CmpackCcdFile * fc, int index, char ** key, char ** val, 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 it.</p><h3>Parameters</h3><table><tr><td>fc</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 0) </td></tr><tr><td>key</td><td><tt>[out]</tt>&nbsp;</td><td>parameter name </td></tr><tr><td>val</td><td><tt>[out]</tt>&nbsp;</td><td>parameter value </td></tr><tr><td>com</td><td><tt>[out]</tt>&nbsp;</td><td>comment text </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_str (function)</h2><p>Get a string value from a file header.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_str (CmpackCcdFile * fc, const char * key, char ** val)</p><h3>Description</h3><p>The val parameter is set to a pointer to a newly allocated memory buffer. The caller is responsible to free it by calling of cmpack_free() function. Keys are case sensitive.</p><h3>Parameters</h3><table><tr><td>fc</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 (key) </td></tr><tr><td>val</td><td><tt>[out]</tt>&nbsp;</td><td>parameter value </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_int (function)</h2><p>Get a integer value from a file header.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_int (CmpackCcdFile * fc, const char * key, int * val)</p><h3>Parameters</h3><table><tr><td>fc</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 (key) </td></tr><tr><td>val</td><td><tt>[out]</tt>&nbsp;</td><td>parameter value </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_bool (function)</h2><p>Get a logical value from a file header.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_bool (CmpackCcdFile * fc, const char * key, int * val)</p><h3>Parameters</h3><table><tr><td>fc</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 (key) </td></tr><tr><td>val</td><td><tt>[out]</tt>&nbsp;</td><td>parameter value </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_double (function)</h2><p>Get a real value from a file header.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_double (CmpackCcdFile * fc, const char * key, double * val)</p><h3>Parameters</h3><table><tr><td>fc</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 (key) </td></tr><tr><td>val</td><td><tt>[out]</tt>&nbsp;</td><td>parameter value </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_bitpix (function)</h2><p>Get frame size in pixels.</p><h3>Synopsis</h3><p class="synopsis">CmpackBitpix cmpack_ccd_get_bitpix (CmpackCcdFile * 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>image data type on success, zero on failure</p><h2>cmpack_ccd_get_range (function)</h2><p>Get image data range.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_range (CmpackCcdFile * fc, double * minvalue, double * maxvalue)</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>minvalue</td><td><tt>[in]</tt>&nbsp;</td><td>minimum pixel value </td></tr><tr><td>maxvalue</td><td><tt>[in]</tt>&nbsp;</td><td>maximum pixel value </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_get_size (function)</h2><p>Get frame size in pixels.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_size (CmpackCcdFile * fc, int * width, int * height)</p><h3>Parameters</h3><table><tr><td>fc</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>zero on success, error code on failure</p><h2>cmpack_ccd_get_image (function)</h2><p>Get image data (signed char).</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_get_image (CmpackCcdFile * fc, CmpackBitpix bitpix, int flipx, int flipy, void * buf)</p><h3>Description</h3><p>Image content is copied into given memory buffer.</p><h3>Parameters</h3><table><tr><td>fc</td><td><tt>[in]</tt>&nbsp;</td><td>file context </td></tr><tr><td>bitpix</td><td><tt>[in]</tt>&nbsp;</td><td>image resolution </td></tr><tr><td>flipx</td><td><tt>[in]</tt>&nbsp;</td><td>horizonal image flipping </td></tr><tr><td>flipy</td><td><tt>[in]</tt>&nbsp;</td><td>vertical image flipping </td></tr><tr><td>buf</td><td><tt>[out]</tt>&nbsp;</td><td>image data </td></tr></table><h3>Return value</h3><p>zero on success, error code on failure</p><h2>cmpack_ccd_print_info (function)</h2><p>Print short info about specified CCD-frame.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_print_info (CmpackCcdFile * file, CmpackConsole * con)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>CCD-frame file path + name </td></tr><tr><td>con</td><td><tt>[in]</tt>&nbsp;</td><td>console context </td></tr></table><h3>Return value</h3><p>zero on success or error code on failure</p><h2>cmpack_ccd_print_head (function)</h2><p>Print full header from ccd frame of any format.</p><h3>Synopsis</h3><p class="synopsis">int cmpack_ccd_print_head (CmpackCcdFile * file, CmpackConsole * con)</p><h3>Parameters</h3><table><tr><td>file</td><td><tt>[in]</tt>&nbsp;</td><td>CCD-frame file path + name </td></tr><tr><td>con</td><td><tt>[in]</tt>&nbsp;</td><td>console context </td></tr></table><h3>Return value</h3><p>zero on success or error code on failure</p></body></html>