/home/amodigli/releases/xsh/2.1.1/xsh.30433/xshp/xsh/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

Defines

#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_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)

Define Documentation

#define BASE_MAX_SLIT   5.5

Definition at line 80 of file xsh_data_instrument.h.

#define BASE_MIN_SLIT   -5.5

Definition at line 79 of file xsh_data_instrument.h.

#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]"\
      ,pos, MIN_SLIT_IFU, MAX_SLIT_IFU);\
  }

Definition at line 88 of file xsh_data_instrument.h.

#define IFU_CEN_MAX   0.3

Definition at line 122 of file xsh_data_instrument.h.

Referenced by xsh_model_maps_create().

#define IFU_CEN_MIN   -0.3

Definition at line 121 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu(), and xsh_model_maps_create().

#define IFU_HI   2.0
#define IFU_LEFT_MAX   -0.3

Definition at line 120 of file xsh_data_instrument.h.

Referenced by xsh_model_maps_create().

#define IFU_LEFT_MIN   -0.9

Definition at line 119 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu(), and xsh_model_maps_create().

#define IFU_LOW   -2.0
#define IFU_MAP_CEN_C0X   0.0

Definition at line 99 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_CEN_C0Y   0.0

Definition at line 109 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_CEN_C1X   1.0

Definition at line 100 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_CEN_C1Y   1.0

Definition at line 110 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_CEN_C2X   0.0

Definition at line 101 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_CEN_C2Y   0.0

Definition at line 111 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_LEFT_C0X   (-0.6*IFU_SCALE)

Definition at line 96 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_LEFT_C0Y   (4.0*IFU_SCALE)

Definition at line 106 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_LEFT_C1X   -1.0

Definition at line 97 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_LEFT_C1Y   -1.0

Definition at line 107 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_LEFT_C2X   0.0

Definition at line 98 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_LEFT_C2Y   0.0

Definition at line 108 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_RIGHT_C0X   (0.6*IFU_SCALE)

Definition at line 102 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_RIGHT_C0Y   (-4.0*IFU_SCALE)

Definition at line 112 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_RIGHT_C1X   -1.0

Definition at line 103 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_RIGHT_C1Y   -1.0

Definition at line 113 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_RIGHT_C2X   0.0

Definition at line 104 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_MAP_RIGHT_C2Y   0.0

Definition at line 114 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define IFU_RIGHT_MAX   0.9

Definition at line 124 of file xsh_data_instrument.h.

Referenced by xsh_model_maps_create().

#define IFU_RIGHT_MIN   0.3

Definition at line 123 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu(), and xsh_model_maps_create().

#define IFU_SCALE   0.03925

Definition at line 95 of file xsh_data_instrument.h.

Referenced by xsh_model_map_ifu().

#define LENGTH_SLIT   11.

Definition at line 78 of file xsh_data_instrument.h.

#define LENGTH_SLIT_IFU   12

Definition at line 85 of file xsh_data_instrument.h.

#define MAX_SLIT   5.7
#define MAX_SLIT_IFU   6.0

Definition at line 84 of file xsh_data_instrument.h.

#define MIN_SLIT   -5.3
#define MIN_SLIT_IFU   -6.0

Definition at line 83 of file xsh_data_instrument.h.

#define WIDTH_SLIT_IFU   0.6

Definition at line 86 of file xsh_data_instrument.h.

Referenced by xsh_calibrate_flux().

#define XSH_ARCSEC_NIR   0.2

Definition at line 66 of file xsh_data_instrument.h.

Referenced by xsh_arcsec_get(), and xsh_localize_obj_auto().

#define XSH_ARCSEC_UVB   0.14

Definition at line 67 of file xsh_data_instrument.h.

Referenced by xsh_arcsec_get(), and xsh_localize_obj_auto().

#define XSH_ARCSEC_VIS   0.135

Definition at line 68 of file xsh_data_instrument.h.

Referenced by xsh_arcsec_get(), and xsh_localize_obj_auto().

#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   ) 
Value:
XSH_FREE( name);\
  XSH_ASSURE_NOT_NULL( prefix);\
  if ( xsh_instrument_get_mode( instr) != XSH_MODE_UNDEFINED){\
    if (xsh_instrument_get_lamp( instr) != XSH_LAMP_UNDEFINED){\
      name = xsh_stringcat_any( prefix, id, "_", \
        xsh_instrument_lamp_tostring( instr)\
        , "_", xsh_instrument_mode_tostring( instr),"_", \
        xsh_instrument_arm_tostring( instr), ext, "");\
    }\
    else{\
      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, "");\
  }\
  XSH_ASSURE_NOT_NULL( name)

Definition at line 199 of file xsh_data_instrument.h.

Referenced by xsh_subtract_background().

#define XSH_NB_PINHOLE   9

Definition at line 63 of file xsh_data_instrument.h.

Referenced by xsh_pfits_get_nb_pinhole().

#define XSH_ORDER_MAX_NIR   26

Definition at line 44 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDER_MAX_UVB   24

Definition at line 51 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDER_MAX_UVB_D2   XSH_ORDER_MAX_UVB

Definition at line 53 of file xsh_data_instrument.h.

#define XSH_ORDER_MAX_UVB_QTH   XSH_ORDER_MIN_UVB_D2 -1

Definition at line 55 of file xsh_data_instrument.h.

Referenced by xsh_order_split_qth_d2().

#define XSH_ORDER_MAX_VIS   30

Definition at line 59 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDER_MIN_NIR   11

Definition at line 43 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDER_MIN_UVB   13

Definition at line 50 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDER_MIN_UVB_D2   21

Definition at line 52 of file xsh_data_instrument.h.

Referenced by xsh_order_split_qth_d2().

#define XSH_ORDER_MIN_UVB_QTH   XSH_ORDER_MIN_UVB

Definition at line 54 of file xsh_data_instrument.h.

#define XSH_ORDER_MIN_VIS   16

Definition at line 58 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDERS_NIR   16
#define XSH_ORDERS_UNDEFINED   0

Definition at line 61 of file xsh_data_instrument.h.

#define XSH_ORDERS_UVB   12
#define XSH_ORDERS_UVB_D2   4

Definition at line 48 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDERS_UVB_QTH   8

Definition at line 47 of file xsh_data_instrument.h.

Referenced by xsh_instrument_new().

#define XSH_ORDERS_VIS   15

Enumeration Type Documentation

enum XSH_ARM
Enumerator:
XSH_ARM_UVB 
XSH_ARM_VIS 
XSH_ARM_NIR 
XSH_ARM_UNDEFINED 

Definition at line 133 of file xsh_data_instrument.h.

enum XSH_LAMP
Enumerator:
XSH_LAMP_QTH 
XSH_LAMP_D2 
XSH_LAMP_THAR 
XSH_LAMP_QTH_D2 
XSH_LAMP_UNDEFINED 

Definition at line 140 of file xsh_data_instrument.h.

enum XSH_MODE
Enumerator:
XSH_MODE_IFU 
XSH_MODE_SLIT 
XSH_MODE_UNDEFINED 

Definition at line 126 of file xsh_data_instrument.h.


Generated on 13 Mar 2013 for X-shooter Pipeline Reference Manual by  doxygen 1.6.1