GIRAFFE Pipeline Reference Manual

Miscellaneous Utilities


Functions

void irplib_reset (void)
 Reset IRPLIB state.
int irplib_compare_tags (cpl_frame *frame1, cpl_frame *frame2)
 Comparison function to identify different input frames.
const char * irplib_frameset_find_file (const cpl_frameset *self, const char *tag)
 Find the filename with the given tag in a frame set.
cpl_frame * irplib_frameset_get_first_from_group (const cpl_frameset *self, cpl_frame_group group)
 Find the first frame belonging to the given group.
cpl_error_code irplib_apertures_find_max_flux (const cpl_apertures *self, int *ind, int nfind)
 Find the aperture(s) with the greatest flux.
int irplib_isinf (double value)
 portable isinf
int irplib_isnan (double value)
 portable isnan
void irplib_errorstate_warning (unsigned self, unsigned first, unsigned last)
 Dump a single CPL error.

Function Documentation

cpl_error_code irplib_apertures_find_max_flux const cpl_apertures *  self,
int *  ind,
int  nfind
 

Find the aperture(s) with the greatest flux.

Parameters:
self The aperture object
ind The aperture-indices in order of decreasing flux
nfind Number of indices to find
Returns:
CPL_ERROR_NONE or the relevant _cpl_error_code_ on error
nfind must be at least 1 and at most the size of the aperture object.

The ind array must be able to hold (at least) nfind integers. On success the first nfind elements of ind point to indices of the aperture object.

To find the single ind of the aperture with the maximum flux use simply: int ind; irplib_apertures_find_max_flux(self, &ind, 1);

Definition at line 190 of file irplib_utils.c.

int irplib_compare_tags cpl_frame *  frame1,
cpl_frame *  frame2
 

Comparison function to identify different input frames.

Parameters:
frame1 first frame
frame2 second frame
Returns:
0 if frame1!=frame2, 1 if frame1==frame2, -1 in error case

Definition at line 90 of file irplib_utils.c.

void irplib_errorstate_warning unsigned  self,
unsigned  first,
unsigned  last
 

Dump a single CPL error.

Parameters:
self The number of the current error to be dumped
first The number of the first error to be dumped
last The number of the last error to be dumped
Returns:
void
Note:
This function differs from cpl_errorstate_dump_one only in message level
See also:
cpl_errorstate_dump_one

Definition at line 271 of file irplib_utils.c.

const char* irplib_frameset_find_file const cpl_frameset *  self,
const char *  tag
 

Find the filename with the given tag in a frame set.

Parameters:
self A frame set.
tag The frame tag to search for.
Returns:
The filename or NULL if none found and on error.
See also:
cpl_frameset_find
Note:
If called with a CPL error code, the location will be updated and NULL returned.
NULL is returned and no error code set if the tag is not found.

If the file is not unique, the name of the first one is returned and with a warning.

Definition at line 126 of file irplib_utils.c.

cpl_frame* irplib_frameset_get_first_from_group const cpl_frameset *  self,
cpl_frame_group  group
 

Find the first frame belonging to the given group.

Parameters:
self The frameset
group The group attribute
Returns:
The first frame belonging to the given group, or NULL if no such frame was found. The function returns NULL if an error occurs and sets the appropriate error code.

Definition at line 156 of file irplib_utils.c.

void irplib_reset void   ) 
 

Reset IRPLIB state.

This function resets all static memory used by IRPLIB to a well-defined, initial state.

The function should be called (during initialization) by any application using static memory facilities in IRPLIB.

Currently, this function does nothing.

Definition at line 77 of file irplib_utils.c.


This file is part of the GIRAFFE Pipeline Reference Manual 2.5.2.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Fri Jun 13 14:36:26 2008 by doxygen 1.4.6 written by Dimitri van Heesch, © 1997-2004