X-shooter Pipeline Reference Manual 3.8.15
Functions
Instrument Description

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)
 

Detailed Description

Function Documentation

◆ xsh_arcsec_get()

double xsh_arcsec_get ( xsh_instrument instrument)

Get the Arc seconds per pixel for this Arm.

Parameters
instrumentInstrument description structure
Returns
The arcsec value (double)

Definition at line 473 of file xsh_data_instrument.c.

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

◆ xsh_arm_get()

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_AGC, 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().

◆ xsh_arm_tostring()

const char * xsh_arm_tostring ( XSH_ARM  arm)

◆ xsh_decode_bp_set()

void xsh_decode_bp_set ( xsh_instrument instrument,
const int  decode_bp 
)

set the instrument mode as user specifies

Parameters
instrumentinstrument structure
modeinstrument mode
Returns
void

Definition at line 185 of file xsh_data_instrument.c.

References decode_bp, and instrument.

◆ xsh_instrument_arm_tostring()

const char * xsh_instrument_arm_tostring ( xsh_instrument i)

Get the string associated with an arm.

Parameters
ithe instrument we use
Returns
the string symbolized the mode

Definition at line 701 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_mbias_fpn(), 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_nod(), 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(), and xsh_wavelist_subtract_sky().

◆ xsh_instrument_duplicate()

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().

◆ xsh_instrument_free()

void xsh_instrument_free ( xsh_instrument **  instrument)

◆ xsh_instrument_get_arm()

XSH_ARM xsh_instrument_get_arm ( xsh_instrument i)

Get an arm on instrument structure.

Returns
arm instrument arm in use

Definition at line 451 of file xsh_data_instrument.c.

References arm.

Referenced by calc_curve_qc(), calc_resp_qc(), compute_abs_order(), do_compute(), get_average_qc_from_raws(), main(), xsh_2dmap(), xsh_absorp(), xsh_add_product_image(), xsh_add_product_orders_spectrum(), xsh_add_product_pre(), xsh_add_product_spectrum(), xsh_add_sdp_product_spectrum(), xsh_badpixelmap_flag_saturated_pixels(), xsh_begin(), xsh_bspline_fit_interpol(), xsh_bspline_fit_smooth(), xsh_bspline_fit_smooth_data(), xsh_bspline_fit_smooth_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_count_satpix(), xsh_crea_grid_from_mask(), 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_get_normal_calibs(), xsh_get_systematic_spatial_accuracy(), xsh_get_systematic_wave_accuracy(), xsh_ifu_stare_get_calibs(), 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_extra_qc(), xsh_monitor_spectrum1D_flux(), xsh_monitor_spectrum3D_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_pfits_set_qc_slit_width(), xsh_pre_create(), xsh_pre_from_raw_get(), xsh_pre_init(), xsh_predict(), xsh_qc_flats_raw(), xsh_qc_write_to_flat(), 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_remove_crh_single_params_set_defaults(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod(), xsh_scired_slit_stare(), xsh_sdp_spectrum_create(), xsh_skycor_def_nbkpts_ord(), xsh_slit_stare_get_calibs(), xsh_spectrum_resample(), xsh_subtract_dark(), xsh_subtract_sky_single(), xsh_telluric_model_eval(), xsh_util_compute_qc_residuals(), xsh_util_compute_response(), 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().

◆ xsh_instrument_get_binx()

int xsh_instrument_get_binx ( xsh_instrument instrument)

◆ xsh_instrument_get_biny()

int xsh_instrument_get_biny ( xsh_instrument instrument)

◆ xsh_instrument_get_config()

XSH_INSTRCONFIG * xsh_instrument_get_config ( xsh_instrument i)

◆ xsh_instrument_get_lamp()

XSH_LAMP xsh_instrument_get_lamp ( xsh_instrument i)

Get a lamp on instrument structure.

Parameters
ithe instrument we use
Returns
lamp instrument lamp in use

Definition at line 462 of file xsh_data_instrument.c.

References lamp.

Referenced by xsh_create_master_flat_with_mask(), and xsh_prepare().

◆ xsh_instrument_get_mode()

XSH_MODE xsh_instrument_get_mode ( xsh_instrument i)

◆ xsh_instrument_lamp_tostring()

const char * xsh_instrument_lamp_tostring ( xsh_instrument i)

Get the string associated with a lamp.

Parameters
ithe instrument we use
Returns
the string symbolized the lamp

Definition at line 712 of file xsh_data_instrument.c.

References lamp, and xsh_lamp_tostring().

Referenced by xsh_instrument_set_lamp().

◆ xsh_instrument_mode_tostring()

const char * xsh_instrument_mode_tostring ( xsh_instrument i)

Get the string associated with a mode.

Parameters
ithe instrument we use
Returns
the string symbolized the mode

Definition at line 690 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_new()

xsh_instrument * xsh_instrument_new ( void  )

◆ xsh_instrument_nir_corr_if_JH()

cpl_error_code xsh_instrument_nir_corr_if_JH ( cpl_frameset *  raws,
xsh_instrument instr 
)

◆ xsh_instrument_nir_corr_if_spectral_format_is_JH()

cpl_error_code xsh_instrument_nir_corr_if_spectral_format_is_JH ( cpl_frameset *  calib,
xsh_instrument instr 
)

◆ xsh_instrument_nir_is_JH()

int xsh_instrument_nir_is_JH ( cpl_frame *  frame,
xsh_instrument instr 
)

◆ xsh_instrument_parse_tag()

void xsh_instrument_parse_tag ( xsh_instrument inst,
const char *  tag 
)

analyse a frame tag to set data in instrument structure

Parameters
instthe instrument sructure to complete or update
taga valid xshooter tag (validate by dfs)

Definition at line 212 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().

◆ xsh_instrument_set_arm()

void xsh_instrument_set_arm ( xsh_instrument i,
XSH_ARM  arm 
)

Set an arm on instrument structure.

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

Definition at line 271 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().

◆ xsh_instrument_set_binx()

void xsh_instrument_set_binx ( xsh_instrument instrument,
const int  binx 
)

◆ xsh_instrument_set_biny()

void xsh_instrument_set_biny ( xsh_instrument instrument,
const int  biny 
)

◆ xsh_instrument_set_decode_bp()

void xsh_instrument_set_decode_bp ( xsh_instrument i,
const int  decode_bp 
)

Set bad pixel code.

Parameters
ithe instrument structure

Definition at line 230 of file xsh_data_instrument.c.

References decode_bp.

Referenced by main(), and xsh_begin().

◆ xsh_instrument_set_lamp()

void xsh_instrument_set_lamp ( xsh_instrument i,
XSH_LAMP  lamp 
)

Set a lamp on instrument structure.

Parameters
ithe instrument structure
lampinstrument 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 300 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().

◆ xsh_instrument_set_mode()

void xsh_instrument_set_mode ( xsh_instrument i,
XSH_MODE  mode 
)

Set a mode on instrument structure.

Parameters
ithe instrument structure
modeinstrument 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 245 of file xsh_data_instrument.c.

References mode, mode, and XSH_MODE_UNDEFINED.

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

◆ xsh_instrument_set_recipe_id()

void xsh_instrument_set_recipe_id ( xsh_instrument instrument,
const char *  recipe_id 
)

Set the recipe_id into the instrument structure.

Parameters
instrumentthe instrument structure
recipe_idThe recipe_id (a string)

Definition at line 421 of file xsh_data_instrument.c.

References instrument, and recipe_id.

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

◆ xsh_instrument_update_from_spectralformat()

void xsh_instrument_update_from_spectralformat ( xsh_instrument i,
cpl_frame *  spectralformat_frame 
)

◆ xsh_instrument_update_lamp()

void xsh_instrument_update_lamp ( xsh_instrument i,
XSH_LAMP  lamp 
)

◆ xsh_lamp_get()

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 197 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().

◆ xsh_lamp_tostring()

const char * xsh_lamp_tostring ( XSH_LAMP  lamp)

Get the string associated with a lamp.

Parameters
lampthe lamp we use
Returns
the string symbolized the lamp

Definition at line 752 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_get()

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 155 of file xsh_data_instrument.c.

References XSH_MODE_IFU, XSH_MODE_SLIT, and XSH_MODE_UNDEFINED.

Referenced by xsh_instrument_parse_tag().

◆ xsh_mode_set()

void xsh_mode_set ( xsh_instrument instrument,
XSH_MODE  mode 
)

set the instrument mode as user specifies

Parameters
instrumentinstrument structure
modeinstrument mode
Returns
void

Definition at line 170 of file xsh_data_instrument.c.

References instrument, mode, and mode.

Referenced by xsh_scired_ifu_stare().

◆ xsh_mode_tostring()

const char * xsh_mode_tostring ( XSH_MODE  mode)

Get the string associated with a mode.

Parameters
modethe mode we use
Returns
the string symbolized the mode

Definition at line 724 of file xsh_data_instrument.c.

References mode, XSH_MODE_IFU, and XSH_MODE_SLIT.

Referenced by xsh_instrument_mode_tostring().

◆ xsh_resolution_get()

double xsh_resolution_get ( xsh_instrument instrument,
double  slit 
)

Get the resoltion.

Parameters
instrumentInstrument description structure
slitthe slit size
Returns
The resolution value (double)

Definition at line 491 of file xsh_data_instrument.c.

References arm, instrument, 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().