|
X-shooter Pipeline Reference Manual 3.8.15
|
#include <xsh_baryvel.h>#include <xsh_dfs.h>#include <xsh_pfits.h>#include <xsh_pfits_qc.h>#include <xsh_data_pre.h>#include <xsh_data_pre_3d.h>#include <xsh_error.h>#include <xsh_msg.h>#include <cpl.h>#include <stdio.h>#include <string.h>#include <strings.h>#include <time.h>#include <math.h>#include <assert.h>#include <ctype.h>#include <errno.h>#include <xsh_paf_save.h>#include <xsh_utils_table.h>#include <xsh_utils_image.h>#include <xsh_utils.h>#include <xsh_data_spectrum.h>#include <irplib_sdp_spectrum.h>Go to the source code of this file.
Data Structures | |
| struct | _xsh_column_info |
Functions | |||
| static void | replace_spaces_with_underscores (char *str) | ||
xsh_file_exists | |||
@memo Find if a given file name corresponds to an existing file.
Find out if the given character string corresponds to a file that can be stat()'ed. | |||
| static cpl_frame * | xsh_find_frame (cpl_frameset *frames, const char *tags[]) | ||
| Find a frame. | |||
| int | xsh_file_exists (const char *filename) | ||
| cpl_frameset * | xsh_frameset_extract (const cpl_frameset *frames, const char *tag) | ||
| Extract frames with given tag from frameset. | |||
| cpl_error_code | xsh_frameset_merge (cpl_frameset *set1, cpl_frameset *set2) | ||
| Extracts raw frames. | |||
| xsh_instrument * | xsh_dfs_set_groups (cpl_frameset *set) | ||
| Set the group as RAW or CALIB in a frameset and return the instrument detected. | |||
| cpl_error_code | xsh_dfs_extract_raw_frames (cpl_frameset *input, cpl_frameset *raws) | ||
| split input sof in groups: raw and calib | |||
| cpl_error_code | xsh_dfs_extract_calib_frames (cpl_frameset *input, cpl_frameset *calib) | ||
| split input sof in groups: raw and calib | |||
| cpl_error_code | xsh_dfs_extract_pro_frames (cpl_frameset *input, cpl_frameset *pros) | ||
| split input sof in groups: raw and calib | |||
| void | xsh_dfs_split_in_group (cpl_frameset *input, cpl_frameset *raws, cpl_frameset *calib) | ||
| split input sof in groups: raw and calib | |||
| void | xsh_dfs_split_qth_d2 (cpl_frameset *input, cpl_frameset **qth, cpl_frameset **d2) | ||
| Extracts QTH and D2 frames from input frameset. | |||
| void | xsh_dfs_split_nir (cpl_frameset *input, cpl_frameset **on, cpl_frameset **off) | ||
| split input RAW NIR sof in ON and OFF | |||
| int | xsh_dfs_split_offset (cpl_frameset *input, const char *object_tag, const char *sky_tag, cpl_frameset **object, cpl_frameset **sky) | ||
| split input RAW offset sof in OBJECT_... and SKY_... framesets | |||
| static const char * | xsh_create_final_tag (const char *pcatg_prefix, xsh_instrument *inst, const cpl_frame *frame) | ||
| creates tag value based on tag prefix or uses frame tag | |||
| static char * | xsh_create_final_name (const char *final_prefix) | ||
| creates file name based on tag prefix | |||
| static bool | xsh_dfs_tag_check (const char *tag, const char *tag_list[], int size) | ||
| check if the tag is in the tag list | |||
| void | xsh_dfs_filter (cpl_frameset *set, const char *tags[], int size) | ||
| filter the frameset with the given tag list | |||
| cpl_frameset * | xsh_frameset_extract_pre (cpl_frameset *frameset, const char *prefix) | ||
| Extracts pre frames from a frameset. | |||
| cpl_frame * | xsh_find_bpmap (cpl_frameset *set) | ||
| find the bad pixel map in a set of files | |||
| cpl_frame * | xsh_find_master_bpmap (cpl_frameset *set) | ||
| find the master bad pixel map in a set of files | |||
| cpl_frame * | xsh_find_off (cpl_frameset *set) | ||
| find the off frame in set of files | |||
| cpl_frame * | xsh_find_on (cpl_frameset *set) | ||
| find the on frame in set of files | |||
| void | xsh_dfs_find_flat (cpl_frameset *raws, cpl_frameset *flat) | ||
| find the flat set of files in the input SOF and detect the mode of instrument. This function assure that all flat files have the same tag | |||
| char * | xsh_unique_filename (const char *context, const char *caller_id, const char *pro_catg) | ||
| Get unique product filename. | |||
| void | xsh_add_product (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix, const char *type) | ||
| void | xsh_add_product_vector (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix) | ||
| static double | xsh_calculate_exptime (const cpl_frameset *usedframes, XSH_ARM arm) | ||
| Calculates a value for EXPTIME from the list of used frames. | |||
| void | xsh_add_product_spectrum (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instr, cpl_frame **result_frame, cpl_propertylist *qclist) | ||
| void | xsh_add_product_orders_spectrum (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instr, cpl_frame **result_frame) | ||
| void | xsh_add_product_pre (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instr, cpl_propertylist *qclist) | ||
| Add DFS keywords to a product frame. | |||
| void | xsh_add_product_pre_3d (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instr) | ||
| Add 3d product frame. | |||
| void | xsh_add_product_bpmap (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix) | ||
| void | xsh_add_product_imagelist (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix) | ||
| void | xsh_add_product_image (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix) | ||
| void | xsh_add_product_table (cpl_frame *frame, cpl_frameset *frameset, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, const char *final_prefix) | ||
| Save Table product (input frame has several extensions, 1 table per extension) | |||
| cpl_frame * | xsh_find_std_flux (cpl_frameset *frames) | ||
| Find standard star frame. | |||
| cpl_frame * | xsh_find_std_star_flux (cpl_frameset *frames) | ||
| Find standard standard star flux frame. | |||
| cpl_frame * | xsh_find_master_bias (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find master bias frame. | |||
| cpl_frame * | xsh_find_frame_with_tag (cpl_frameset *frames, const char *tag, xsh_instrument *instr) | ||
| Find frame with a given tag. | |||
| char * | xsh_get_tag_from_arm (const char *tag, xsh_instrument *instr) | ||
| Find arm specific tag from base and instrument setting. | |||
| cpl_frame * | xsh_find_master_dark (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find master dark frame. | |||
| cpl_frame * | xsh_find_master_flat (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find master flat frame. | |||
| cpl_frame * | xsh_find_theo_tab_sing (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a theoretical tab signle pinhole in SOF. | |||
| cpl_frame * | xsh_find_theo_tab_mult (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a theoretical tab multi pinhole in SOF. | |||
| cpl_frame * | xsh_find_theo_tab_mode (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a theoretical tab IFU or SINg depending of MODE in SOF. | |||
| cpl_frame * | xsh_find_order_tab_recov (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find an order tab RECOV. | |||
| cpl_frame * | xsh_find_order_tab_guess (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find an order tab GUESS. | |||
| cpl_frame * | xsh_find_order_tab_centr (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find an order tab CENTR. | |||
| cpl_frame * | xsh_find_order_tab_edges (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find an order tab EDGES. | |||
| cpl_frame * | xsh_find_wave_tab_guess (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a wave tab guess. | |||
| cpl_frame * | xsh_find_wave_tab_2d (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a wave tab 2D. | |||
| cpl_frame * | xsh_find_slitmap (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a slit map. | |||
| cpl_frame * | xsh_find_wave_tab (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a wave tab 2D or a wave tab ARC. | |||
| cpl_frame * | xsh_find_model_config (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a model config. | |||
| cpl_frameset * | xsh_find_wave_tab_ifu (cpl_frameset *frames, xsh_instrument *instrument) | ||
| Find wave tab ARC (for IFU 3 frames) | |||
| cpl_frameset * | xsh_find_offset_tab_ifu (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find offset tab (One for each slitlet) | |||
| cpl_frame * | xsh_find_arc_line_list_clean (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find an arc lines list clean frame. | |||
| cpl_frame * | xsh_find_arc_line_list (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find an arc line list frame. | |||
| cpl_frame * | xsh_find_usr_lines_guess_tab (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a user guess line positions table frame. | |||
| cpl_frame * | xsh_find_model_config_tab (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find a model configuration table frame. | |||
| cpl_frame * | xsh_find_wavemap (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find Wave Map frame. The frame returned should not be free by the caller. | |||
| cpl_frame * | xsh_find_raw_orderdef_vis_uvb (cpl_frameset *frames) | ||
| Find orderdef raw frame for UVB or VIS. | |||
| cpl_frame * | xsh_find_raw_orderdef_nir (cpl_frameset *frames) | ||
| Find orderdef raw frame for NIR. | |||
| cpl_frame * | xsh_find_disp_tab (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find Dispersol tab frame. The frame returned should not be free by the caller. | |||
| cpl_frame * | xsh_find_raw_orderdef_nir_off (cpl_frameset *frames) | ||
| Find orderdef raw frame for NIR OFF. | |||
| cpl_frame * | xsh_find_raw_arc_slit_uvb_vis (cpl_frameset *frames, XSH_ARM arm) | ||
| Find raw frame for Slit UVB/VIS. | |||
| cpl_frame * | xsh_find_raw_arc_slit_nir_on (cpl_frameset *frames) | ||
| Find raw frame for Slit NIR ON. | |||
| cpl_frame * | xsh_find_raw_arc_slit_nir_off (cpl_frameset *frames) | ||
| Find raw frame for Slit NIR OFF. | |||
| cpl_frame * | xsh_find_calpro_model_config (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find model config frame. | |||
| cpl_frame * | xsh_find_model_config_open (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find model config frame. | |||
| cpl_frame * | xsh_find_calpro_model_meas_coord (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find model config frame. | |||
| cpl_frame * | xsh_find_model_wavelist (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find model wavelength list frame. | |||
| cpl_frame * | xsh_find_model_testpar (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find model test parameter list. | |||
| cpl_frame * | xsh_find_spectral_format (cpl_frameset *frames, xsh_instrument *instr) | ||
| Find spectral format frame. | |||
| cpl_propertylist * | xsh_frame_head_extract_qc (cpl_frame *frm) | ||
| cpl_boolean | xsh_mode_is_physmod (cpl_frameset *set, xsh_instrument *instrument) | ||
| cpl_error_code | xsh_dfs_check_binning (cpl_frameset *set, cpl_frameset *calib) | ||
| static cpl_frame * | xsh_frame_pre_subsample (cpl_frame *frm_i, const int binx, const int biny, const int rescale, xsh_instrument *inst) | ||
| static cpl_frameset * | xsh_correct_frameset_calib_bin (cpl_frameset *input, const int ref_binx, const int ref_biny, xsh_instrument *inst) | ||
| static cpl_frameset * | xsh_correct_frameset_raws_bin (cpl_frameset *input, const int ref_binx, const int ref_biny, xsh_instrument *inst) | ||
| cpl_error_code | xsh_frameset_uniform_bin (cpl_frameset **raws, cpl_frameset **calib, xsh_instrument *instrument) | ||
| cpl_frameset * | xsh_correct_calib (cpl_frameset *raws, cpl_frameset *calib) | ||
| static cpl_error_code | xsh_frame_nir_tab_chop_Kband (cpl_frame *frame, const int absordmin, const char *colname) | ||
| static cpl_error_code | xsh_calib_nir_predict_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr) | ||
| static cpl_error_code | xsh_calib_nir_orderpos_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr) | ||
| static cpl_error_code | xsh_calib_nir_mflat_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr) | ||
| static cpl_error_code | xsh_calib_nir_2dmap_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr) | ||
| static cpl_error_code | xsh_calib_nir_wavecal_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr) | ||
| static cpl_error_code | xsh_calib_nir_scired_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr) | ||
| cpl_error_code | xsh_calib_nir_respon_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr) | ||
| cpl_error_code | xsh_calib_nir_corr_if_JH (cpl_frameset *calib, xsh_instrument *instr, const char *recid) | ||
| cpl_error_code | xsh_dfs_check_mflat_is_proper (xsh_instrument *inst, cpl_frameset **calib) | ||
| cpl_error_code | xsh_frameset_check_uniform_exptime (cpl_frameset *raws, xsh_instrument *inst) | ||
| cpl_error_code | xsh_table_save (cpl_table *t, cpl_propertylist *ph, cpl_propertylist *xh, const char *fname, const int ext) | ||
| cpl_error_code | xsh_vector_save (cpl_vector *v, cpl_propertylist *ph, const char *fname, const int ext) | ||
| cpl_error_code | xsh_add_afc_info (cpl_frame *frm_m, cpl_frame *frm_o) | ||
| static cpl_boolean | xsh_aperture_string_to_double (const char *string, double *aperture) | ||
| Extracts the aperture from a slit string. | |||
| static const char * | xsh_get_column_unit (cpl_propertylist *header, const char *colname) | ||
| Tries to identify the units string to used based in BUNIT. | |||
| static int | xsh_get_nraws (const cpl_frameset *frames) | ||
| Calculates number of raw frames. | |||
| static double | xsh_calculate_mjd_end (const cpl_frame *product_frame, const cpl_frameset *usedframes, XSH_ARM arm) | ||
| Calculates a value for MJD-END from the list of used frames. | |||
| static double | xsh_find_first_mjd_obs (const cpl_frameset *usedframes) | ||
| Finds the earliest value for MJD_OBS in the set of inputs. | |||
| static void | xsh_fill_provenance_keywords (irplib_sdp_spectrum *spectrum, const cpl_frameset *usedframes) | ||
| Fills SDP spectrum object with PROVi keywords. | |||
| static cpl_error_code | xsh_sdp_spectrum_create (irplib_sdp_spectrum *sdp_spectrum, const cpl_frameset *usedframes, const cpl_propertylist *sourcekeys, xsh_instrument *instrument, xsh_spectrum *spectrum, xsh_spectrum *uncal_spectrum) | ||
| Converts data into Science Data Product 1D spectrum format. | |||
| void | xsh_add_sdp_product_spectrum (const cpl_frame *flux_cal_frame, const cpl_frame *uncal_frame, cpl_frameset *frameset, const cpl_frameset *usedframes, const cpl_parameterlist *parameters, const char *recipe_id, xsh_instrument *instrument, cpl_propertylist *qclist) | ||
| Creates a 1D spectrum product in the Science Data Product format. | |||
| cpl_error_code | xsh_dfs_fix_key_start_end (cpl_frameset *set, cpl_propertylist *head) | ||
| int | xsh_parameter_get_default_flag (const cpl_parameter *p) | ||
| Check if an input parameter has been changed by the user. | |||
| static cpl_error_code | xsh_clean_header (cpl_propertylist *header) | ||
| cpl_error_code | xsh_validate_model_cfg (cpl_frame *mod, cpl_frameset *set) | ||
| Validate model cfg. | |||
| cpl_frameset * | xsh_frameset_ext_table_frames (cpl_frameset *set) | ||
| Extract frameset sub set containing only table frames. | |||
| int | xsh_dfs_files_dont_exist (cpl_frameset *frameset) | ||
| Check if all SOF files exist. | |||
| cpl_frameset * | xsh_frameset_ext_image_frames (cpl_frameset *set) | ||
| Extract frameset sub set containing only table frames. | |||
| cpl_frameset * | xsh_frameset_drl_frames (cpl_frameset *set) | ||
| extract DRL specific frames from frameset | |||
| cpl_error_code | xsh_ensure_raws_input_offset_recipe_is_proper (cpl_frameset **raws, xsh_instrument *instrument) | ||
| Make sure input frames is an even number (eventually removes the last from the input list) | |||
| static double | xsh_get_offsety (cpl_propertylist *plist) | ||
| Computes offsety. | |||
| cpl_frameset * | xsh_frameset_extract_offsety_matches (cpl_frameset *raws, const double offset) | ||
| Extract frames that has same cumoffy as offset. | |||
| cpl_frameset * | xsh_frameset_extract_offsety_mismatches (cpl_frameset *raws, const double offset) | ||
| Extract frames that has different cumoffy than offset. | |||
| cpl_frameset * | xsh_extract_nod_pairs (cpl_frameset *raws, cpl_vector *offset) | ||
| Make sure input frames is composed by nod a-b sequence. | |||
| cpl_frameset * | xsh_extract_obj_and_sky_pairs (cpl_frameset *raws, xsh_instrument *instrument) | ||
| Make sure input frames is composed by obj-sky pairs. | |||
| cpl_frame * | xsh_ensure_raws_number_is_even (cpl_frameset *raws) | ||
| Make sure input frames is an even number (eventually removes the last from the input list) | |||
| int | xsh_print_rec_status (const int val) | ||
| Check if an error has happened and returns error kind and location. | |||
| void | xsh_frame_config (const char *fname, const char *tag, cpl_frame_type type, cpl_frame_group group, cpl_frame_level level, cpl_frame **frame) | ||
| Define a frame characteristics. | |||
| cpl_frame * | xsh_frame_product (const char *fname, const char *tag, cpl_frame_type type, cpl_frame_group group, cpl_frame_level level) | ||
| Creates a frame with given characteristics. | |||
|
static |
Definition at line 74 of file xsh_dfs.c.
Referenced by xsh_sdp_spectrum_create().
| cpl_error_code xsh_add_afc_info | ( | cpl_frame * | frm_m, |
| cpl_frame * | frm_o | ||
| ) |
Definition at line 5199 of file xsh_dfs.c.
References xsh_free_image(), xsh_free_propertylist(), XSH_PRE_DATA_BPP, XSH_PRE_DATA_TYPE, XSH_QC_AFC_XSHIFT, XSH_QC_AFC_XSHIFT_C, XSH_QC_AFC_YSHIFT, and XSH_QC_AFC_YSHIFT_C.
Referenced by xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
| void xsh_add_product | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instrument, | ||
| const char * | final_prefix, | ||
| const char * | type | ||
| ) |
Save product
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instrument | Instrument structure |
| final_prefix | Final file name |
| type | of frame (image/imagelist/table) |
Definition at line 1761 of file xsh_dfs.c.
References check, check_msg, xsh_instrument::dictionary, instrument, xsh_instrument::pipeline_id, xsh_add_product_file(), XSH_ASSURE_NOT_NULL, xsh_clean_header(), xsh_create_final_name(), xsh_frame_product(), XSH_FREE, xsh_free_image(), xsh_free_imagelist(), xsh_free_propertylist(), xsh_free_table(), xsh_msg_dbg_low, and xsh_msg_error.
| void xsh_add_product_bpmap | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instrument, | ||
| const char * | final_prefix | ||
| ) |
Save BadPixelMap product
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instrument | Instrument structure |
| final_prefix | Final file name |
Definition at line 2716 of file xsh_dfs.c.
References check, check_msg, xsh_instrument::dictionary, instrument, xsh_instrument::pipeline_id, xsh_add_product_file(), XSH_ASSURE_NOT_NULL, xsh_clean_header(), xsh_create_final_name(), xsh_create_final_tag(), xsh_frame_product(), xsh_free(), XSH_FREE, xsh_free_image(), xsh_free_propertylist(), and xsh_msg_dbg_low.
Referenced by xsh_linear(), and xsh_util_bpmap_nl_raw2pre().
| void xsh_add_product_image | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instrument, | ||
| const char * | final_prefix | ||
| ) |
Save Image product
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instrument | Instrument structure |
| final_prefix | Final file name |
Definition at line 2965 of file xsh_dfs.c.
References check, check_msg, xsh_instrument::dictionary, exptime, instrument, xsh_instrument::pipeline_id, xsh_add_product_file(), xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_baryvel_correct_header(), xsh_calculate_exptime(), xsh_clean_header(), xsh_create_final_name(), xsh_create_final_tag(), xsh_dfs_fix_key_start_end(), xsh_frame_product(), xsh_free(), XSH_FREE, xsh_free_image(), xsh_free_propertylist(), xsh_instrument_get_arm(), xsh_msg, xsh_msg_warning, xsh_parameters_bary_corr_get(), xsh_pfits_set_pcatg(), and xsh_plist_set_extra_keys().
Referenced by xsh_2dmap(), xsh_absorp(), xsh_mbias(), xsh_mdark(), xsh_mflat(), xsh_orderpos(), xsh_predict(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), xsh_scired_slit_stare(), xsh_util_bpmap_coadd(), xsh_util_crh_single(), xsh_util_physmod(), and xsh_wavecal().
| void xsh_add_product_imagelist | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instrument, | ||
| const char * | final_prefix | ||
| ) |
Save Image product
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instrument | Instrument structure |
| final_prefix | Final file name |
Definition at line 2825 of file xsh_dfs.c.
References check, check_msg, xsh_instrument::dictionary, instrument, xsh_instrument::pipeline_id, xsh_add_product_file(), xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_clean_header(), xsh_create_final_name(), xsh_create_final_tag(), xsh_dfs_fix_key_start_end(), xsh_frame_product(), xsh_free(), XSH_FREE, xsh_free_imagelist(), xsh_free_propertylist(), xsh_msg, and xsh_pfits_set_pcatg().
Referenced by xsh_build_ifu_cube(), and xsh_util_ifu_build_cube().
| void xsh_add_product_orders_spectrum | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instr, | ||
| cpl_frame ** | result_frame | ||
| ) |
Save spectrum product
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instr | Instrument structure |
| result_frame | If not NULL this will be filled with a duplicate of the final product frame. The caller takes ownership of the new frame and must delete it with cpl_frame_delete(). |
Definition at line 2260 of file xsh_dfs.c.
References assure, check, xsh_instrument::dictionary, exptime, xsh_instrument::pipeline_id, xsh_add_product_file(), xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_baryvel_correct_header(), xsh_calculate_exptime(), xsh_clean_header(), xsh_create_final_name(), xsh_create_final_tag(), xsh_dfs_fix_key_start_end(), XSH_FREE, xsh_free_frame(), xsh_free_propertylist(), xsh_free_vector(), xsh_instrument_get_arm(), xsh_msg, xsh_parameters_bary_corr_get(), xsh_pfits_set_pcatg(), xsh_plist_set_extra_keys(), XSH_PRODUCT_PREFIX, xsh_sdate_utc(), XSH_SPECTRUM_DATA_BPP, XSH_SPECTRUM_ERRS_BPP, XSH_SPECTRUM_QUAL_BPP, xsh_stringcat_any(), and xsh_time_stamp_get().
Referenced by xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
| void xsh_add_product_pre | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instr, | ||
| cpl_propertylist * | qclist | ||
| ) |
Add DFS keywords to a product frame.
| frame | The product frame |
| frameset | The recipe frameset. |
| parameters | The recipe parameter list |
| recipe_id | The recipe name |
| instr | The instrument settings |
Mandatory DFS keywords are added by calling cpl_dfs_setup_product_header()
The function performs the following steps
Definition at line 2465 of file xsh_dfs.c.
References assure, check, xsh_pre::data_header, xsh_instrument::dictionary, xsh_pre::errs_header, exptime, xsh_instrument::pipeline_id, xsh_pre::qual_header, xsh_add_product_file(), XSH_ANC_SPECTRUM, XSH_ASSURE_NOT_NULL, xsh_baryvel_correct_header(), xsh_calculate_exptime(), xsh_clean_header(), xsh_dfs_fix_key_start_end(), XSH_FREE, xsh_free_frame(), xsh_free_propertylist(), xsh_instrument_get_arm(), xsh_parameters_bary_corr_get(), xsh_pfits_set_extname(), xsh_plist_set_extra_keys(), xsh_pre_free(), xsh_pre_load(), xsh_pre_save(), XSH_PRODUCT_PREFIX, xsh_sdate_utc(), XSH_SDP_KEYWORD_PRODCATG, xsh_stringcat_any(), and xsh_time_stamp_get().
Referenced by xsh_absorp(), xsh_mflat(), xsh_respon_slit_nod(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod(), and xsh_scired_slit_stare().
| void xsh_add_product_pre_3d | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instr | ||
| ) |
Add 3d product frame.
| frame | The product frame |
| frameset | The recipe frameset. |
| parameters | The recipe parameter list |
| recipe_id | The recipe name |
| instr | The instrument settings |
Definition at line 2627 of file xsh_dfs.c.
References assure, check, xsh_pre_3d::data_header, xsh_instrument::dictionary, xsh_instrument::pipeline_id, xsh_add_product_file(), XSH_ASSURE_NOT_NULL, xsh_clean_header(), XSH_FREE, xsh_free_frame(), xsh_pre_3d_free(), xsh_pre_3d_load(), xsh_pre_3d_save(), XSH_PRODUCT_PREFIX, xsh_sdate_utc(), xsh_stringcat_any(), and xsh_time_stamp_get().
Referenced by xsh_geom_ifu(), xsh_scired_ifu_offset(), and xsh_scired_ifu_stare().
| void xsh_add_product_spectrum | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instr, | ||
| cpl_frame ** | result_frame, | ||
| cpl_propertylist * | qclist | ||
| ) |
Save spectrum product
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instr | Instrument structure |
| result_frame | If not NULL this will be filled with a duplicate of the final product frame. The caller takes ownership of the new frame and must delete it with cpl_frame_delete(). |
Definition at line 2067 of file xsh_dfs.c.
References assure, check, xsh_instrument::dictionary, xsh_spectrum::errs, xsh_spectrum::errs_header, exptime, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_instrument::pipeline_id, xsh_spectrum::qual_header, xsh_add_product_file(), XSH_ANC_SPECTRUM, XSH_ASSURE_NOT_NULL, xsh_baryvel_correct_header(), xsh_calculate_exptime(), xsh_clean_header(), xsh_dfs_fix_key_start_end(), XSH_FREE, xsh_free_frame(), xsh_instrument_get_arm(), XSH_MERGE1D, XSH_MERGE2D, xsh_msg_warning, xsh_parameters_bary_corr_get(), XSH_PRODUCT_PREFIX, xsh_sdate_utc(), XSH_SDP_KEYWORD_PRODCATG, xsh_spectrum_free(), xsh_spectrum_load(), xsh_spectrum_save(), xsh_stringcat_any(), and xsh_time_stamp_get().
Referenced by create_input_product_frame(), xsh_absorp(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
| void xsh_add_product_table | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instrument, | ||
| const char * | final_prefix | ||
| ) |
Save Table product (input frame has several extensions, 1 table per extension)
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instrument | Instrument structure |
Definition at line 3146 of file xsh_dfs.c.
References check, xsh_instrument::dictionary, instrument, xsh_instrument::pipeline_id, XSH_ASSURE_NOT_NULL, xsh_clean_header(), xsh_create_final_name(), xsh_create_final_tag(), xsh_dfs_fix_key_start_end(), xsh_fileutils_move(), xsh_frame_product(), xsh_free(), XSH_FREE, xsh_free_propertylist(), xsh_free_table(), xsh_stringcat_any(), and XSH_TABLE_FREE.
Referenced by xsh_2dmap(), xsh_absorp(), xsh_build_ifu_cube(), xsh_cfg_recover_last_step(), xsh_flexcomp(), xsh_gain(), xsh_geom_ifu(), xsh_mflat(), xsh_model_first_anneal_save(), xsh_orderpos(), xsh_predict(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_stare(), xsh_util_afc(), xsh_util_efficiency1d(), xsh_util_ifu_build_cube(), xsh_util_physmod(), and xsh_wavecal().
| void xsh_add_product_vector | ( | cpl_frame * | frame, |
| cpl_frameset * | frameset, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instrument, | ||
| const char * | final_prefix | ||
| ) |
Save vector product
| frame | Product Frame |
| frameset | Input Frameset |
| parameters | Parameters list |
| recipe_id | Recipe Identification String |
| instr | Instrument structure |
Definition at line 1895 of file xsh_dfs.c.
References check, check_msg, xsh_instrument::dictionary, instrument, xsh_instrument::pipeline_id, xsh_add_product_file(), XSH_ASSURE_NOT_NULL, xsh_clean_header(), xsh_create_final_name(), xsh_frame_product(), XSH_FREE, xsh_free_frame(), xsh_free_propertylist(), xsh_free_vector(), xsh_msg_dbg_low, and XSH_PRE_QUAL_BPP.
Referenced by xsh_absorp().
| void xsh_add_sdp_product_spectrum | ( | const cpl_frame * | flux_cal_frame, |
| const cpl_frame * | uncal_frame, | ||
| cpl_frameset * | frameset, | ||
| const cpl_frameset * | usedframes, | ||
| const cpl_parameterlist * | parameters, | ||
| const char * | recipe_id, | ||
| xsh_instrument * | instrument, | ||
| cpl_propertylist * | qclist | ||
| ) |
Creates a 1D spectrum product in the Science Data Product format.
This function converts a 1D spectrum written to a fits files in the X-Shooter native format to the Science Data Product (SDP) format. The spectrum data is loaded from the flux_cal_frame and uncal_frame, converted to the SDP format and written to a new file with the same name as the original product, but with the "SDP_" prefix added. Either the flux calibrated frame or the uncalibrated frame must be provided or both. The caller should check the value of cpl_error_get_code() to see if an error occurred during the conversion.
| flux_cal_frame | The flux calibrated 1D spectrum frame that we convert to SDP format. Can be NULL if none is available, but only if the uncal_frame is not NULL. |
| uncal_frame | The uncalibrated 1D spectrum that we also use in the conversion. Can be NULL if none is available, but only if the flux_cal_frame is not NULL. |
| frameset | The list of all frames to which we add the newly generated frame. |
| usedframes | A frame set containing a list of all frames used to product the spectrum in the flux_cal_frame. |
| parameters | The parameters passed to the recipe by esorex. |
| recipe_id | The ID string of the recipe. |
| instrument | The X-Shooter instrument structure containing configuration information about the instrument. |
Definition at line 6326 of file xsh_dfs.c.
References assure, check, xsh_instrument::dictionary, instrument, xsh_instrument::pipeline_id, xsh_add_product_file(), XSH_ARM_NIR, xsh_arm_tostring(), XSH_ARM_UVB, XSH_ARM_VIS, XSH_ASSURE_NOT_NULL, xsh_calculate_mjd_end(), XSH_DPR_TYPE, xsh_error_msg, xsh_fill_provenance_keywords(), XSH_INSTRUME, XSH_INSTRUME_VALUE, xsh_instrument_get_arm(), XSH_MJDEND, xsh_parameters_get_int(), XSH_QC_FLUX_SN, xsh_sdp_spectrum_create(), xsh_spectrum_free(), and xsh_spectrum_load().
Referenced by main(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
|
static |
Extracts the aperture from a slit string.
| [in] | string | The string containing slit information in the format: "\<number\>x\<number\>[\<string\>]". |
| [out] | aperture | the extracted aperture value will be written to the location pointed to by this parameter. |
CPL_TRUE if the value was extracted correctly and CPL_FALSE otherwise. Definition at line 5249 of file xsh_dfs.c.
References x.
Referenced by xsh_sdp_spectrum_create().
|
static |
Calculates a value for EXPTIME from the list of used frames.
The EXPTIME value is simply the sum of EXPTIME values from individual frames.
| usedframes | The list of used frames to check. |
| arm | The instrument arm being used. |
cpl_error_get_code. Definition at line 1979 of file xsh_dfs.c.
References check, exptime, XSH_ARM_NIR, XSH_DET_DIT, XSH_DET_NDIT, XSH_DET_NDITSKIP, XSH_DPR_TYPE, XSH_EXPTIME, and xsh_msg_warning.
Referenced by xsh_add_product_image(), xsh_add_product_orders_spectrum(), xsh_add_product_pre(), xsh_add_product_spectrum(), and xsh_sdp_spectrum_create().
|
static |
Calculates a value for MJD-END from the list of used frames.
The MJD_END value is the taken as the highest MJD-OBS value found in the product frame of list of used frames, plus the exposure time for the last frame.
| product_frame | The product frame to check. |
| usedframes | The list of used frames to check. |
| arm | The instrument arm being used. |
cpl_error_get_code. Definition at line 5356 of file xsh_dfs.c.
References check, XSH_ARM_NIR, XSH_DET_DIT, XSH_DET_NDIT, XSH_DET_NDITSKIP, XSH_EXPTIME, XSH_MJDEND, XSH_MJDOBS, and xsh_msg_warning.
Referenced by xsh_add_sdp_product_spectrum().
|
static |
Definition at line 4898 of file xsh_dfs.c.
References check, xsh_instrument::config, XSH_INSTRCONFIG::order_min, XSH_ASSURE_NOT_NULL_MSG, xsh_find_frame_with_tag(), xsh_find_order_tab_edges(), xsh_frame_nir_tab_chop_Kband(), and XSH_THEO_TAB_MULT.
Referenced by xsh_calib_nir_corr_if_JH().
| cpl_error_code xsh_calib_nir_corr_if_JH | ( | cpl_frameset * | calib, |
| xsh_instrument * | instr, | ||
| const char * | recid | ||
| ) |
Definition at line 5014 of file xsh_dfs.c.
References xsh_instrument::arm, check, xsh_instrument::config, XSH_INSTRCONFIG::order_max, XSH_INSTRCONFIG::order_min, XSH_INSTRCONFIG::orders, XSH_ARM_NIR, XSH_ASSURE_NOT_NULL_MSG, xsh_calib_nir_2dmap_corr_if_JH(), xsh_calib_nir_mflat_corr_if_JH(), xsh_calib_nir_orderpos_corr_if_JH(), xsh_calib_nir_predict_corr_if_JH(), xsh_calib_nir_scired_corr_if_JH(), and xsh_calib_nir_wavecal_corr_if_JH().
Referenced by xsh_begin(), xsh_respon_slit_offset(), and xsh_respon_slit_stare().
|
static |
Definition at line 4878 of file xsh_dfs.c.
References check, xsh_instrument::config, XSH_INSTRCONFIG::order_min, XSH_ASSURE_NOT_NULL_MSG, xsh_find_order_tab_centr(), and xsh_frame_nir_tab_chop_Kband().
Referenced by xsh_calib_nir_corr_if_JH().
|
static |
Definition at line 4856 of file xsh_dfs.c.
References xsh_instrument::config, XSH_INSTRCONFIG::order_min, XSH_ASSURE_NOT_NULL_MSG, xsh_find_frame_with_tag(), xsh_frame_nir_tab_chop_Kband(), and XSH_ORDER_TAB_GUESS.
Referenced by xsh_calib_nir_corr_if_JH().
|
static |
Definition at line 4845 of file xsh_dfs.c.
References XSH_ASSURE_NOT_NULL_MSG.
Referenced by xsh_calib_nir_corr_if_JH().
| cpl_error_code xsh_calib_nir_respon_corr_if_JH | ( | cpl_frameset * | calib, |
| xsh_instrument * | instr | ||
| ) |
Definition at line 4974 of file xsh_dfs.c.
References check, xsh_instrument::config, XSH_INSTRCONFIG::order_max, XSH_INSTRCONFIG::order_min, XSH_INSTRCONFIG::orders, XSH_ASSURE_NOT_NULL_MSG, xsh_calib_nir_scired_corr_if_JH(), xsh_find_order_tab_edges(), xsh_find_spectral_format(), xsh_frame_nir_tab_chop_Kband(), xsh_free_table(), and xsh_msg.
Referenced by xsh_respon_slit_nod(), xsh_respon_slit_offset(), and xsh_respon_slit_stare().
|
static |
Definition at line 4949 of file xsh_dfs.c.
References check, xsh_instrument::config, XSH_INSTRCONFIG::order_min, XSH_ASSURE_NOT_NULL_MSG, xsh_find_disp_tab(), xsh_find_order_tab_edges(), xsh_find_wave_tab(), and xsh_frame_nir_tab_chop_Kband().
Referenced by xsh_calib_nir_corr_if_JH(), and xsh_calib_nir_respon_corr_if_JH().
|
static |
Definition at line 4924 of file xsh_dfs.c.
References check, xsh_instrument::config, XSH_INSTRCONFIG::order_min, XSH_ASSURE_NOT_NULL_MSG, xsh_find_disp_tab(), xsh_find_order_tab_edges(), and xsh_frame_nir_tab_chop_Kband().
Referenced by xsh_calib_nir_corr_if_JH().
|
static |
Definition at line 152 of file xsh_dfs.c.
Referenced by xsh_add_product(), xsh_add_product_bpmap(), xsh_add_product_image(), xsh_add_product_imagelist(), xsh_add_product_orders_spectrum(), xsh_add_product_pre(), xsh_add_product_pre_3d(), xsh_add_product_spectrum(), xsh_add_product_table(), and xsh_add_product_vector().
| cpl_frameset * xsh_correct_calib | ( | cpl_frameset * | raws, |
| cpl_frameset * | calib | ||
| ) |
Definition at line 4728 of file xsh_dfs.c.
References check, xsh_frame_image_div_by_fct(), xsh_frame_image_mult_by_fct(), xsh_free_frameset(), xsh_free_propertylist(), xsh_msg, xsh_pfits_get_binx(), and xsh_pfits_get_biny().
|
static |
Definition at line 4560 of file xsh_dfs.c.
References check, xsh_frame_pre_subsample(), xsh_free_propertylist(), xsh_msg, xsh_pfits_get_binx(), and xsh_pfits_get_biny().
Referenced by xsh_frameset_uniform_bin().
|
static |
Definition at line 4612 of file xsh_dfs.c.
References check, xsh_frame_pre_subsample(), xsh_free_propertylist(), xsh_msg, xsh_pfits_get_binx(), and xsh_pfits_get_biny().
Referenced by xsh_frameset_uniform_bin().
|
static |
creates file name based on tag prefix
| prefix | tag prefix |
Definition at line 1451 of file xsh_dfs.c.
References XSH_FREE, XSH_PRODUCT_PREFIX, xsh_sdate_utc(), xsh_stringcat_any(), and xsh_time_stamp_get().
Referenced by xsh_add_product(), xsh_add_product_bpmap(), xsh_add_product_image(), xsh_add_product_imagelist(), xsh_add_product_orders_spectrum(), xsh_add_product_table(), and xsh_add_product_vector().
|
static |
creates tag value based on tag prefix or uses frame tag
| pcatg_prefix | tag prefix |
| frame | product frame |
Definition at line 1428 of file xsh_dfs.c.
References xsh_instrument_arm_tostring(), and xsh_stringcat_any().
Referenced by xsh_add_product_bpmap(), xsh_add_product_image(), xsh_add_product_imagelist(), xsh_add_product_orders_spectrum(), and xsh_add_product_table().
| cpl_error_code xsh_dfs_check_binning | ( | cpl_frameset * | set, |
| cpl_frameset * | calib | ||
| ) |
Definition at line 4438 of file xsh_dfs.c.
References check, ref, XSH_ASSURE_NOT_NULL_MSG, xsh_free_propertylist(), xsh_msg_error, xsh_pfits_get_binx(), xsh_pfits_get_biny(), and xsh_pfits_get_naxis().
| cpl_error_code xsh_dfs_check_mflat_is_proper | ( | xsh_instrument * | inst, |
| cpl_frameset ** | calib | ||
| ) |
Definition at line 5062 of file xsh_dfs.c.
References binx, xsh_instrument::binx, biny, xsh_instrument::biny, check, xsh_frame_image_div_by_fct(), xsh_frame_image_mult_by_fct(), xsh_free_propertylist(), xsh_instrument_arm_tostring(), XSH_MASTER_FLAT_SLIT, xsh_msg, xsh_pfits_get_binx(), and xsh_pfits_get_biny().
| cpl_error_code xsh_dfs_extract_calib_frames | ( | cpl_frameset * | input, |
| cpl_frameset * | calib | ||
| ) |
| cpl_error_code xsh_dfs_extract_pro_frames | ( | cpl_frameset * | input, |
| cpl_frameset * | pros | ||
| ) |
split input sof in groups: raw and calib
| input | the input set of files |
| pros | the product files of the input set of files |
Definition at line 1173 of file xsh_dfs.c.
References XSH_ASSURE_NOT_NULL_MSG.
Referenced by xsh_lingain().
| cpl_error_code xsh_dfs_extract_raw_frames | ( | cpl_frameset * | input, |
| cpl_frameset * | raws | ||
| ) |
split input sof in groups: raw and calib
| input | the input set of files |
| raws | the raws file of the input set of files |
Definition at line 1117 of file xsh_dfs.c.
Referenced by xsh_dfs_fix_key_start_end(), and xsh_model_first_anneal_save().
| int xsh_dfs_files_dont_exist | ( | cpl_frameset * | frameset | ) |
Check if all SOF files exist.
| frameset | The input set-of-frames |
Definition at line 245 of file xsh_dfs.c.
Referenced by xsh_begin().
| void xsh_dfs_filter | ( | cpl_frameset * | set, |
| const char * | tags[], | ||
| int | size | ||
| ) |
filter the frameset with the given tag list
| set | [IN/OUT] The input set of frames |
| tags | the filtered tag list |
| size | size of list |
Definition at line 1511 of file xsh_dfs.c.
References check, size, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, and xsh_dfs_tag_check().
Referenced by xsh_begin().
| void xsh_dfs_find_flat | ( | cpl_frameset * | raws, |
| cpl_frameset * | flat | ||
| ) |
| cpl_error_code xsh_dfs_fix_key_start_end | ( | cpl_frameset * | set, |
| cpl_propertylist * | head | ||
| ) |
Definition at line 95 of file xsh_dfs.c.
References check, xsh_dfs_extract_raw_frames(), xsh_free_frameset(), and xsh_pfits_combine_headers().
Referenced by xsh_add_product_image(), xsh_add_product_imagelist(), xsh_add_product_orders_spectrum(), xsh_add_product_pre(), xsh_add_product_spectrum(), and xsh_add_product_table().
| xsh_instrument * xsh_dfs_set_groups | ( | cpl_frameset * | set | ) |
Set the group as RAW or CALIB in a frameset and return the instrument detected.
| set | the input frameset |
Definition at line 1046 of file xsh_dfs.c.
References assure, check, check_msg, xsh_instrument::config, instrument, XSH_INSTRCONFIG::order_max, XSH_INSTRCONFIG::order_min, XSH_INSTRCONFIG::orders, XSH_ARM_UNDEFINED, xsh_instrument_arm_tostring(), xsh_instrument_free(), xsh_instrument_get_arm(), xsh_instrument_get_config(), xsh_instrument_mode_tostring(), xsh_instrument_new(), xsh_instrument_parse_tag(), XSH_IS_CALIB, XSH_IS_RAW, xsh_msg, and xsh_msg_error.
Referenced by main(), xsh_begin(), xsh_util_bpmap_coadd(), and xsh_util_ima_arith().
| void xsh_dfs_split_in_group | ( | cpl_frameset * | input, |
| cpl_frameset * | raws, | ||
| cpl_frameset * | calib | ||
| ) |
split input sof in groups: raw and calib
| input | the input set of files |
| raws | the raws file of the input set of files |
| calib | the calib files of the input set of files |
Definition at line 1202 of file xsh_dfs.c.
References xsh_msg_error.
Referenced by main(), and xsh_begin().
| void xsh_dfs_split_nir | ( | cpl_frameset * | input, |
| cpl_frameset ** | on, | ||
| cpl_frameset ** | off | ||
| ) |
split input RAW NIR sof in ON and OFF
| [in] | input | the input RAW NIR set of files |
| [out] | on | the on files of the input set of files |
| [out] | off | the off files of the input set of files |
Definition at line 1297 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_frameset(), xsh_msg_error, and XSH_NEW_FRAMESET.
Referenced by xsh_2dmap(), xsh_geom_ifu(), xsh_mflat(), xsh_predict(), and xsh_wavecal().
| int xsh_dfs_split_offset | ( | cpl_frameset * | input, |
| const char * | object_tag, | ||
| const char * | sky_tag, | ||
| cpl_frameset ** | object, | ||
| cpl_frameset ** | sky | ||
| ) |
split input RAW offset sof in OBJECT_... and SKY_... framesets
| [in] | input | input frameset |
| [in] | object_tag | The OBJECT Tag |
| [in] | sky_tag | The SKY Tag |
| [out] | object | the object files of the input set of files |
| [out] | sky | the sky files of the input set of files |
Definition at line 1357 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_msg_dbg_medium, xsh_msg_error, and xsh_print_rec_status().
Referenced by xsh_respon_slit_offset(), xsh_scired_ifu_offset(), and xsh_scired_slit_offset().
| void xsh_dfs_split_qth_d2 | ( | cpl_frameset * | input, |
| cpl_frameset ** | qth, | ||
| cpl_frameset ** | d2 | ||
| ) |
Extracts QTH and D2 frames from input frameset.
| input | the input set of files |
| qth | frameset with QTH frames |
| d2 | frameset with D2 frames |
Definition at line 1241 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_frameset(), xsh_msg_error, and XSH_NEW_FRAMESET.
Referenced by xsh_mflat().
|
static |
check if the tag is in the tag list
| tag | the tag to check |
| tag_list | the list of tags |
| size | size of list |
Definition at line 1486 of file xsh_dfs.c.
References size.
Referenced by xsh_dfs_filter().
| cpl_error_code xsh_ensure_raws_input_offset_recipe_is_proper | ( | cpl_frameset ** | raws, |
| xsh_instrument * | instrument | ||
| ) |
Make sure input frames is an even number (eventually removes the last from the input list)
| raws | input value |
| instrument | arm setting |
Definition at line 352 of file xsh_dfs.c.
References assure, check, instrument, xsh_frameset_extract(), xsh_frameset_merge(), xsh_free_frameset(), XSH_GET_TAG_FROM_ARM, xsh_instrument_get_mode(), XSH_MODE_IFU, xsh_msg, XSH_OBJECT_IFU_OFFSET, XSH_OBJECT_SLIT_OFFSET, XSH_SKY_IFU, XSH_SKY_SLIT, XSH_STD_FLUX_IFU_OFFSET, and XSH_STD_FLUX_SLIT_OFFSET.
Referenced by xsh_respon_slit_offset(), xsh_scired_ifu_offset(), and xsh_scired_slit_offset().
| cpl_frame * xsh_ensure_raws_number_is_even | ( | cpl_frameset * | raws | ) |
Make sure input frames is an even number (eventually removes the last from the input list)
| raws | input value |
Definition at line 792 of file xsh_dfs.c.
References check, xsh_free_propertylist(), xsh_get_offsety(), and xsh_msg_warning.
Referenced by xsh_respon_slit_nod(), and xsh_scired_slit_nod().
| cpl_frameset * xsh_extract_nod_pairs | ( | cpl_frameset * | raws, |
| cpl_vector * | offset | ||
| ) |
Make sure input frames is composed by nod a-b sequence.
| raws | input value |
| offset | vector with different offset values |
Definition at line 584 of file xsh_dfs.c.
References assure, check, XSH_ASSURE_NOT_NULL_MSG, xsh_frameset_extract_offsety_matches(), xsh_frameset_extract_offsety_mismatches(), xsh_free_frameset(), xsh_free_propertylist(), xsh_msg, and xsh_pfits_get_mjdobs().
| cpl_frameset * xsh_extract_obj_and_sky_pairs | ( | cpl_frameset * | raws, |
| xsh_instrument * | instrument | ||
| ) |
Make sure input frames is composed by obj-sky pairs.
| raws | input value |
| instrument | arm |
Definition at line 699 of file xsh_dfs.c.
References assure, check, instrument, xsh_frameset_extract(), xsh_free_frameset(), xsh_free_propertylist(), XSH_GET_TAG_FROM_ARM, xsh_instrument_get_mode(), XSH_MODE_IFU, xsh_msg, XSH_OBJECT_IFU_OFFSET, XSH_OBJECT_SLIT_OFFSET, xsh_pfits_get_mjdobs(), XSH_SKY_IFU, and XSH_SKY_SLIT.
| int xsh_file_exists | ( | const char * | filename | ) |
Definition at line 959 of file xsh_dfs.c.
Referenced by xsh_frameset_extract_pre().
|
static |
Fills SDP spectrum object with PROVi keywords.
Fills the spectrum with PROVi keywords corresponding to the raw science data files used for a final SDP product. The PROVi keyword is filled with the content of ARCFILE if this keyword is found in the raw file primary header. Otherwise ORIGFILE is used if ARCFILE is missing. If none of these keywords is found then just the disk file name is used.
| [out] | spectrum | The SDP spectrum object to fill with the new keywords. |
| [in] | usedframes | The list of used frames to add as PROV keywords. |
If an error occurs then an appropriate error code is set. The caller can check for this with a call to cpl_error_get_code().
Definition at line 5490 of file xsh_dfs.c.
References check, XSH_ARCFILE, XSH_DPR_TYPE, xsh_msg_warning, and XSH_ORIGFILE.
Referenced by xsh_add_sdp_product_spectrum().
| cpl_frame * xsh_find_arc_line_list | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find an arc line list frame.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3908 of file xsh_dfs.c.
References check, XSH_ARC_LINE_LIST, XSH_ASSURE_NOT_NULL, xsh_find_frame(), and XSH_GET_TAG_FROM_ARM.
Referenced by main(), and xsh_predict().
| cpl_frame * xsh_find_arc_line_list_clean | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find an arc lines list clean frame.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3882 of file xsh_dfs.c.
References check, XSH_ARC_LINE_LIST, XSH_ASSURE_NOT_NULL, xsh_find_frame(), and XSH_GET_TAG_FROM_ARM.
| cpl_frame * xsh_find_bpmap | ( | cpl_frameset * | set | ) |
find the bad pixel map in a set of files
| set | the set of files |
Definition at line 1595 of file xsh_dfs.c.
Referenced by xsh_linear().
| cpl_frame * xsh_find_calpro_model_config | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find model config frame.
| frames | The input frameset |
| instr | the instrument arm setting |
Definition at line 4186 of file xsh_dfs.c.
References check, xsh_find_frame(), xsh_instrument_arm_tostring(), XSH_MOD_CFG, xsh_msg_debug, and xsh_stringcat_any().
Referenced by xsh_model_anneal().
| cpl_frame * xsh_find_calpro_model_meas_coord | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find model config frame.
| frames | The input frameset |
| instr | the instrument arm setting |
Definition at line 4240 of file xsh_dfs.c.
References check, xsh_find_frame(), xsh_instrument_arm_tostring(), XSH_MEASCOORD, and xsh_stringcat_any().
Referenced by xsh_model_anneal().
| cpl_frame * xsh_find_disp_tab | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find Dispersol tab frame. The frame returned should not be free by the caller.
| frames | The input frameset |
| instr | The instrument |
Definition at line 4066 of file xsh_dfs.c.
References check, XSH_DISP_TAB, XSH_DISP_TAB_AFC, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and xsh_msg.
Referenced by xsh_absorp(), xsh_calib_nir_scired_corr_if_JH(), xsh_calib_nir_wavecal_corr_if_JH(), xsh_get_response_calibs(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod_get_calibs(), xsh_scired_slit_offset(), xsh_scired_slit_stare(), and xsh_wavecal().
|
static |
Finds the earliest value for MJD_OBS in the set of inputs.
The earliest value found for MJD_OBS in the list of input frames is returned.
| usedframes | The list of used frames to check. |
cpl_error_get_code. Definition at line 5434 of file xsh_dfs.c.
References check, and XSH_MJDOBS.
Referenced by xsh_sdp_spectrum_create().
|
static |
Find a frame.
| frames | The input frameset |
| tags | Null-terminated array of tags to search for |
The function sets an error if no standard star frame is present.
Definition at line 4350 of file xsh_dfs.c.
References assure, check, xsh_stringcat_3(), and xsh_stringdup().
Referenced by xsh_find_arc_line_list(), xsh_find_arc_line_list_clean(), xsh_find_calpro_model_config(), xsh_find_calpro_model_meas_coord(), xsh_find_disp_tab(), xsh_find_frame_with_tag(), xsh_find_master_bias(), xsh_find_master_dark(), xsh_find_master_flat(), xsh_find_model_config(), xsh_find_model_config_open(), xsh_find_model_config_tab(), xsh_find_model_testpar(), xsh_find_model_wavelist(), xsh_find_offset_tab_ifu(), xsh_find_order_tab_centr(), xsh_find_order_tab_edges(), xsh_find_order_tab_guess(), xsh_find_order_tab_recov(), xsh_find_raw_arc_slit_nir_off(), xsh_find_raw_arc_slit_nir_on(), xsh_find_raw_arc_slit_uvb_vis(), xsh_find_raw_orderdef_nir(), xsh_find_raw_orderdef_nir_off(), xsh_find_raw_orderdef_vis_uvb(), xsh_find_slitmap(), xsh_find_spectral_format(), xsh_find_std_flux(), xsh_find_std_star_flux(), xsh_find_theo_tab_mode(), xsh_find_theo_tab_mult(), xsh_find_theo_tab_sing(), xsh_find_usr_lines_guess_tab(), xsh_find_wave_tab(), xsh_find_wave_tab_2d(), xsh_find_wave_tab_guess(), xsh_find_wave_tab_ifu(), and xsh_find_wavemap().
| cpl_frame * xsh_find_frame_with_tag | ( | cpl_frameset * | frames, |
| const char * | tag, | ||
| xsh_instrument * | instr | ||
| ) |
Find frame with a given tag.
| frames | The input frameset |
| tag | The frame tag |
| instr | the settings of instrument |
The function sets an error if no standard star frame is present.
Definition at line 3347 of file xsh_dfs.c.
References xsh_find_frame(), xsh_get_tag_from_arm(), and xsh_msg_dbg_high.
Referenced by main(), xsh_2dmap(), xsh_absorp(), xsh_calib_nir_2dmap_corr_if_JH(), xsh_calib_nir_orderpos_corr_if_JH(), xsh_cfg_recover_last_step(), xsh_check_load_master_bpmap(), xsh_flexcomp(), xsh_frameset_uniform_bin(), xsh_geom_ifu(), xsh_get_calibs_to_flux_calibrate(), xsh_get_dispersion_calibs(), xsh_get_response_calibs(), xsh_get_slit_stare_calibs(), xsh_ifu_stare_get_calibs(), xsh_lingain(), xsh_load_ref_table(), xsh_mdark(), xsh_mflat(), xsh_mode_is_physmod(), xsh_model_first_anneal(), xsh_orderpos(), xsh_predict(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), 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_offset(), xsh_scired_slit_stare(), xsh_slit_offset_get_calibs(), xsh_slit_stare_get_calibs(), xsh_slit_stare_get_calibs2(), xsh_util_afc(), xsh_util_apply_response(), xsh_util_bpmap_nl_raw2pre(), xsh_util_compute_response(), xsh_util_efficiency1d(), xsh_util_efficiency2d(), xsh_util_guess_xy(), xsh_util_ifu_build_cube(), xsh_util_integrate(), xsh_util_physmod(), xsh_utils_efficiency(), and xsh_wavecal().
| cpl_frame * xsh_find_master_bias | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find master bias frame.
| frames | The input frameset |
| instr | the settings of instrument |
The function sets an error if no standard star frame is present.
Definition at line 3319 of file xsh_dfs.c.
References check, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_MASTER_BIAS.
Referenced by main(), xsh_geom_ifu(), xsh_get_normal_calibs(), xsh_ifu_stare_get_calibs(), and xsh_slit_stare_get_calibs().
| cpl_frame * xsh_find_master_bpmap | ( | cpl_frameset * | set | ) |
find the master bad pixel map in a set of files
| set | the set of files |
Definition at line 1621 of file xsh_dfs.c.
References XSH_MASTER_BP_MAP.
Referenced by xsh_cfg_recover_last_step(), xsh_geom_ifu(), xsh_scired_ifu_offset(), and xsh_scired_ifu_stare().
| cpl_frame * xsh_find_master_dark | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find master dark frame.
| frames | The input frameset |
| instr | the settings of instrument |
The function sets an error if no standard star frame is present.
Definition at line 3404 of file xsh_dfs.c.
References xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_MASTER_DARK.
Referenced by main(), xsh_geom_ifu(), xsh_ifu_stare_get_calibs(), xsh_slit_stare_get_calibs(), xsh_slit_stare_get_calibs2(), and xsh_wavecal().
| cpl_frame * xsh_find_master_flat | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find master flat frame.
| frames | The input frameset |
| instr | the settings of instrument |
The function sets an error if no master flat frame is present.
Definition at line 3426 of file xsh_dfs.c.
References xsh_find_frame(), XSH_GET_TAG_FROM_MODE, and XSH_MASTER_FLAT.
Referenced by main(), xsh_geom_ifu(), xsh_get_normal_calibs(), xsh_ifu_stare_get_calibs(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), and xsh_slit_stare_get_calibs().
| cpl_frame * xsh_find_model_config | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a model config.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3728 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, XSH_MOD_CFG_OPT_2D, XSH_MOD_CFG_OPT_AFC, and XSH_MOD_CFG_TAB.
Referenced by xsh_util_ifu_build_cube().
| cpl_frame * xsh_find_model_config_open | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find model config frame.
| frames | The input frameset |
| instr | the instrument arm setting |
Definition at line 4213 of file xsh_dfs.c.
References check, xsh_find_frame(), xsh_instrument_arm_tostring(), XSH_MOD_CFG_OPEN, xsh_msg_debug, and xsh_stringcat_any().
| cpl_frame * xsh_find_model_config_tab | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a model configuration table frame.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3957 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_MOD_CFG_TAB.
Referenced by main().
| cpl_frame * xsh_find_model_testpar | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find model test parameter list.
| frames | The input frameset |
| instr | the instrument arm setting |
Definition at line 4292 of file xsh_dfs.c.
References check, xsh_find_frame(), xsh_instrument_arm_tostring(), XSH_MODEL_TEST_PAR, and xsh_stringcat_any().
Referenced by xsh_model().
| cpl_frame * xsh_find_model_wavelist | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find model wavelength list frame.
| frames | The input frameset |
| instr | the instrument arm setting |
Definition at line 4265 of file xsh_dfs.c.
References check, xsh_find_frame(), xsh_instrument_arm_tostring(), XSH_MODEL_WAVE_LIST, and xsh_stringcat_any().
Referenced by xsh_model().
| cpl_frame * xsh_find_off | ( | cpl_frameset * | set | ) |
| cpl_frameset * xsh_find_offset_tab_ifu | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find offset tab (One for each slitlet)
| frames | The input frameset where we do the search |
| instrument | The instrument |
Definition at line 3832 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), xsh_free_frameset(), XSH_GET_TAG_FROM_ARM, xsh_msg_warning, XSH_OFFSET_CEN_IFU, XSH_OFFSET_DOWN_IFU, and XSH_OFFSET_UP_IFU.
Referenced by main(), xsh_scired_ifu_offset(), and xsh_scired_ifu_stare().
| cpl_frame * xsh_find_on | ( | cpl_frameset * | set | ) |
| cpl_frame * xsh_find_order_tab_centr | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find an order tab CENTR.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3570 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_ORDER_TAB_CENTR.
Referenced by main(), xsh_calib_nir_mflat_corr_if_JH(), and xsh_mflat().
| cpl_frame * xsh_find_order_tab_edges | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find an order tab EDGES.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3595 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_LAMP, XSH_GET_TAG_FROM_MODE, xsh_msg, xsh_msg_dbg_medium, XSH_ORDER_TAB_AFC, and XSH_ORDER_TAB_EDGES.
Referenced by main(), xsh_2dmap(), xsh_calib_nir_2dmap_corr_if_JH(), xsh_calib_nir_respon_corr_if_JH(), xsh_calib_nir_scired_corr_if_JH(), xsh_calib_nir_wavecal_corr_if_JH(), xsh_flexcomp(), xsh_geom_ifu(), xsh_get_normal_calibs(), xsh_ifu_stare_get_calibs(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_slit_stare_get_calibs(), and xsh_wavecal().
| cpl_frame * xsh_find_order_tab_guess | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find an order tab GUESS.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3545 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_ORDER_TAB_GUESS.
| cpl_frame * xsh_find_order_tab_recov | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find an order tab RECOV.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3520 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_ORDER_TAB_RECOV.
| cpl_frame * xsh_find_raw_arc_slit_nir_off | ( | cpl_frameset * | frames | ) |
Find raw frame for Slit NIR OFF.
| frames | The input frameset |
Definition at line 4164 of file xsh_dfs.c.
References check, XSH_ARC_SLIT_OFF, xsh_find_frame(), and xsh_stringcat_any().
| cpl_frame * xsh_find_raw_arc_slit_nir_on | ( | cpl_frameset * | frames | ) |
Find raw frame for Slit NIR ON.
| frames | The input frameset |
Definition at line 4144 of file xsh_dfs.c.
References check, XSH_ARC_SLIT_NIR, xsh_find_frame(), and xsh_stringcat_any().
| cpl_frame * xsh_find_raw_arc_slit_uvb_vis | ( | cpl_frameset * | frames, |
| XSH_ARM | arm | ||
| ) |
Find raw frame for Slit UVB/VIS.
| frames | The input frameset |
| arm | The ARM (UVB or VIS) |
Definition at line 4118 of file xsh_dfs.c.
References check, XSH_ARC_SLIT_UVB, XSH_ARC_SLIT_VIS, XSH_ARM_UVB, XSH_ARM_VIS, xsh_find_frame(), and xsh_stringcat_any().
| cpl_frame * xsh_find_raw_orderdef_nir | ( | cpl_frameset * | frames | ) |
Find orderdef raw frame for NIR.
| frames | The input frameset |
Definition at line 4043 of file xsh_dfs.c.
References check, xsh_find_frame(), XSH_ORDERDEF_NIR, and xsh_stringcat_any().
Referenced by xsh_orderpos().
| cpl_frame * xsh_find_raw_orderdef_nir_off | ( | cpl_frameset * | frames | ) |
Find orderdef raw frame for NIR OFF.
| frames | The input frameset |
Definition at line 4098 of file xsh_dfs.c.
References check, xsh_find_frame(), XSH_ORDERDEF_OFF, and xsh_stringcat_any().
Referenced by xsh_orderpos().
| cpl_frame * xsh_find_raw_orderdef_vis_uvb | ( | cpl_frameset * | frames | ) |
Find orderdef raw frame for UVB or VIS.
| frames | The input frameset |
Definition at line 4005 of file xsh_dfs.c.
References check, xsh_find_frame(), xsh_msg, XSH_ORDERDEF_D2_UVB, XSH_ORDERDEF_QTH_UVB, XSH_ORDERDEF_VIS, and xsh_stringcat_any().
Referenced by xsh_orderpos().
| cpl_frame * xsh_find_slitmap | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a slit map.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3673 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, XSH_IFU_MAP, and XSH_SLIT_MAP.
Referenced by main(), xsh_check_get_map(), xsh_geom_ifu(), xsh_respon_slit_offset(), xsh_scired_ifu_stare(), xsh_slit_offset_get_calibs(), xsh_slit_stare_get_maps(), and xsh_wavecal().
| cpl_frame * xsh_find_spectral_format | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find spectral format frame.
| frames | The input frameset |
| instr | the instrument arm setting |
Definition at line 4318 of file xsh_dfs.c.
References xsh_instrument::arm, check, XSH_ARM_NIR, xsh_find_frame(), xsh_instrument_arm_tostring(), XSH_SPECTRAL_FORMAT, XSH_SPECTRAL_FORMAT_JH_NIR, and xsh_stringcat_any().
Referenced by main(), xsh_calib_nir_respon_corr_if_JH(), xsh_geom_ifu(), xsh_get_normal_calibs(), xsh_ifu_stare_get_calibs(), xsh_instrument_nir_corr_if_spectral_format_is_JH(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_slit_stare_get_calibs(), and xsh_wavecal().
| cpl_frame * xsh_find_std_flux | ( | cpl_frameset * | frames | ) |
Find standard star frame.
| frames | The input frameset |
The function sets an error if no standard star frame is present.
Definition at line 3262 of file xsh_dfs.c.
References XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_find_frame(), XSH_STD_FLUX_OFFSET, XSH_STD_FLUX_SLIT, XSH_STD_TELL_OFFSET, and XSH_STD_TELL_SLIT.
Referenced by xsh_respon_slit_stare().
| cpl_frame * xsh_find_std_star_flux | ( | cpl_frameset * | frames | ) |
Find standard standard star flux frame.
| frames | The input frameset |
The function sets an error if no standard star frame is present.
Definition at line 3294 of file xsh_dfs.c.
References XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, xsh_find_frame(), and XSH_STD_STAR_FLUX.
| cpl_frame * xsh_find_theo_tab_mode | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a theoretical tab IFU or SINg depending of MODE in SOF.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3490 of file xsh_dfs.c.
References check, xsh_instrument::mode, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, XSH_MODE_IFU, XSH_THEO_TAB_IFU, and XSH_THEO_TAB_SING.
| cpl_frame * xsh_find_theo_tab_mult | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a theoretical tab multi pinhole in SOF.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3468 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_THEO_TAB_MULT.
| cpl_frame * xsh_find_theo_tab_sing | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a theoretical tab signle pinhole in SOF.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3445 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_THEO_TAB_SING.
| cpl_frame * xsh_find_usr_lines_guess_tab | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a user guess line positions table frame.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3932 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_GUESS_LINES_POS.
| cpl_frame * xsh_find_wave_tab | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a wave tab 2D or a wave tab ARC.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3699 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, XSH_GET_TAG_FROM_MODE, XSH_WAVE_TAB_2D, XSH_WAVE_TAB_AFC, and XSH_WAVE_TAB_ARC.
Referenced by xsh_calib_nir_scired_corr_if_JH(), xsh_flexcomp(), xsh_get_dispersion_calibs(), xsh_scired_ifu_stare(), xsh_scired_slit_nod_get_calibs(), and xsh_slit_stare_get_calibs().
| cpl_frame * xsh_find_wave_tab_2d | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a wave tab 2D.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3650 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_WAVE_TAB_2D.
Referenced by main(), and xsh_wavecal().
| cpl_frame * xsh_find_wave_tab_guess | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find a wave tab guess.
| frames | The input frameset where we do the search |
| instr | The instrument |
Definition at line 3625 of file xsh_dfs.c.
References check, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_WAVE_TAB_GUESS.
| cpl_frameset * xsh_find_wave_tab_ifu | ( | cpl_frameset * | frames, |
| xsh_instrument * | instrument | ||
| ) |
Find wave tab ARC (for IFU 3 frames)
| frames | The input frameset where we do the search |
| instrument | The instrument |
Definition at line 3756 of file xsh_dfs.c.
References check, instrument, XSH_ASSURE_NOT_NULL, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, xsh_msg, xsh_msg_warning, XSH_WAVE_TAB_2D, XSH_WAVE_TAB_AFC, XSH_WAVE_TAB_ARC_CEN_IFU, XSH_WAVE_TAB_ARC_DOWN_IFU, and XSH_WAVE_TAB_ARC_UP_IFU.
Referenced by xsh_geom_ifu(), and xsh_scired_ifu_offset().
| cpl_frame * xsh_find_wavemap | ( | cpl_frameset * | frames, |
| xsh_instrument * | instr | ||
| ) |
Find Wave Map frame. The frame returned should not be free by the caller.
| frames | The input frameset |
| instr | the instrument |
Definition at line 3983 of file xsh_dfs.c.
References check, xsh_find_frame(), XSH_GET_TAG_FROM_ARM, and XSH_WAVE_MAP.
Referenced by xsh_check_get_map(), xsh_geom_ifu(), xsh_get_dispersion_calibs(), xsh_respon_slit_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod_get_calibs(), xsh_slit_offset_get_calibs(), xsh_slit_stare_get_maps(), and xsh_wavecal().
| void xsh_frame_config | ( | const char * | fname, |
| const char * | tag, | ||
| cpl_frame_type | type, | ||
| cpl_frame_group | group, | ||
| cpl_frame_level | level, | ||
| cpl_frame ** | frame | ||
| ) |
Define a frame characteristics.
| fname | frame filename |
| tag | frame tag |
| type | frame type |
| group | frame group |
| level | frame level |
| frame | output frame |
Definition at line 900 of file xsh_dfs.c.
References check.
Referenced by xsh_cfg_recover_model_THE_create(), xsh_frame_product(), xsh_util_physmod_model_THE_create(), and xsh_wavelist_subtract_sky().
| cpl_propertylist * xsh_frame_head_extract_qc | ( | cpl_frame * | frm | ) |
Definition at line 4401 of file xsh_dfs.c.
Referenced by xsh_mdark().
|
static |
Definition at line 4795 of file xsh_dfs.c.
References check, xsh_add_temporary_file(), xsh_free_propertylist(), xsh_free_table(), and xsh_get_basename().
Referenced by xsh_calib_nir_2dmap_corr_if_JH(), xsh_calib_nir_mflat_corr_if_JH(), xsh_calib_nir_orderpos_corr_if_JH(), xsh_calib_nir_respon_corr_if_JH(), xsh_calib_nir_scired_corr_if_JH(), and xsh_calib_nir_wavecal_corr_if_JH().
|
static |
Definition at line 4514 of file xsh_dfs.c.
References binx, biny, check, xsh_pre::data_header, xsh_pre::errs_header, xsh_pre::qual_header, rescale, xsh_free_propertylist(), xsh_get_basename(), xsh_msg, xsh_plist_div_by_fct(), xsh_pre_free(), xsh_pre_load(), xsh_pre_save(), and xsh_pre_subsample().
Referenced by xsh_correct_frameset_calib_bin(), and xsh_correct_frameset_raws_bin().
| cpl_frame * xsh_frame_product | ( | const char * | fname, |
| const char * | tag, | ||
| cpl_frame_type | type, | ||
| cpl_frame_group | group, | ||
| cpl_frame_level | level | ||
| ) |
Creates a frame with given characteristics.
| fname | frame filename |
| tag | frame tag |
| type | frame type |
| group | frame group |
| level | frame level |
Definition at line 930 of file xsh_dfs.c.
References check, xsh_frame_config(), and xsh_free_frame().
Referenced by main(), xsh_add_product(), xsh_add_product_bpmap(), xsh_add_product_image(), xsh_add_product_imagelist(), xsh_add_product_table(), xsh_add_product_vector(), xsh_arclist_save(), xsh_build_ifu_cube(), xsh_build_ifu_map(), xsh_catalog_extract_spectrum_frame(), xsh_cfg_recover_gen_xyg_frame(), xsh_compute_linearity(), xsh_compute_noise_map(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_response_ord(), xsh_compute_shift_ifu_slitlet(), xsh_crea_correct_coeff(), xsh_create_master_dark_bpmap(), xsh_cube_qc_trace_window(), xsh_dispersol_list_save(), xsh_dispersol_list_to_slitmap(), xsh_dispersol_list_to_wavemap(), xsh_efficiency_compute(), xsh_flat_merge_qth_d2(), xsh_flat_merge_qth_d2_smooth(), xsh_frame_image_ext_qc_trace_window(), xsh_frame_image_qc_trace_window(), xsh_frameset_average(), xsh_frameset_average_pre(), xsh_get_crh_frame(), xsh_image_get_hot_cold_pixs(), xsh_image_local_cold_pixs(), xsh_image_local_hot_pixs(), xsh_linetilt_list_save(), xsh_localization_save(), xsh_localize_ifu_slitlet(), xsh_model_first_anneal(), xsh_model_first_anneal_save(), xsh_model_maps_create(), xsh_model_pipe_anneal(), xsh_model_spectralformat_create(), xsh_model_THE_create(), xsh_normalize_spectrum(), xsh_normalize_spectrum_ord(), xsh_order_list_save(), xsh_rec_list1D_save_as_tab(), xsh_rec_list_save(), xsh_rec_list_save2(), xsh_rec_list_save_table(), xsh_resid_order_save(), xsh_resid_tab_save(), xsh_shift_offsettab(), xsh_shift_tab_save(), xsh_slice_offset_save(), xsh_spectrum1D_save(), xsh_spectrum_interpolate(), xsh_spectrum_interpolate_linear(), xsh_spectrum_resample(), xsh_star_flux_list_save(), xsh_star_flux_list_save_order(), xsh_subtract_background(), xsh_the_map_save(), xsh_util_afc(), xsh_util_bpmap_coadd(), xsh_util_crh_single(), xsh_util_frameset_collapse_mean(), xsh_util_ifu_build_cube(), xsh_util_model_SPF_create(), xsh_util_multiply_by_response(), xsh_util_multiply_by_response_ord(), xsh_utils_efficiency(), xsh_wavemap_list_save(), xsh_wavemap_list_save2(), and xsh_wavesol_save().
| cpl_error_code xsh_frameset_check_uniform_exptime | ( | cpl_frameset * | raws, |
| xsh_instrument * | inst | ||
| ) |
Definition at line 5119 of file xsh_dfs.c.
References check, XSH_ARM_NIR, xsh_free_propertylist(), xsh_instrument_get_arm(), xsh_msg, xsh_msg_error, xsh_pfits_get_det_win1_uit1(), and xsh_pfits_get_dit().
Referenced by xsh_mdark(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_scired_ifu_offset(), xsh_scired_ifu_stare(), xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
| cpl_frameset * xsh_frameset_drl_frames | ( | cpl_frameset * | set | ) |
extract DRL specific frames from frameset
| set | input frameset |
Definition at line 319 of file xsh_dfs.c.
References check, xsh_free_propertylist(), and xsh_pfits_get_naxis().
Referenced by xsh_merge_ord_ifu().
| cpl_frameset * xsh_frameset_ext_image_frames | ( | cpl_frameset * | set | ) |
Extract frameset sub set containing only table frames.
| set | input frameset |
Definition at line 286 of file xsh_dfs.c.
References check, xsh_free_propertylist(), and xsh_pfits_get_naxis().
Referenced by xsh_scired_ifu_offset().
| cpl_frameset * xsh_frameset_ext_table_frames | ( | cpl_frameset * | set | ) |
Extract frameset sub set containing only table frames.
| set | input frameset |
Definition at line 207 of file xsh_dfs.c.
References check, xsh_free_propertylist(), and xsh_pfits_get_naxis().
Referenced by xsh_respon_slit_offset(), xsh_scired_ifu_offset(), and xsh_scired_slit_offset().
| cpl_frameset * xsh_frameset_extract | ( | const cpl_frameset * | frames, |
| const char * | tag | ||
| ) |
Extract frames with given tag from frameset.
| frames | frame set |
| tag | to search for |
Definition at line 983 of file xsh_dfs.c.
References assure.
Referenced by xsh_cfg_recover_last_step(), xsh_ensure_raws_input_offset_recipe_is_proper(), xsh_extract_obj_and_sky_pairs(), xsh_gain(), xsh_util_ima_arith(), and xsh_util_ima_shift().
| cpl_frameset * xsh_frameset_extract_offsety_matches | ( | cpl_frameset * | raws, |
| const double | offset | ||
| ) |
Extract frames that has same cumoffy as offset.
| raws | input value |
| offset | offset value |
Definition at line 485 of file xsh_dfs.c.
References XSH_ASSURE_NOT_NULL_MSG, xsh_free_propertylist(), and xsh_get_offsety().
Referenced by xsh_extract_nod_pairs().
| cpl_frameset * xsh_frameset_extract_offsety_mismatches | ( | cpl_frameset * | raws, |
| const double | offset | ||
| ) |
Extract frames that has different cumoffy than offset.
| raws | input value |
| offset | offset value |
Definition at line 527 of file xsh_dfs.c.
References M_PI, XSH_ASSURE_NOT_NULL_MSG, xsh_free_propertylist(), xsh_msg, XSH_NOD_CUMULATIVE_OFFSETY, xsh_pfits_get_cumoffsety(), xsh_pfits_get_dec_cumoffset(), xsh_pfits_get_posang(), and xsh_pfits_get_ra_cumoffset().
Referenced by xsh_extract_nod_pairs().
| cpl_frameset * xsh_frameset_extract_pre | ( | cpl_frameset * | frameset, |
| const char * | prefix | ||
| ) |
Extracts pre frames from a frameset.
| frameset | the set of files |
| prefix | the pre frame prefix |
Definition at line 1556 of file xsh_dfs.c.
References check, and xsh_file_exists().
| cpl_error_code xsh_frameset_merge | ( | cpl_frameset * | set1, |
| cpl_frameset * | set2 | ||
| ) |
Extracts raw frames.
| set1 | The input frameset that is extended |
| set2 | The input frameset that is merged to set1 |
Definition at line 1014 of file xsh_dfs.c.
References passure.
Referenced by xsh_ensure_raws_input_offset_recipe_is_proper(), and xsh_lingain().
| cpl_error_code xsh_frameset_uniform_bin | ( | cpl_frameset ** | raws, |
| cpl_frameset ** | calib, | ||
| xsh_instrument * | instrument | ||
| ) |
Definition at line 4664 of file xsh_dfs.c.
References check, instrument, XSH_ARM_NIR, xsh_correct_frameset_calib_bin(), xsh_correct_frameset_raws_bin(), xsh_find_frame_with_tag(), xsh_free_propertylist(), XSH_GET_TAG_FROM_MODE, xsh_instrument_get_arm(), xsh_instrument_set_binx(), xsh_instrument_set_biny(), XSH_MASTER_FLAT, XSH_MASTER_FLAT_SLIT, xsh_msg_error, xsh_pfits_get_binx(), and xsh_pfits_get_biny().
Referenced by xsh_respon_slit_nod(), xsh_respon_slit_offset(), and xsh_respon_slit_stare().
|
static |
Tries to identify the units string to used based in BUNIT.
| header | The header containing the BUNIT keyword to read from. |
| colname | Name of the column to used in error messages. |
Definition at line 5295 of file xsh_dfs.c.
References XSH_BUNIT, XSH_SDP_ADU_UNIT, and XSH_SDP_FLUX_UNIT.
Referenced by xsh_sdp_spectrum_create().
|
static |
Calculates number of raw frames.
| frames | The list of used frames to check. |
Definition at line 5320 of file xsh_dfs.c.
Referenced by xsh_sdp_spectrum_create().
|
static |
Computes offsety.
| plist | propertylist |
Definition at line 448 of file xsh_dfs.c.
References M_PI, xsh_msg, XSH_NOD_CUMULATIVE_OFFSETY, xsh_pfits_get_cumoffsety(), xsh_pfits_get_dec_cumoffset(), xsh_pfits_get_posang(), and xsh_pfits_get_ra_cumoffset().
Referenced by xsh_ensure_raws_number_is_even(), and xsh_frameset_extract_offsety_matches().
| char * xsh_get_tag_from_arm | ( | const char * | tag, |
| xsh_instrument * | instr | ||
| ) |
Find arm specific tag from base and instrument setting.
| tag | The frame tag |
| instr | the settings of instrument |
Definition at line 3374 of file xsh_dfs.c.
References xsh_instrument_arm_tostring(), and xsh_msg_dbg_high.
Referenced by xsh_cfg_recover_last_step(), xsh_cfg_recover_measure_line_xy(), xsh_find_frame_with_tag(), xsh_mbias_fpn(), and xsh_model_first_anneal_save().
| cpl_boolean xsh_mode_is_physmod | ( | cpl_frameset * | set, |
| xsh_instrument * | instrument | ||
| ) |
Definition at line 4411 of file xsh_dfs.c.
References instrument, xsh_find_frame_with_tag(), XSH_MOD_CFG_OPT_2D, XSH_MOD_CFG_OPT_AFC, XSH_MOD_CFG_OPT_FMT, and XSH_MOD_CFG_TAB.
Referenced by xsh_2dmap(), xsh_flexcomp(), xsh_get_dispersion_calibs(), xsh_predict(), xsh_respon_slit_nod(), xsh_scired_get_proper_maps(), xsh_scired_slit_nod_get_calibs(), and xsh_slit_stare_get_calibs().
| int xsh_parameter_get_default_flag | ( | const cpl_parameter * | p | ) |
Check if an input parameter has been changed by the user.
| p | input parameter |
Definition at line 115 of file xsh_dfs.c.
References xsh_msg_error.
Referenced by xsh_params_set_defaults().
| int xsh_print_rec_status | ( | const int | val | ) |
Check if an error has happened and returns error kind and location.
| val | input value |
Definition at line 877 of file xsh_dfs.c.
References xsh_msg_error.
Referenced by test_combine_ima_gauss2(), test_combine_ima_gauss3(), test_combine_lists(), test_create_ima_gauss(), xsh_cfg_recover_extend_xy_pos_frm(), xsh_cfg_recover_guess_tab_corr_by_ordpos(), xsh_cfg_recover_last_step(), xsh_cfg_recover_measure_line_xy(), xsh_cfg_recover_measure_line_xy_fit(), xsh_cfg_recover_model_THE_create(), xsh_combine_nod(), xsh_compute_scale(), xsh_compute_scale_factors_pix_pix(), xsh_compute_scale_tab(), xsh_compute_wavelength_resampling_accuracy(), xsh_create_sampl_table(), xsh_create_sampl_uniform_continuum(), xsh_dfs_split_offset(), xsh_find_image_scale_factors(), xsh_hdrl_remove_crh_single(), xsh_image_cut_dichroic_uvb(), xsh_lines_set_breakpoints(), xsh_model_refining_detect(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_respon_slit_stare(), xsh_skycorr_wave_sampling_create(), xsh_util_model_SPF_create(), xsh_util_physmod_model_THE_create(), and xsh_wavemap_list_save2().
|
static |
Converts data into Science Data Product 1D spectrum format.
| [out] | sdp_spectrum | The SDP output spectrum object the will be filled. |
| [in] | usedframes | List of frames used to generate the output spectrum. |
| [in] | sourcekeys | The list of FITS keywords from the source product file being converted to SDP format. |
| [in] | instrument | The X-Shooter instrument configuration structure. |
| [in] | spectrum | The loaded flux calibrated spectrum in X-Shooter format. |
| [in] | uncal_spectrum | The loaded uncalibrated spectrum in X-Shooter format. |
Definition at line 5583 of file xsh_dfs.c.
References xsh_spectrum::errs_header, exptime, xsh_spectrum::flux_header, _xsh_column_info::format, instrument, _xsh_column_info::name, replace_spaces_with_underscores(), _xsh_column_info::tucd, _xsh_column_info::tutyp, _xsh_column_info::type, _xsh_column_info::unit, xsh_aperture_string_to_double(), XSH_ARM_NIR, xsh_arm_tostring(), XSH_ARM_UVB, XSH_ARM_VIS, xsh_calculate_exptime(), XSH_CDELT1, xsh_compute_ron_nir(), XSH_CONAD, XSH_CRDER1, XSH_CRPIX1, XSH_CRVAL1, XSH_CSYER1, XSH_DEC, XSH_DET_DIT, XSH_DET_NDIT, XSH_DET_NDITSKIP, XSH_EXPTIME, xsh_find_first_mjd_obs(), xsh_get_column_unit(), xsh_get_nraws(), xsh_instrument_get_arm(), XSH_MJDEND, XSH_MJDOBS, xsh_msg_warning, XSH_NAXIS1, XSH_OBS_ID, XSH_OBS_PROG_ID, XSH_OBS_TARG_NAME, xsh_pfits_get_date_obs(), xsh_pfits_get_dit(), xsh_pfits_get_obs_id(), XSH_PRO_REC1_PIPE_ID, XSH_PRO_TECH, XSH_QC_FLUX_SN, XSH_RA, XSH_RON, XSH_SCIENCE_SPECTRUM, XSH_SDP_COLUMN_ERR, XSH_SDP_COLUMN_ERR_FORMAT, XSH_SDP_COLUMN_ERR_REDUCED, XSH_SDP_COLUMN_ERR_REDUCED_FORMAT, XSH_SDP_COLUMN_ERR_REDUCED_TYPE, XSH_SDP_COLUMN_ERR_REDUCED_UCD, XSH_SDP_COLUMN_ERR_TYPE, XSH_SDP_COLUMN_ERR_UCD, XSH_SDP_COLUMN_FLUX, XSH_SDP_COLUMN_FLUX_FORMAT, XSH_SDP_COLUMN_FLUX_REDUCED, XSH_SDP_COLUMN_FLUX_REDUCED_FORMAT, XSH_SDP_COLUMN_FLUX_REDUCED_TYPE, XSH_SDP_COLUMN_FLUX_REDUCED_UCD, XSH_SDP_COLUMN_FLUX_TYPE, XSH_SDP_COLUMN_FLUX_UCD, XSH_SDP_COLUMN_QUAL, XSH_SDP_COLUMN_QUAL_FORMAT, XSH_SDP_COLUMN_QUAL_TYPE, XSH_SDP_COLUMN_QUAL_UCD, XSH_SDP_COLUMN_QUAL_UNIT, XSH_SDP_COLUMN_SNR, XSH_SDP_COLUMN_SNR_FORMAT, XSH_SDP_COLUMN_SNR_TYPE, XSH_SDP_COLUMN_SNR_UCD, XSH_SDP_COLUMN_SNR_UNIT, XSH_SDP_COLUMN_WAVE, XSH_SDP_COLUMN_WAVE_FORMAT, XSH_SDP_COLUMN_WAVE_TYPE, XSH_SDP_COLUMN_WAVE_UCD, XSH_SDP_COLUMN_WAVE_UNIT, XSH_SDP_KEYWORD_APERTURE, XSH_SDP_KEYWORD_DETRON, XSH_SDP_KEYWORD_DISPELEM, XSH_SDP_KEYWORD_EFFRON, XSH_SDP_KEYWORD_EXTNAME_VALUE, XSH_SDP_KEYWORD_FLUXCAL, XSH_SDP_KEYWORD_FLUXERR_VALUE, XSH_SDP_KEYWORD_GAIN, XSH_SDP_KEYWORD_INHERIT_VALUE, XSH_SDP_KEYWORD_LAMNLIN, XSH_SDP_KEYWORD_LAMRMS, XSH_SDP_KEYWORD_OBJECT, XSH_SDP_KEYWORD_ORIGIN, XSH_SDP_KEYWORD_ORIGIN_VALUE, XSH_SDP_KEYWORD_PRODLVL, XSH_SDP_KEYWORD_PRODLVL_VALUE, XSH_SDP_KEYWORD_REFERENC_VALUE, XSH_SDP_KEYWORD_SPEC_ERR, XSH_SDP_KEYWORD_SPEC_RES, XSH_SDP_KEYWORD_SPEC_SYE, XSH_SDP_KEYWORD_SPECSYS, XSH_SDP_KEYWORD_SPECSYS_VALUE, XSH_SDP_KEYWORD_TELAPSE, XSH_SDP_KEYWORD_TITLE, XSH_SDP_KEYWORD_TMID, XSH_SDP_KEYWORD_TOT_FLUX, XSH_SDP_KEYWORD_VOCLASS_VALUE, XSH_SDP_KEYWORD_VOPUB_VALUE, XSH_SLIT_NIR, XSH_SLIT_UVB, XSH_SLIT_VIS, xsh_spectrum_get_errs(), xsh_spectrum_get_flux(), xsh_spectrum_get_lambda_max(), xsh_spectrum_get_lambda_min(), xsh_spectrum_get_lambda_step(), xsh_spectrum_get_qual(), and xsh_spectrum_get_size().
Referenced by xsh_add_sdp_product_spectrum().
| cpl_error_code xsh_table_save | ( | cpl_table * | t, |
| cpl_propertylist * | ph, | ||
| cpl_propertylist * | xh, | ||
| const char * | fname, | ||
| const int | ext | ||
| ) |
Definition at line 5171 of file xsh_dfs.c.
Referenced by xsh_telluric_model_eval().
| char * xsh_unique_filename | ( | const char * | context, |
| const char * | caller_id, | ||
| const char * | pro_catg | ||
| ) |
Get unique product filename.
| context | The current context, or NULL |
| caller_id | Name of calling module |
| pro_catg | The PROduct CATeGory |
This function can be used to avoid overwriting existing files. It computes the filename depending on the current context (position in the call-tree).
If this turns out not to be a problem, one could simply use pro_catg.fits as the filename.
Definition at line 1737 of file xsh_dfs.c.
References xsh_stringcat_4(), and xsh_stringcat_6().
| cpl_error_code xsh_validate_model_cfg | ( | cpl_frame * | mod, |
| cpl_frameset * | set | ||
| ) |
Validate model cfg.
| mod | model cfg frame |
| set | input frameset |
Definition at line 169 of file xsh_dfs.c.
References check, xsh_msg_warning, and xsh_pfits_get_mjdobs().