Instrument Description
[Data Format Handling functions]

Functions

xsh_instrumentxsh_instrument_new (void)
 create new instrument structure
xsh_instrumentxsh_instrument_duplicate (xsh_instrument *old)
void xsh_instrument_free (xsh_instrument **instrument)
 free an instrument structure
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
void xsh_mode_set (xsh_instrument *instrument, XSH_MODE mode)
 set the instrument mode as user specifies
void xsh_decode_bp_set (xsh_instrument *instrument, const int decode_bp)
 set the instrument mode as user specifies
XSH_LAMP xsh_lamp_get (const char *tag)
 get the lamp from the frame tag
void xsh_instrument_parse_tag (xsh_instrument *inst, const char *tag)
 analyse a frame tag to set data in instrument structure
void xsh_instrument_set_decode_bp (xsh_instrument *i, const int decode_bp)
 Set bad pixel code.
void xsh_instrument_set_mode (xsh_instrument *i, XSH_MODE mode)
 Set a mode on instrument structure.
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_update_lamp (xsh_instrument *i, XSH_LAMP lamp)
void xsh_instrument_update_from_spectralformat (xsh_instrument *i, cpl_frame *spectralformat_frame)
void xsh_instrument_set_recipe_id (xsh_instrument *instrument, const char *recipe_id)
 Set the recipe_id into the instrument structure.
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.
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.
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)
void xsh_instrument_set_binx (xsh_instrument *instrument, const int binx)
void xsh_instrument_set_biny (xsh_instrument *instrument, const int biny)
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.
int xsh_instrument_nir_is_JH (cpl_frame *frame, xsh_instrument *instr)
cpl_error_code xsh_instrument_nir_corr_if_JH (cpl_frameset *raws, xsh_instrument *instr)
cpl_error_code xsh_instrument_nir_corr_if_spectral_format_is_JH (cpl_frameset *calib, xsh_instrument *instr)

Function Documentation

double xsh_arcsec_get ( xsh_instrument instrument  ) 

Get the Arc seconds per pixel for this Arm.

Parameters:
instrument Instrument description structure
Returns:
The arcsec value (double)

Definition at line 472 of file xsh_data_instrument.c.

References arm, XSH_ARCSEC_NIR, XSH_ARCSEC_UVB, XSH_ARCSEC_VIS, XSH_ARM_NIR, XSH_ARM_UVB, and XSH_ARM_VIS.

XSH_ARM xsh_arm_get ( const char *  tag  ) 

get the arm from the frame tag

Parameters:
tag (valid by dfs)
Returns:
the detected arm

Definition at line 140 of file xsh_data_instrument.c.

References XSH_ARM_NIR, XSH_ARM_UNDEFINED, XSH_ARM_UVB, and XSH_ARM_VIS.

Referenced by HandleOptions(), xsh_instrument_parse_tag(), and xsh_pfits_get_arm().

const char* xsh_arm_tostring ( XSH_ARM  arm  ) 

Get the string associated with an arm.

Parameters:
arm the arm we use
Returns:
the string symbolized the arm

Definition at line 736 of file xsh_data_instrument.c.

References XSH_ARM_NIR, XSH_ARM_UVB, and XSH_ARM_VIS.

Referenced by xsh_build_ifu_cube(), xsh_ifu_trace_object_calibrate(), xsh_instrument_arm_tostring(), xsh_instrument_set_arm(), xsh_instrument_update_from_spectralformat(), and xsh_util_ifu_build_cube().

void xsh_decode_bp_set ( xsh_instrument instrument,
const int  decode_bp 
)

set the instrument mode as user specifies

Parameters:
instrument instrument structure
mode instrument mode
Returns:
void

Definition at line 184 of file xsh_data_instrument.c.

References decode_bp.

const char* xsh_instrument_arm_tostring ( xsh_instrument i  ) 

Get the string associated with an arm.

Parameters:
i the instrument we use
Returns:
the string symbolized the mode

Definition at line 700 of file xsh_data_instrument.c.

References arm, and xsh_arm_tostring().

Referenced by create_resid_tab(), create_sky_mask(), main(), xsh_2dmap(), xsh_absorp(), xsh_add_sky_model(), xsh_afcthetab_create(), xsh_badpixelmap_crea_master_from_bpmap(), xsh_bpmap_2pre(), xsh_build_ifu_map(), xsh_cfg_recover_last_step(), xsh_check_divide_flat(), xsh_check_get_map(), xsh_check_load_master_bpmap(), xsh_check_remove_crh_single(), xsh_check_subtract_bias(), xsh_check_subtract_sky_single(), xsh_compute_absorp(), xsh_compute_linearity(), xsh_compute_noise_map(), xsh_compute_qc_on_master_bias(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_response_ord(), xsh_compute_shift_ifu(), xsh_compute_slice_dist(), xsh_crea_correct_coeff(), xsh_create_dispersol_physmod(), xsh_create_final_tag(), xsh_create_master_dark(), xsh_create_master_dark2(), xsh_create_master_dark_bpmap(), xsh_cube_qc_trace_window(), xsh_detect_arclines(), xsh_detect_arclines_dan(), xsh_dfs_check_mflat_is_proper(), xsh_dfs_set_groups(), xsh_efficiency_compute(), xsh_find_calpro_model_config(), xsh_find_calpro_model_meas_coord(), xsh_find_model_config_open(), xsh_find_model_testpar(), xsh_find_model_wavelist(), xsh_find_spectral_format(), xsh_fit_gaussian(), xsh_flat_merge_qth_d2(), xsh_flat_merge_qth_d2_smooth(), xsh_flexcomp(), xsh_flux_calibrate1D(), xsh_flux_calibrate2D(), xsh_follow_arclines(), xsh_frame_image_ext_qc_trace_window(), xsh_frame_image_qc_trace_window(), xsh_frameset_crh_single(), xsh_frameset_mflat_divide(), xsh_geom_ifu(), xsh_get_crh_frame(), xsh_get_tag_from_arm(), xsh_image_get_hot_cold_pixs(), xsh_image_local_cold_pixs(), xsh_image_local_hot_pixs(), xsh_instrument_set_arm(), xsh_linear(), xsh_lingain(), xsh_localize_ifu(), xsh_localize_obj(), xsh_localize_obj_ifu(), xsh_mdark(), xsh_mflat(), xsh_model_first_anneal(), xsh_model_order_edges_tab_create(), xsh_model_temperature_update_frame(), xsh_obs_std_correct(), xsh_order_table_from_fmtchk(), xsh_orderpos(), xsh_paf_save(), xsh_pfits_set_arm(), xsh_predict(), xsh_rectify_orders(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod_accurate(), xsh_scired_slit_nod_fast(), xsh_scired_slit_offset(), xsh_scired_slit_stare(), xsh_scired_util_spectra_flux_calibrate(), xsh_slit_stare_correct_crh_and_sky(), xsh_slit_stare_get_maps(), xsh_spectrum_resample(), xsh_subtract_bias(), xsh_subtract_sky_nod(), xsh_subtract_sky_offset(), xsh_subtract_sky_single(), xsh_util_bpmap_coadd(), xsh_util_bpmap_nl_raw2pre(), xsh_util_crh_single(), xsh_util_frameset_collapse_mean(), xsh_utils_efficiency(), xsh_wavecal(), xsh_wavelist_subtract_sky(), and xsh_wavemap_list_new().

xsh_instrument* xsh_instrument_duplicate ( xsh_instrument old  ) 

Definition at line 101 of file xsh_data_instrument.c.

References check, config, and xsh_instrument_new().

Referenced by xsh_rec_list_duplicate().

void xsh_instrument_free ( xsh_instrument **  instrument  ) 
XSH_ARM xsh_instrument_get_arm ( xsh_instrument i  ) 

Get an arm on instrument structure.

Returns:
arm instrument arm in use

Definition at line 450 of file xsh_data_instrument.c.

References arm.

Referenced by compute_abs_order(), do_compute(), main(), xsh_2dmap(), xsh_absorp(), xsh_badpixelmap_flag_saturated_pixels(), xsh_begin(), xsh_bspline_fit(), xsh_bspline_fit_data(), xsh_bspline_fit_data2(), xsh_cfg_recover_last_step(), xsh_check_load_master_bpmap(), xsh_check_subtract_bias(), xsh_compute_absorp(), xsh_compute_noise_map(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_response_ord(), xsh_crea_grid_from_mask(), xsh_crea_grid_from_samples(), xsh_create_master_dark(), xsh_create_master_dark_bpmap(), xsh_create_master_flat_with_mask(), xsh_dfs_set_groups(), xsh_fill_high_abs_regions(), xsh_fill_tell_compute_resid_regions(), xsh_fill_tell_fit_regions(), xsh_flexcomp(), xsh_flexcor(), xsh_frame_sci_get_gain_airmass_exptime_naxis1_biny(), xsh_frame_table_monitor_flux_qc_ext(), xsh_frameset_check_uniform_exptime(), xsh_frameset_uniform_bin(), xsh_gain(), xsh_geom_ifu(), xsh_interpolate_atm_ext(), xsh_lingain(), xsh_lingain_set_saturation_limit(), xsh_localize_obj_auto(), xsh_mdark(), xsh_mdark_get_contam(), xsh_mflat(), xsh_mflat_combine_flats(), xsh_model_get_xy(), xsh_model_locus(), xsh_model_maps_create(), xsh_model_reduce(), xsh_model_temperature_update_frame(), xsh_model_temperature_update_structure(), xsh_model_THE_create(), xsh_monitor_flux(), xsh_monitor_spectrum1D_flux(), xsh_normalize_spectrum(), xsh_normalize_spectrum_ord(), xsh_obs_std_correct(), xsh_opt_extract_orders(), xsh_orderpos(), xsh_params_set_defaults(), xsh_pfits_get_slit_value(), xsh_pfits_get_slit_width(), xsh_pre_create(), xsh_pre_from_raw_get(), xsh_pre_init(), xsh_predict(), xsh_rec_list_create(), xsh_recipe_params_check(), xsh_recipe_params_drs_check(), xsh_rectify_params_set_defaults(), xsh_rectify_params_set_defaults_drl(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod(), xsh_scired_slit_nod_get_calibs(), xsh_scired_slit_stare(), xsh_slit_offset_get_calibs(), xsh_slit_stare_get_calibs(), xsh_spectrum_resample(), xsh_subtract_background(), xsh_subtract_dark(), xsh_subtract_sky_single(), xsh_util_compute_qc_residuals(), xsh_util_efficiency2d(), xsh_util_physmod_model_THE_create(), xsh_vector_divide_poly(), xsh_wavecal(), xsh_wavecal_qclog_intmon(), xsh_wavemap_lambda_range(), and xsh_wavemap_list_new().

int xsh_instrument_get_binx ( xsh_instrument instrument  ) 
int xsh_instrument_get_biny ( xsh_instrument instrument  ) 
XSH_INSTRCONFIG* xsh_instrument_get_config ( xsh_instrument i  ) 
XSH_LAMP xsh_instrument_get_lamp ( xsh_instrument i  ) 

Get a lamp on instrument structure.

Parameters:
i the instrument we use
Returns:
lamp instrument lamp in use

Definition at line 461 of file xsh_data_instrument.c.

References lamp.

Referenced by xsh_create_master_flat_with_mask(), and xsh_prepare().

XSH_MODE xsh_instrument_get_mode ( xsh_instrument i  ) 
const char* xsh_instrument_lamp_tostring ( xsh_instrument i  ) 

Get the string associated with a lamp.

Parameters:
i the instrument we use
Returns:
the string symbolized the lamp

Definition at line 711 of file xsh_data_instrument.c.

References lamp, and xsh_lamp_tostring().

Referenced by xsh_instrument_set_lamp().

const char* xsh_instrument_mode_tostring ( xsh_instrument i  ) 

Get the string associated with a mode.

Parameters:
i the instrument we use
Returns:
the string symbolized the mode

Definition at line 689 of file xsh_data_instrument.c.

References mode, and xsh_mode_tostring().

Referenced by create_sky_mask(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_response_ord(), xsh_dfs_set_groups(), xsh_efficiency_compute(), xsh_flat_merge_qth_d2(), xsh_flat_merge_qth_d2_smooth(), xsh_mflat(), and xsh_wavecal().

xsh_instrument* xsh_instrument_new ( void   ) 
cpl_error_code xsh_instrument_nir_corr_if_JH ( cpl_frameset *  raws,
xsh_instrument instr 
)
cpl_error_code xsh_instrument_nir_corr_if_spectral_format_is_JH ( cpl_frameset *  calib,
xsh_instrument instr 
)
int xsh_instrument_nir_is_JH ( cpl_frame *  frame,
xsh_instrument instr 
)
void xsh_instrument_parse_tag ( xsh_instrument inst,
const char *  tag 
)

analyse a frame tag to set data in instrument structure

Parameters:
inst the instrument sructure to complete or update
tag a valid xshooter tag (validate by dfs)

Definition at line 211 of file xsh_data_instrument.c.

References mode, xsh_arm_get(), xsh_instrument_set_arm(), xsh_instrument_set_lamp(), xsh_instrument_set_mode(), xsh_lamp_get(), and xsh_mode_get().

Referenced by main(), and xsh_dfs_set_groups().

void xsh_instrument_set_arm ( xsh_instrument i,
XSH_ARM  arm 
)

Set an arm on instrument structure.

Parameters:
i the instrument structure
arm instrument arm in use, if an arm is already defined for the instrument the new arm must be equal to the older!!

Definition at line 270 of file xsh_data_instrument.c.

References arm, assure, update, xsh_arm_tostring(), XSH_ARM_UNDEFINED, and xsh_instrument_arm_tostring().

Referenced by create_instrument(), main(), xsh_instrument_parse_tag(), xsh_model(), xsh_model_anneal(), xsh_model_binxy(), xsh_model_config_load_best(), xsh_model_first_anneal(), xsh_model_order_edges_tab_create(), xsh_model_readfits(), xsh_model_reduce(), and xsh_model_spectralformat_create().

void xsh_instrument_set_binx ( xsh_instrument instrument,
const int  binx 
)

Definition at line 662 of file xsh_data_instrument.c.

References binx, and XSH_ASSURE_NOT_NULL.

Referenced by xsh_model_reduce(), and xsh_util_physmod().

void xsh_instrument_set_biny ( xsh_instrument instrument,
const int  biny 
)

Definition at line 672 of file xsh_data_instrument.c.

References biny, and XSH_ASSURE_NOT_NULL.

Referenced by xsh_model_reduce(), and xsh_util_physmod().

void xsh_instrument_set_decode_bp ( xsh_instrument i,
const int  decode_bp 
)

Set bad pixel code.

Parameters:
i the instrument structure

Definition at line 229 of file xsh_data_instrument.c.

References decode_bp.

Referenced by main(), and xsh_begin().

void xsh_instrument_set_lamp ( xsh_instrument i,
XSH_LAMP  lamp 
)

Set a lamp on instrument structure.

Parameters:
i the instrument structure
lamp instrument lamp in use, if a lamp is already defined for the instrument the new lamp must be equal to the older or UNDEFINED!!

Definition at line 299 of file xsh_data_instrument.c.

References arm, assure, lamp, XSH_ARM_UVB, xsh_instrument_lamp_tostring(), XSH_LAMP_D2, XSH_LAMP_QTH, XSH_LAMP_QTH_D2, xsh_lamp_tostring(), and XSH_LAMP_UNDEFINED.

Referenced by main(), and xsh_instrument_parse_tag().

void xsh_instrument_set_mode ( xsh_instrument i,
XSH_MODE  mode 
)

Set a mode on instrument structure.

Parameters:
i the instrument structure
mode instrument mode of use, if a mode is already defined for the instrument the new mode (if valid) must be equal to the older!!

Definition at line 244 of file xsh_data_instrument.c.

References mode, and XSH_MODE_UNDEFINED.

Referenced by main(), xsh_cfg_recover_last_step(), xsh_instrument_parse_tag(), xsh_model_reduce(), and xsh_predict().

void xsh_instrument_set_recipe_id ( xsh_instrument instrument,
const char *  recipe_id 
)

Set the recipe_id into the instrument structure.

Parameters:
instrument the instrument structure
recipe_id The recipe_id (a string)

Definition at line 420 of file xsh_data_instrument.c.

References recipe_id.

Referenced by add_noisy_pixels(), main(), and xsh_begin().

void xsh_instrument_update_from_spectralformat ( xsh_instrument i,
cpl_frame *  spectralformat_frame 
)
void xsh_instrument_update_lamp ( xsh_instrument i,
XSH_LAMP  lamp 
)
XSH_LAMP xsh_lamp_get ( const char *  tag  ) 

get the lamp from the frame tag

Parameters:
tag (valid by dfs)
Returns:
the detected lamp

Definition at line 196 of file xsh_data_instrument.c.

References XSH_LAMP_D2, XSH_LAMP_QTH, XSH_LAMP_THAR, and XSH_LAMP_UNDEFINED.

Referenced by xsh_instrument_parse_tag().

const char* xsh_lamp_tostring ( XSH_LAMP  lamp  ) 

Get the string associated with a lamp.

Parameters:
lamp the lamp we use
Returns:
the string symbolized the lamp

Definition at line 750 of file xsh_data_instrument.c.

References XSH_LAMP_D2, XSH_LAMP_QTH, and XSH_LAMP_THAR.

Referenced by xsh_instrument_lamp_tostring(), and xsh_instrument_set_lamp().

XSH_MODE xsh_mode_get ( const char *  tag  ) 

get the mode from the frame tag

Parameters:
tag (valid by dfs)
Returns:
the detected mode

Definition at line 154 of file xsh_data_instrument.c.

References XSH_MODE_IFU, XSH_MODE_SLIT, and XSH_MODE_UNDEFINED.

Referenced by xsh_instrument_parse_tag().

void xsh_mode_set ( xsh_instrument instrument,
XSH_MODE  mode 
)

set the instrument mode as user specifies

Parameters:
instrument instrument structure
mode instrument mode
Returns:
void

Definition at line 169 of file xsh_data_instrument.c.

References mode.

Referenced by xsh_scired_ifu_offset(), and xsh_scired_ifu_stare().

const char* xsh_mode_tostring ( XSH_MODE  mode  ) 

Get the string associated with a mode.

Parameters:
mode the mode we use
Returns:
the string symbolized the mode

Definition at line 723 of file xsh_data_instrument.c.

References XSH_MODE_IFU, and XSH_MODE_SLIT.

Referenced by xsh_instrument_mode_tostring().

double xsh_resolution_get ( xsh_instrument instrument,
double  slit 
)

Get the resoltion.

Parameters:
instrument Instrument description structure
slit the slit size
Returns:
The resolution value (double)

Definition at line 490 of file xsh_data_instrument.c.

References arm, mode, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, XSH_MODE_IFU, and XSH_MODE_SLIT.

Referenced by create_sky_mask(), xsh_compute_absorp(), xsh_localize_ifu_slitlet(), and xsh_localize_obj_auto().


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