X-shooter Pipeline Reference Manual 3.8.15
Data Structures | Macros | Enumerations | Functions
xsh_data_instrument.h File Reference
#include <cpl.h>

Go to the source code of this file.

Data Structures

struct  XSH_INSTRCONFIG
 
struct  xsh_instrument
 

Macros

#define XSH_ORDERS_NIR   16
 
#define XSH_ORDER_MIN_NIR   11
 
#define XSH_ORDER_MAX_NIR   26
 
#define XSH_ORDERS_UVB   12
 
#define XSH_ORDERS_UVB_QTH   8
 
#define XSH_ORDERS_UVB_D2   4
 
#define XSH_ORDER_MIN_UVB   13
 
#define XSH_ORDER_MAX_UVB   24
 
#define XSH_ORDER_MIN_UVB_D2   21
 
#define XSH_ORDER_MAX_UVB_D2   XSH_ORDER_MAX_UVB
 
#define XSH_ORDER_MIN_UVB_QTH   XSH_ORDER_MIN_UVB
 
#define XSH_ORDER_MAX_UVB_QTH   XSH_ORDER_MIN_UVB_D2 -1
 
#define XSH_ORDERS_VIS   15
 
#define XSH_ORDER_MIN_VIS   16
 
#define XSH_ORDER_MAX_VIS   30
 
#define XSH_ORDERS_UNDEFINED   0
 
#define XSH_NB_PINHOLE   9
 
#define XSH_ARCSEC_NIR   0.2
 
#define XSH_ARCSEC_UVB   0.14
 
#define XSH_ARCSEC_VIS   0.135
 
#define MIN_SLIT   -5.3
 
#define MAX_SLIT   5.7
 
#define LENGTH_SLIT   11.
 
#define BASE_MIN_SLIT   -5.5
 
#define BASE_MAX_SLIT   5.5
 
#define MIN_SLIT_IFU   -6.0
 
#define MAX_SLIT_IFU   6.0
 
#define LENGTH_SLIT_IFU   12
 
#define WIDTH_SLIT_IFU   0.6
 
#define CHECK_POS_IN_SLIT(pos)
 
#define IFU_SCALE   0.03925
 
#define IFU_MAP_LEFT_C0X   (-0.6*IFU_SCALE)
 
#define IFU_MAP_LEFT_C1X   -1.0
 
#define IFU_MAP_LEFT_C2X   0.0
 
#define IFU_MAP_CEN_C0X   0.0
 
#define IFU_MAP_CEN_C1X   1.0
 
#define IFU_MAP_CEN_C2X   0.0
 
#define IFU_MAP_RIGHT_C0X   (0.6*IFU_SCALE)
 
#define IFU_MAP_RIGHT_C1X   -1.0
 
#define IFU_MAP_RIGHT_C2X   0.0
 
#define IFU_MAP_LEFT_C0Y   (4.0*IFU_SCALE)
 
#define IFU_MAP_LEFT_C1Y   -1.0
 
#define IFU_MAP_LEFT_C2Y   0.0
 
#define IFU_MAP_CEN_C0Y   0.0
 
#define IFU_MAP_CEN_C1Y   1.0
 
#define IFU_MAP_CEN_C2Y   0.0
 
#define IFU_MAP_RIGHT_C0Y   (-4.0*IFU_SCALE)
 
#define IFU_MAP_RIGHT_C1Y   -1.0
 
#define IFU_MAP_RIGHT_C2Y   0.0
 
#define IFU_LOW   -2.0
 
#define IFU_HI   2.0
 
#define IFU_LEFT_MIN   -0.9
 
#define IFU_LEFT_MAX   -0.3
 
#define IFU_CEN_MIN   -0.3
 
#define IFU_CEN_MAX   0.3
 
#define IFU_RIGHT_MIN   0.3
 
#define IFU_RIGHT_MAX   0.9
 
#define XSH_NAME_LAMP_MODE_ARM(name, id, ext, instr)    XSH_NAME_PREFIX_LAMP_MODE_ARM( name, "", id, ext, instr)
 
#define XSH_NAME_PREFIX_LAMP_MODE_ARM(name, prefix, id, ext, instr)
 

Enumerations

enum  XSH_MODE { XSH_MODE_IFU , XSH_MODE_SLIT , XSH_MODE_UNDEFINED }
 
enum  XSH_ARM {
  XSH_ARM_UVB , XSH_ARM_VIS , XSH_ARM_NIR , XSH_ARM_AGC ,
  XSH_ARM_UNDEFINED
}
 
enum  XSH_LAMP {
  XSH_LAMP_QTH , XSH_LAMP_D2 , XSH_LAMP_THAR , XSH_LAMP_QTH_D2 ,
  XSH_LAMP_UNDEFINED
}
 

Functions

xsh_instrumentxsh_instrument_new (void)
 create new instrument structure
 
void xsh_instrument_free (xsh_instrument **)
 free an instrument structure
 
xsh_instrumentxsh_instrument_duplicate (xsh_instrument *instrument)
 
void xsh_instrument_set_mode (xsh_instrument *i, XSH_MODE mode)
 Set a mode on instrument structure.
 
void xsh_instrument_set_decode_bp (xsh_instrument *i, const int decode_bp)
 Set bad pixel code.
 
void xsh_instrument_set_arm (xsh_instrument *i, XSH_ARM arm)
 Set an arm on instrument structure.
 
void xsh_instrument_set_lamp (xsh_instrument *i, XSH_LAMP lamp)
 Set a lamp on instrument structure.
 
void xsh_instrument_set_recipe_id (xsh_instrument *i, const char *recipe_id)
 Set the recipe_id into the instrument structure.
 
void xsh_instrument_update_lamp (xsh_instrument *i, XSH_LAMP lamp)
 
void xsh_instrument_update_from_spectralformat (xsh_instrument *i, cpl_frame *spectralformat_frame)
 
XSH_MODE xsh_instrument_get_mode (xsh_instrument *i)
 Get a mode on instrument structure.
 
XSH_ARM xsh_instrument_get_arm (xsh_instrument *i)
 Get an arm on instrument structure.
 
XSH_LAMP xsh_instrument_get_lamp (xsh_instrument *i)
 Get a lamp on instrument structure.
 
XSH_INSTRCONFIGxsh_instrument_get_config (xsh_instrument *i)
 Get the instrument default set of keywords.
 
int xsh_instrument_get_binx (xsh_instrument *instrument)
 
int xsh_instrument_get_biny (xsh_instrument *instrument)
 
XSH_ARM xsh_arm_get (const char *tag)
 get the arm from the frame tag
 
XSH_MODE xsh_mode_get (const char *tag)
 get the mode from the frame tag
 
XSH_LAMP xsh_lamp_get (const char *tag)
 get the lamp from the frame tag
 
double xsh_arcsec_get (xsh_instrument *instrument)
 Get the Arc seconds per pixel for this Arm.
 
double xsh_resolution_get (xsh_instrument *instrument, double slit)
 Get the resoltion.
 
void xsh_instrument_parse_tag (xsh_instrument *inst, const char *tag)
 analyse a frame tag to set data in instrument structure
 
const char * xsh_instrument_mode_tostring (xsh_instrument *i)
 Get the string associated with a mode.
 
const char * xsh_instrument_arm_tostring (xsh_instrument *i)
 Get the string associated with an arm.
 
const char * xsh_instrument_lamp_tostring (xsh_instrument *i)
 Get the string associated with a lamp.
 
const char * xsh_mode_tostring (XSH_MODE mode)
 Get the string associated with a mode.
 
const char * xsh_arm_tostring (XSH_ARM arm)
 Get the string associated with an arm.
 
const char * xsh_lamp_tostring (XSH_LAMP lamp)
 Get the string associated with a lamp.
 
void xsh_instrument_set_binx (xsh_instrument *instrument, const int binx)
 
void xsh_instrument_set_biny (xsh_instrument *instrument, const int biny)
 
void xsh_mode_set (xsh_instrument *instrument, XSH_MODE mode)
 set the instrument mode as user specifies
 
cpl_error_code xsh_instrument_nir_corr_if_JH (cpl_frameset *raws, xsh_instrument *instr)
 
int xsh_instrument_nir_is_JH (cpl_frame *frm, xsh_instrument *instr)
 
cpl_error_code xsh_instrument_nir_corr_if_spectral_format_is_JH (cpl_frameset *calib, xsh_instrument *instr)
 

Macro Definition Documentation

◆ BASE_MAX_SLIT

#define BASE_MAX_SLIT   5.5

Definition at line 80 of file xsh_data_instrument.h.

◆ BASE_MIN_SLIT

#define BASE_MIN_SLIT   -5.5

Definition at line 79 of file xsh_data_instrument.h.

◆ CHECK_POS_IN_SLIT

#define CHECK_POS_IN_SLIT (   pos)
Value:
if ( (pos < MIN_SLIT_IFU) || (pos > MAX_SLIT_IFU)){\
xsh_error_msg( "Invalid slit position %f : not in [%f,%f]"\
}
#define MIN_SLIT_IFU
#define MAX_SLIT_IFU

Definition at line 88 of file xsh_data_instrument.h.

◆ IFU_CEN_MAX

#define IFU_CEN_MAX   0.3

Definition at line 122 of file xsh_data_instrument.h.

◆ IFU_CEN_MIN

#define IFU_CEN_MIN   -0.3

Definition at line 121 of file xsh_data_instrument.h.

◆ IFU_HI

#define IFU_HI   2.0

Definition at line 118 of file xsh_data_instrument.h.

◆ IFU_LEFT_MAX

#define IFU_LEFT_MAX   -0.3

Definition at line 120 of file xsh_data_instrument.h.

◆ IFU_LEFT_MIN

#define IFU_LEFT_MIN   -0.9

Definition at line 119 of file xsh_data_instrument.h.

◆ IFU_LOW

#define IFU_LOW   -2.0

Definition at line 117 of file xsh_data_instrument.h.

◆ IFU_MAP_CEN_C0X

#define IFU_MAP_CEN_C0X   0.0

Definition at line 99 of file xsh_data_instrument.h.

◆ IFU_MAP_CEN_C0Y

#define IFU_MAP_CEN_C0Y   0.0

Definition at line 109 of file xsh_data_instrument.h.

◆ IFU_MAP_CEN_C1X

#define IFU_MAP_CEN_C1X   1.0

Definition at line 100 of file xsh_data_instrument.h.

◆ IFU_MAP_CEN_C1Y

#define IFU_MAP_CEN_C1Y   1.0

Definition at line 110 of file xsh_data_instrument.h.

◆ IFU_MAP_CEN_C2X

#define IFU_MAP_CEN_C2X   0.0

Definition at line 101 of file xsh_data_instrument.h.

◆ IFU_MAP_CEN_C2Y

#define IFU_MAP_CEN_C2Y   0.0

Definition at line 111 of file xsh_data_instrument.h.

◆ IFU_MAP_LEFT_C0X

#define IFU_MAP_LEFT_C0X   (-0.6*IFU_SCALE)

Definition at line 96 of file xsh_data_instrument.h.

◆ IFU_MAP_LEFT_C0Y

#define IFU_MAP_LEFT_C0Y   (4.0*IFU_SCALE)

Definition at line 106 of file xsh_data_instrument.h.

◆ IFU_MAP_LEFT_C1X

#define IFU_MAP_LEFT_C1X   -1.0

Definition at line 97 of file xsh_data_instrument.h.

◆ IFU_MAP_LEFT_C1Y

#define IFU_MAP_LEFT_C1Y   -1.0

Definition at line 107 of file xsh_data_instrument.h.

◆ IFU_MAP_LEFT_C2X

#define IFU_MAP_LEFT_C2X   0.0

Definition at line 98 of file xsh_data_instrument.h.

◆ IFU_MAP_LEFT_C2Y

#define IFU_MAP_LEFT_C2Y   0.0

Definition at line 108 of file xsh_data_instrument.h.

◆ IFU_MAP_RIGHT_C0X

#define IFU_MAP_RIGHT_C0X   (0.6*IFU_SCALE)

Definition at line 102 of file xsh_data_instrument.h.

◆ IFU_MAP_RIGHT_C0Y

#define IFU_MAP_RIGHT_C0Y   (-4.0*IFU_SCALE)

Definition at line 112 of file xsh_data_instrument.h.

◆ IFU_MAP_RIGHT_C1X

#define IFU_MAP_RIGHT_C1X   -1.0

Definition at line 103 of file xsh_data_instrument.h.

◆ IFU_MAP_RIGHT_C1Y

#define IFU_MAP_RIGHT_C1Y   -1.0

Definition at line 113 of file xsh_data_instrument.h.

◆ IFU_MAP_RIGHT_C2X

#define IFU_MAP_RIGHT_C2X   0.0

Definition at line 104 of file xsh_data_instrument.h.

◆ IFU_MAP_RIGHT_C2Y

#define IFU_MAP_RIGHT_C2Y   0.0

Definition at line 114 of file xsh_data_instrument.h.

◆ IFU_RIGHT_MAX

#define IFU_RIGHT_MAX   0.9

Definition at line 124 of file xsh_data_instrument.h.

◆ IFU_RIGHT_MIN

#define IFU_RIGHT_MIN   0.3

Definition at line 123 of file xsh_data_instrument.h.

◆ IFU_SCALE

#define IFU_SCALE   0.03925

Definition at line 95 of file xsh_data_instrument.h.

◆ LENGTH_SLIT

#define LENGTH_SLIT   11.

Definition at line 78 of file xsh_data_instrument.h.

◆ LENGTH_SLIT_IFU

#define LENGTH_SLIT_IFU   12

Definition at line 85 of file xsh_data_instrument.h.

◆ MAX_SLIT

#define MAX_SLIT   5.7

Definition at line 76 of file xsh_data_instrument.h.

◆ MAX_SLIT_IFU

#define MAX_SLIT_IFU   6.0

Definition at line 84 of file xsh_data_instrument.h.

◆ MIN_SLIT

#define MIN_SLIT   -5.3

Definition at line 75 of file xsh_data_instrument.h.

◆ MIN_SLIT_IFU

#define MIN_SLIT_IFU   -6.0

Definition at line 83 of file xsh_data_instrument.h.

◆ WIDTH_SLIT_IFU

#define WIDTH_SLIT_IFU   0.6

Definition at line 86 of file xsh_data_instrument.h.

◆ XSH_ARCSEC_NIR

#define XSH_ARCSEC_NIR   0.2

Definition at line 66 of file xsh_data_instrument.h.

◆ XSH_ARCSEC_UVB

#define XSH_ARCSEC_UVB   0.14

Definition at line 67 of file xsh_data_instrument.h.

◆ XSH_ARCSEC_VIS

#define XSH_ARCSEC_VIS   0.135

Definition at line 68 of file xsh_data_instrument.h.

◆ XSH_NAME_LAMP_MODE_ARM

#define XSH_NAME_LAMP_MODE_ARM (   name,
  id,
  ext,
  instr 
)     XSH_NAME_PREFIX_LAMP_MODE_ARM( name, "", id, ext, instr)

Definition at line 197 of file xsh_data_instrument.h.

◆ XSH_NAME_PREFIX_LAMP_MODE_ARM

#define XSH_NAME_PREFIX_LAMP_MODE_ARM (   name,
  prefix,
  id,
  ext,
  instr 
)
Value:
XSH_FREE( name);\
XSH_ASSURE_NOT_NULL( prefix);\
name = xsh_stringcat_any( prefix, id, "_", \
, "_", xsh_instrument_mode_tostring( instr),"_", \
xsh_instrument_arm_tostring( instr), ext, "");\
}\
else{\
name = xsh_stringcat_any( prefix, id, "_",\
xsh_instrument_arm_tostring( instr), ext, "");\
}\
}\
else{\
name = xsh_stringcat_any( prefix, id, "_",\
xsh_instrument_arm_tostring( instr), ext, "");\
}\
XSH_ASSURE_NOT_NULL( name)
const char * xsh_instrument_mode_tostring(xsh_instrument *i)
Get the string associated with a mode.
const char * xsh_instrument_arm_tostring(xsh_instrument *i)
Get the string associated with an arm.
XSH_LAMP xsh_instrument_get_lamp(xsh_instrument *i)
Get a lamp on instrument structure.
XSH_MODE xsh_instrument_get_mode(xsh_instrument *i)
Get a mode on instrument structure.
const char * xsh_instrument_lamp_tostring(xsh_instrument *i)
Get the string associated with a lamp.
char * xsh_stringcat_any(const char *s,...)
Concatenate an arbitrary number of strings.
Definition: xsh_utils.c:1925
@ XSH_LAMP_UNDEFINED
@ XSH_MODE_UNDEFINED
#define XSH_FREE(POINTER)
Definition: xsh_utils.h:92

Definition at line 200 of file xsh_data_instrument.h.

◆ XSH_NB_PINHOLE

#define XSH_NB_PINHOLE   9

Definition at line 63 of file xsh_data_instrument.h.

◆ XSH_ORDER_MAX_NIR

#define XSH_ORDER_MAX_NIR   26

Definition at line 44 of file xsh_data_instrument.h.

◆ XSH_ORDER_MAX_UVB

#define XSH_ORDER_MAX_UVB   24

Definition at line 51 of file xsh_data_instrument.h.

◆ XSH_ORDER_MAX_UVB_D2

#define XSH_ORDER_MAX_UVB_D2   XSH_ORDER_MAX_UVB

Definition at line 53 of file xsh_data_instrument.h.

◆ XSH_ORDER_MAX_UVB_QTH

#define XSH_ORDER_MAX_UVB_QTH   XSH_ORDER_MIN_UVB_D2 -1

Definition at line 55 of file xsh_data_instrument.h.

◆ XSH_ORDER_MAX_VIS

#define XSH_ORDER_MAX_VIS   30

Definition at line 59 of file xsh_data_instrument.h.

◆ XSH_ORDER_MIN_NIR

#define XSH_ORDER_MIN_NIR   11

Definition at line 43 of file xsh_data_instrument.h.

◆ XSH_ORDER_MIN_UVB

#define XSH_ORDER_MIN_UVB   13

Definition at line 50 of file xsh_data_instrument.h.

◆ XSH_ORDER_MIN_UVB_D2

#define XSH_ORDER_MIN_UVB_D2   21

Definition at line 52 of file xsh_data_instrument.h.

◆ XSH_ORDER_MIN_UVB_QTH

#define XSH_ORDER_MIN_UVB_QTH   XSH_ORDER_MIN_UVB

Definition at line 54 of file xsh_data_instrument.h.

◆ XSH_ORDER_MIN_VIS

#define XSH_ORDER_MIN_VIS   16

Definition at line 58 of file xsh_data_instrument.h.

◆ XSH_ORDERS_NIR

#define XSH_ORDERS_NIR   16

Definition at line 42 of file xsh_data_instrument.h.

◆ XSH_ORDERS_UNDEFINED

#define XSH_ORDERS_UNDEFINED   0

Definition at line 61 of file xsh_data_instrument.h.

◆ XSH_ORDERS_UVB

#define XSH_ORDERS_UVB   12

Definition at line 46 of file xsh_data_instrument.h.

◆ XSH_ORDERS_UVB_D2

#define XSH_ORDERS_UVB_D2   4

Definition at line 48 of file xsh_data_instrument.h.

◆ XSH_ORDERS_UVB_QTH

#define XSH_ORDERS_UVB_QTH   8

Definition at line 47 of file xsh_data_instrument.h.

◆ XSH_ORDERS_VIS

#define XSH_ORDERS_VIS   15

Definition at line 57 of file xsh_data_instrument.h.

Enumeration Type Documentation

◆ XSH_ARM

enum XSH_ARM
Enumerator
XSH_ARM_UVB 
XSH_ARM_VIS 
XSH_ARM_NIR 
XSH_ARM_AGC 
XSH_ARM_UNDEFINED 

Definition at line 133 of file xsh_data_instrument.h.

◆ XSH_LAMP

enum XSH_LAMP
Enumerator
XSH_LAMP_QTH 
XSH_LAMP_D2 
XSH_LAMP_THAR 
XSH_LAMP_QTH_D2 
XSH_LAMP_UNDEFINED 

Definition at line 141 of file xsh_data_instrument.h.

◆ XSH_MODE

enum XSH_MODE
Enumerator
XSH_MODE_IFU 
XSH_MODE_SLIT 
XSH_MODE_UNDEFINED 

Definition at line 126 of file xsh_data_instrument.h.