GIRAFFE Pipeline Reference Manual

Miscellaneous Utilities

Functions

const cxchar * giraffe_get_license (void)
 Get the pipeline copyright and license. More...
 
GiInstrumentMode giraffe_get_mode (cpl_propertylist *properties)
 Determines the instrument mode from a property list. More...
 
cxchar * giraffe_path_get_basename (const cxchar *path)
 Gets the name of a file without any leading directory components. More...
 
cxchar * giraffe_localtime_iso8601 (void)
 Get the current date and time in ISO 8601 format. More...
 
cxint giraffe_add_recipe_info (cpl_propertylist *plist, const GiRecipeInfo *info)
 Add recipe specific information to a property list. More...
 
cxint giraffe_add_frameset_info (cpl_propertylist *plist, const cpl_frameset *set, cxint sequence)
 Add frameset specific information to a property list. More...
 
cxint giraffe_propertylist_update (cpl_propertylist *self, cpl_propertylist *properties, const cxchar *regexp)
 Update a property list. More...
 
cxint giraffe_propertylist_copy (cpl_propertylist *self, const cxchar *name, const cpl_propertylist *other, const cxchar *othername)
 Copy a property from one list to another. More...
 
cxdouble giraffe_propertylist_get_conad (const cpl_propertylist *properties)
 Retrieve the ADU to electrons conversion factor from the given properties. More...
 
cxdouble giraffe_propertylist_get_ron (const cpl_propertylist *properties)
 Retrieve the read-out noise from the given properties. More...
 

Detailed Description

TBD

Function Documentation

cxint giraffe_add_frameset_info ( cpl_propertylist *  plist,
const cpl_frameset *  set,
cxint  sequence 
)

Add frameset specific information to a property list.

Parameters
plistThe propertylist to update.
setA reference frameset
sequenceRecipe sequence number
Returns
The function returns 0 on success, or a non-zero number in case an error occurred.

The function adds DFS specific information to the property list plist, used for product frames. This information, name, tag, and MD5SUM of the files used during processing are taken from the contents of the reference frameset set.

The recipe sequence number sequence is the index of a recipe within a recipe chain. For single recipe calls this is always 1.

Definition at line 587 of file giutils.c.

References giraffe_path_get_basename().

Referenced by giraffe_image_add_info(), and giraffe_table_add_info().

cxint giraffe_add_recipe_info ( cpl_propertylist *  plist,
const GiRecipeInfo *  info 
)

Add recipe specific information to a property list.

TBD

Definition at line 489 of file giutils.c.

Referenced by giraffe_image_add_info(), and giraffe_table_add_info().

const cxchar* giraffe_get_license ( void  )

Get the pipeline copyright and license.

Returns
The copyright and license string.

The function returns a pointer to the statically allocated license string. This string should not be modified using the returned pointer.

Definition at line 284 of file giutils.c.

GiInstrumentMode giraffe_get_mode ( cpl_propertylist *  properties)

Determines the instrument mode from a property list.

Parameters
propertiesThe property list to query.
Returns
The function returns the used instrument mode, or GIMODE_NONE if the mode cannot be determined or an error occurs.

The function determines the instrument mode by querying the properties properties.

Definition at line 306 of file giutils.c.

References gi_warning().

Referenced by giraffe_fiberlist_create(), giraffe_fov_build(), giraffe_grating_create(), giraffe_grating_setup(), giraffe_localize_spectra(), and giraffe_slitgeometry_load().

cxchar* giraffe_localtime_iso8601 ( void  )

Get the current date and time in ISO 8601 format.

Returns
The string containing the current date and time in the ISO 8601 format. If an error occurs the function returns NULL.

The function formats the current date and the local system time according to the ISO 8601 format and puts both together in a string. The returned string must be deallocated using cx_free().

Definition at line 446 of file giutils.c.

cxchar* giraffe_path_get_basename ( const cxchar *  path)

Gets the name of a file without any leading directory components.

Parameters
pathThe name of the file path.
Returns
The name of the file with any leading directory components removed.

Gets the name of the file without any leading directory components. The function allocates a buffer containing the stripped file name. The returned string should be deallocated using cx_free() when it is no longer needed.

Definition at line 384 of file giutils.c.

Referenced by giraffe_add_frameset_info().

cxint giraffe_propertylist_copy ( cpl_propertylist *  self,
const cxchar *  name,
const cpl_propertylist *  other,
const cxchar *  othername 
)

Copy a property from one list to another.

TBD

Definition at line 909 of file giutils.c.

cxdouble giraffe_propertylist_get_conad ( const cpl_propertylist *  properties)

Retrieve the ADU to electrons conversion factor from the given properties.

Parameters
propertiesThe property list to search for the conversion factor.
Returns
The function returns the confersion factor in electrons/ADU. In case an error occurred, zero is returned, and an appropriate error code is set.
Errors:
CPL_ERROR_DATA_NOT_FOUND Any of the required properties (conversion factor) was not found.
CPL_ERROR_ILLEGAL_INPUT An invalid value (less than 0.) of the conversion factor was encountered.

The function determines the ADU to electrons conversion factor from the properties properties.

Definition at line 1274 of file giutils.c.

Referenced by giraffe_calibrate_flux(), giraffe_compute_fiber_profiles(), giraffe_extract_spectra(), giraffe_localize_spectra(), and giraffe_propertylist_get_ron().

cxdouble giraffe_propertylist_get_ron ( const cpl_propertylist *  properties)

Retrieve the read-out noise from the given properties.

Parameters
propertiesThe property list to use for the read-out noise computation.
Returns
The function returns the computed read-out noise in electrons. In case an error occurred, a negative number is returned, and an appropriate error code is set.
Errors:
CPL_ERROR_DATA_NOT_FOUND Any of the required (detecor read-out noise, conversion factor) properties was not found.

The function determines the detector read-out noise in electrons from the properties properties. The properties are searched for the measured read-out noise property (bias sigma). If this is not found, the default detector read-out noise property is taken. The conversion factor property is used to convert the read-out noise from ADU into electrons, as necessary.

Definition at line 1358 of file giutils.c.

References giraffe_propertylist_get_conad().

Referenced by giraffe_compute_fiber_profiles(), giraffe_extract_spectra(), and giraffe_localize_spectra().

cxint giraffe_propertylist_update ( cpl_propertylist *  self,
cpl_propertylist *  properties,
const cxchar *  regexp 
)

Update a property list.

Parameters
selfThe property list to update.
propertiesThe source property list.
regexpA property name pattern.
Returns
The function returns 0 on success and a non-zero value in case an error occurred. In the latter case an error code is also set.

The function updates the target property list with properties from the source list properties, which are not present in self. If a pattern string is given only properties with names matching the given pattern regexp are taken into account when self is updated. If a pattern is given, it must be a valid regular expression. If the pattern string is either NULL or the empty string, the whole source list is considered during the update operation.

Definition at line 818 of file giutils.c.

Referenced by giraffe_extract_spectra().


This file is part of the GIRAFFE Pipeline Reference Manual 2.14.
Documentation copyright © 2002-2006 European Southern Observatory.
Generated on Wed Mar 11 2015 13:19:42 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2004