X-shooter Pipeline Reference Manual 3.8.15
Macros | Functions

Macros

#define XSH_MAX_SHIFT_Y   10.
 

Functions

xsh_linetilt_listxsh_linetilt_list_new (int size, cpl_propertylist *header)
 
void xsh_linetilt_list_free (xsh_linetilt_list **list)
 free memory associated to a arclist
 
void xsh_linetilt_free (xsh_linetilt **tilt)
 free memory associated to a linetilt
 
xsh_linetiltxsh_linetilt_new (void)
 
void xsh_linetilt_list_add (xsh_linetilt_list *list, xsh_linetilt *line, int idx)
 
cpl_frame * xsh_linetilt_list_save (xsh_linetilt_list *list, xsh_instrument *instr, const char *filename, const char *tag, const double kappa, const int niter, float exptime)
 save a (ks clip clean) linetilt list to a frame
 
double * xsh_linetilt_list_get_posx (xsh_linetilt_list *list)
 get the X central positions. The returned array must be deallocated by the caller.
 
double * xsh_linetilt_list_get_posy (xsh_linetilt_list *list)
 get the Y central positions. The returned array must be deallocated by the caller.
 
double * xsh_linetilt_list_get_deltay (xsh_linetilt_list *list)
 get the Y Delta. The returned array must be deallocated by the caller.
 
double * xsh_linetilt_list_get_sigma_y (xsh_linetilt_list *list)
 get the Y sigma. The returned array must be deallocated by the caller.
 
double * xsh_linetilt_list_get_pre_posy (xsh_linetilt_list *list)
 get the previous Y positions. The returned array must be deallocated by the caller.
 
double * xsh_linetilt_list_get_orders (xsh_linetilt_list *list)
 get the orders . The returned array must be deallocated by the caller.
 
double * xsh_linetilt_list_get_wavelengths (xsh_linetilt_list *list)
 get the wavelength . The returned array must be deallocated by the caller.
 
double * xsh_linetilt_list_get_slits (xsh_linetilt_list *list)
 get the slits . The returned array must be deallocated by the caller.
 
int * xsh_linetilt_list_get_slit_index (xsh_linetilt_list *list)
 get the slit_index array . The returned array must be deallocated by the caller.
 
cpl_propertylist * xsh_linetilt_list_get_header (xsh_linetilt_list *list)
 
int xsh_linetilt_is_duplicate (xsh_linetilt_list *list, float lambda, int order)
 

Detailed Description

Macro Definition Documentation

◆ XSH_MAX_SHIFT_Y

#define XSH_MAX_SHIFT_Y   10.

Definition at line 57 of file xsh_data_linetilt.c.

Function Documentation

◆ xsh_linetilt_free()

void xsh_linetilt_free ( xsh_linetilt **  tilt)

free memory associated to a linetilt

Parameters
tiltthe linetilt to free

Definition at line 109 of file xsh_data_linetilt.c.

Referenced by xsh_linetilt_list_free().

◆ xsh_linetilt_is_duplicate()

int xsh_linetilt_is_duplicate ( xsh_linetilt_list list,
float  lambda,
int  order 
)

Check if a given wavelength/order pair is already in the list.

Parameters
listLinetilt list
lambdaWavelength
orderOrder
Returns
0 if the wavelength/order is already in the list, 1 otherwise

Definition at line 652 of file xsh_data_linetilt.c.

References xsh_linetilt_list::list, xsh_linetilt::order, order, xsh_linetilt_list::size, xsh_linetilt::wavelength, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_add()

void xsh_linetilt_list_add ( xsh_linetilt_list list,
xsh_linetilt line,
int  idx 
)

Add a new entry to a linetilt list.

Parameters
listLinetilt Liste
linePointer to the linetilt to add
idxIndex where to add the linetilt

Definition at line 137 of file xsh_data_linetilt.c.

References xsh_linetilt_list::list, xsh_linetilt_list::size, and XSH_ASSURE_NOT_NULL.

Referenced by xsh_follow_arclines().

◆ xsh_linetilt_list_free()

void xsh_linetilt_list_free ( xsh_linetilt_list **  list)

free memory associated to a arclist

Parameters
listthe arclist to free

Definition at line 86 of file xsh_data_linetilt.c.

References xsh_free_propertylist(), and xsh_linetilt_free().

Referenced by xsh_follow_arclines().

◆ xsh_linetilt_list_get_deltay()

double * xsh_linetilt_list_get_deltay ( xsh_linetilt_list list)

get the Y Delta. The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of Y delta

Definition at line 464 of file xsh_data_linetilt.c.

References check, xsh_linetilt::deltay, xsh_linetilt_list::list, xsh_linetilt_list::size, size, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_header()

cpl_propertylist * xsh_linetilt_list_get_header ( xsh_linetilt_list list)

Returns a pointer to the propertylist. MUST not be deallocated directly by the caller (use xsh_linetilt_free).

Parameters
listLinetilt List
Returns
Pointer to the propertylist

Definition at line 631 of file xsh_data_linetilt.c.

References xsh_linetilt_list::header, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_orders()

double * xsh_linetilt_list_get_orders ( xsh_linetilt_list list)

get the orders . The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of orders

Definition at line 539 of file xsh_data_linetilt.c.

References check, xsh_linetilt_list::list, xsh_linetilt::order, xsh_linetilt_list::size, size, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_posx()

double * xsh_linetilt_list_get_posx ( xsh_linetilt_list list)

get the X central positions. The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of X positions

Definition at line 418 of file xsh_data_linetilt.c.

References xsh_linetilt::cenposx, check, xsh_linetilt_list::list, xsh_linetilt_list::size, size, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_posy()

double * xsh_linetilt_list_get_posy ( xsh_linetilt_list list)

get the Y central positions. The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of Y positions

Definition at line 441 of file xsh_data_linetilt.c.

References xsh_linetilt::cenposy, check, xsh_linetilt_list::list, xsh_linetilt_list::size, size, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_pre_posy()

double * xsh_linetilt_list_get_pre_posy ( xsh_linetilt_list list)

get the previous Y positions. The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of previous Y positions

Definition at line 514 of file xsh_data_linetilt.c.

References check, xsh_linetilt_list::list, xsh_linetilt::pre_pos_y, xsh_linetilt_list::size, size, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_sigma_y()

double * xsh_linetilt_list_get_sigma_y ( xsh_linetilt_list list)

get the Y sigma. The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of Y sigma

Definition at line 489 of file xsh_data_linetilt.c.

References check, xsh_linetilt::chisq, xsh_linetilt_list::list, xsh_linetilt_list::size, size, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_slit_index()

int * xsh_linetilt_list_get_slit_index ( xsh_linetilt_list list)

get the slit_index array . The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of slit indexes

Definition at line 608 of file xsh_data_linetilt.c.

References check, xsh_linetilt_list::list, xsh_linetilt_list::size, size, xsh_linetilt::slit_index, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_slits()

double * xsh_linetilt_list_get_slits ( xsh_linetilt_list list)

get the slits . The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of orders

Definition at line 585 of file xsh_data_linetilt.c.

References check, xsh_linetilt_list::list, xsh_linetilt_list::size, size, xsh_linetilt::slit, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_get_wavelengths()

double * xsh_linetilt_list_get_wavelengths ( xsh_linetilt_list list)

get the wavelength . The returned array must be deallocated by the caller.

Parameters
listThe tilt-list
Returns
return a created array of orders

Definition at line 562 of file xsh_data_linetilt.c.

References check, xsh_linetilt_list::list, xsh_linetilt_list::size, size, xsh_linetilt::wavelength, and XSH_ASSURE_NOT_NULL.

◆ xsh_linetilt_list_new()

xsh_linetilt_list * xsh_linetilt_list_new ( int  size,
cpl_propertylist *  header 
)

◆ xsh_linetilt_list_save()

cpl_frame * xsh_linetilt_list_save ( xsh_linetilt_list list,
xsh_instrument instr,
const char *  filename,
const char *  tag,
const double  kappa,
const int  niter,
float  exptime 
)

save a (ks clip clean) linetilt list to a frame

Parameters
listthe linetilt list structure to save
instrPointer to instrument description structure
filenamethe name of the save file on disk
tagthe pro catg of the save file on disk
kappakappa value of ks clip
niterniter value of ks clip
Returns
a newly allocated frame

Definition at line 160 of file xsh_data_linetilt.c.

References xsh_linetilt::area, xsh_linetilt::cenposx, xsh_linetilt::cenposy, check, xsh_linetilt::chisq, xsh_linetilt::deltay, exptime, xsh_linetilt::flag, xsh_linetilt_list::header, xsh_linetilt::intensity, kappa, xsh_linetilt_list::list, xsh_linetilt::name, niter, xsh_linetilt::order, xsh_linetilt::pre_pos_y, QC_WAVECAL_DIFFYAVG, QC_WAVECAL_DIFFYMED, QC_WAVECAL_DIFFYSTD, QC_WAVECAL_FWHMAVG, QC_WAVECAL_FWHMRMS, QC_WAVECAL_LININT_NORM, QC_WAVECAL_NLININT, xsh_linetilt::shift_y, xsh_linetilt_list::size, xsh_linetilt::specres, xsh_linetilt::tilt, xsh_linetilt::tilt_y, xsh_linetilt::wavelength, xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_frame_product(), xsh_free_table(), XSH_GET_TAG_FROM_MODE, XSH_LINETILT_TABLE_COLNAME_CENPOSX, XSH_LINETILT_TABLE_COLNAME_CENPOSY, XSH_LINETILT_TABLE_COLNAME_CHISQ, XSH_LINETILT_TABLE_COLNAME_FLAG, XSH_LINETILT_TABLE_COLNAME_FLUX, XSH_LINETILT_TABLE_COLNAME_FWHM, XSH_LINETILT_TABLE_COLNAME_GAUSSY, XSH_LINETILT_TABLE_COLNAME_INTENSITY, XSH_LINETILT_TABLE_COLNAME_NAME, XSH_LINETILT_TABLE_COLNAME_ORDER, XSH_LINETILT_TABLE_COLNAME_SHIFTY, XSH_LINETILT_TABLE_COLNAME_SPECRES, XSH_LINETILT_TABLE_COLNAME_TILT, XSH_LINETILT_TABLE_COLNAME_TILTY, XSH_LINETILT_TABLE_COLNAME_WAVELENGTH, XSH_LINETILT_TABLE_NB_COL, XSH_LINETILT_TABLE_UNIT_CENPOSX, XSH_LINETILT_TABLE_UNIT_CENPOSY, XSH_LINETILT_TABLE_UNIT_CHISQ, XSH_LINETILT_TABLE_UNIT_FLAG, XSH_LINETILT_TABLE_UNIT_FLUX, XSH_LINETILT_TABLE_UNIT_FWHM, XSH_LINETILT_TABLE_UNIT_GAUSSY, XSH_LINETILT_TABLE_UNIT_INTENSITY, XSH_LINETILT_TABLE_UNIT_NAME, XSH_LINETILT_TABLE_UNIT_ORDER, XSH_LINETILT_TABLE_UNIT_SHIFTY, XSH_LINETILT_TABLE_UNIT_SPECRES, XSH_LINETILT_TABLE_UNIT_TILT, XSH_LINETILT_TABLE_UNIT_TILTY, XSH_LINETILT_TABLE_UNIT_WAVELENGTH, XSH_MAX_SHIFT_Y, xsh_pfits_set_pcatg(), xsh_pfits_set_qc(), XSH_TABLE_FREE, and XSH_TILT_TAB.

Referenced by xsh_follow_arclines().

◆ xsh_linetilt_new()

xsh_linetilt * xsh_linetilt_new ( void  )

Definition at line 120 of file xsh_data_linetilt.c.

References XSH_CALLOC.

Referenced by xsh_follow_arclines().