Spectro functionality

Functions

cpl_error_code naco_vector_correlate_imagelist_1d (cpl_vector *offset, const cpl_vector *goffset, cpl_boolean do_wave, const cpl_imagelist *self)
 Use 1D cross-correlation to recompute the offsets in one direction.
cpl_error_code naco_imagelist_add_split (cpl_imagelist *self)
 Readd all the pairs, preserving the number of images.
cpl_error_code naco_imagelist_append_invert (cpl_imagelist *self)
 Fo each image append also its inverted.
cpl_error_code naco_imagelist_split (cpl_imagelist *self)
 Split the images in an imagelist into positive and negative images.
char * naco_spc_make_tag (const cpl_frame *self, const cpl_propertylist *plist, int dummy)
 Create a string suitable for frame comparison in spectroscopy.
cpl_error_code naco_imagelist_load_diff (cpl_imagelist *self, const irplib_framelist *onofflist, const cpl_propertylist *onoffkeys)
 Fill the list of difference images from on/off frames.

Function Documentation

cpl_error_code naco_vector_correlate_imagelist_1d ( cpl_vector *  offset,
const cpl_vector *  goffset,
cpl_boolean  do_wave,
const cpl_imagelist *  self 
)

Use 1D cross-correlation to recompute the offsets in one direction.

Parameters:
offset The recomputed offsets, XC-changes are rounded off to int
goffset The 1st guess of the offsets
do_wave CPL_TRUE to recompute Y-offsets, else X-offsets
self The imagelist to correlate
Returns:
CPL_ERROR_NONE on success, otherwise the relevant CPL error code
Note:
The Y-direction is assumed to be the wavelength direction

The first element(s) are not updated, the remainder are relative to the 1st.

The remainder have their signs inverted, so they work with cpl_geom_img_offset_saa()...

Definition at line 96 of file naco_spc.c.

cpl_error_code naco_imagelist_add_split ( cpl_imagelist *  self  ) 

Readd all the pairs, preserving the number of images.

Parameters:
self The imagelist to readd
Returns:
CPL_ERROR_NONE on success, otherwise the relevant CPL error code
See also:
naco_imagelist_split()

Definition at line 256 of file naco_spc.c.

cpl_error_code naco_imagelist_append_invert ( cpl_imagelist *  self  ) 

Fo each image append also its inverted.

Parameters:
self The imagelist to extend
Returns:
CPL_ERROR_NONE on success, otherwise the relevant CPL error code
Note:
The list is modified to D1, D2, ..., Dn, -D1, -D2, ..., -Dn.

Definition at line 300 of file naco_spc.c.

cpl_error_code naco_imagelist_split ( cpl_imagelist *  self  ) 

Split the images in an imagelist into positive and negative images.

Parameters:
self The imagelist to split
Returns:
CPL_ERROR_NONE on success, otherwise the relevant CPL error code
Note:
Each input image is replaced by two, a positive and a negative, the length of the list thus doubles. The positive image is always placed before the negative.

Definition at line 340 of file naco_spc.c.

char* naco_spc_make_tag ( const cpl_frame *  self,
const cpl_propertylist *  plist,
int  dummy 
)

Create a string suitable for frame comparison in spectroscopy.

Parameters:
self Frame to create the new tag from
plist The propertylist of the frame
dummy A non-negative number (required in the API, but unused here)
Returns:
Comparison string or NULL on error
Note:
The comparison string must be deallocated with cpl_free().

The tag currently concatenates the SPECMODE, OPTI1.ID, CWLEN and DIT.

Definition at line 407 of file naco_spc.c.

cpl_error_code naco_imagelist_load_diff ( cpl_imagelist *  self,
const irplib_framelist *  onofflist,
const cpl_propertylist *  onoffkeys 
)

Fill the list of difference images from on/off frames.

Parameters:
self The imagelist to fill
onofflist The list of frames with the on/off-frames
onoffkeys The on/off keys, positive: on; 0: off; neg.: don't care
Returns:
CPL_ERROR_NONE on success, otherwise the relevant CPL error code

The integer properties in onoffkeys specify which keys in the frames to check for the on/off status. In the propertylists of the frames keys of type boolean are assumed to indicate an on-state iff true, keys of numerical type are assumed to indicate an on-state iff positive, keys of other types (string) are not supported.

For an off-frame all on/offs specified in onoffkeys must be off.

For an on-frame at least one on/off specified in onoffkeys must be on.

Additionally for the on-frames the requirement of each individual on/off must be met. These requirements are defined by the values of the integer type properties in onoffkeys: 1) A positive property value means that the state must be on, 2) A property value of 0 means that the state must be off, 3) A negative property value means that state may be either on or off. This implies that onoffkeys must have at least one property with a non-zero value.

All frames must have identical NAXIS* and DIT.

Definition at line 482 of file naco_spc.c.

References irplib_framelist_contains(), irplib_framelist_get_const(), and irplib_framelist_get_size().

Generated on Mon Feb 17 15:01:45 2014 for NACO Pipeline Reference Manual by  doxygen 1.6.3