|
X-shooter Pipeline Reference Manual 3.8.15
|
Functions | |
| xsh_spectrum * | xsh_spectrum_1D_create (double lambda_min, double lambda_max, double lambda_step) |
| Create a 1D spectrum structure. | |
| xsh_spectrum * | xsh_spectrum_2D_create (double lambda_min, double lambda_max, double lambda_step, double slit_min, double slit_max, double slit_step) |
| Create a 2D spectrum structure. | |
| xsh_spectrum * | xsh_spectrum_load (cpl_frame *s1d_frame) |
| Load a 1D spectrum structure. | |
| xsh_spectrum * | xsh_spectrum_load_order (cpl_frame *s1d_frame, xsh_instrument *instr, const int order) |
| Load a 1D spectrum structure. | |
| int | xsh_spectrum_get_size (xsh_spectrum *s) |
| Get size of spectrum. | |
| int | xsh_spectrum_get_size_lambda (xsh_spectrum *s) |
| Get lambda axis size of spectrum. | |
| int | xsh_spectrum_get_size_slit (xsh_spectrum *s) |
| Get slit axis ize of spectrum. | |
| double | xsh_spectrum_get_lambda_min (xsh_spectrum *s) |
| Get minimum lambda of spectrum. | |
| double | xsh_spectrum_get_lambda_max (xsh_spectrum *s) |
| Get maximum lambda of spectrum. | |
| double | xsh_spectrum_get_lambda_step (xsh_spectrum *s) |
| Get bin in lambda of spectrum. | |
| double * | xsh_spectrum_get_flux (xsh_spectrum *s) |
| Get flux of spectrum. | |
| double * | xsh_spectrum_get_errs (xsh_spectrum *s) |
| Get errs of spectrum. | |
| int * | xsh_spectrum_get_qual (xsh_spectrum *s) |
| Get qual of spectrum. | |
| cpl_image * | xsh_spectrum_get_flux_ima (xsh_spectrum *s) |
| Get flux of spectrum as image. | |
| cpl_image * | xsh_spectrum_get_errs_ima (xsh_spectrum *s) |
| Get flux of spectrum as image. | |
| cpl_image * | xsh_spectrum_get_qual_ima (xsh_spectrum *s) |
| Get flux of spectrum as image. | |
| void | xsh_spectrum_free (xsh_spectrum **s) |
| free memory associated to an 1D spectrum | |
| cpl_frame * | xsh_spectrum_save (xsh_spectrum *s, const char *filename, const char *tag) |
| save a spectrum | |
| cpl_frame * | xsh_spectrum_save_order (xsh_spectrum *s, const char *filename, const char *tag, const int order) |
| save a spectrum | |
| xsh_spectrum * | xsh_spectrum_duplicate (xsh_spectrum *org) |
| xsh_spectrum * | xsh_spectrum_extract_range (xsh_spectrum *org, const double wmin, const double wmax) |
| cpl_error_code | xsh_spectrum_cut_dichroic_uvb (cpl_frame *frame1d) |
| cpl_error_code | xsh_spectrum_orders_cut_dichroic_uvb (cpl_frame *frame1d, xsh_instrument *instr) |
| cpl_frame * | xsh_phys_spectrum_save (xsh_spectrum *s, const char *filename, xsh_instrument *instr) |
| save a spectrum | |
| cpl_frame * xsh_phys_spectrum_save | ( | xsh_spectrum * | s, |
| const char * | filename, | ||
| xsh_instrument * | instr | ||
| ) |
save a spectrum
| [in] | s | spectrum structure to save |
| [in] | filename | name of the save file |
| [in] | instr | instrument |
Definition at line 1052 of file xsh_data_spectrum.c.
References check, check_msg, s, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_vector(), XSH_GET_TAG_FROM_ARM, xsh_pfits_set_pcatg(), XSH_PHYS_MERGE1D, XSH_PHYS_MERGE2D, XSH_SPECTRUM_DATA_BPP, XSH_SPECTRUM_ERRS_BPP, and XSH_SPECTRUM_QUAL_BPP.
Referenced by xsh_calibrate_flux().
| xsh_spectrum * xsh_spectrum_1D_create | ( | double | lambda_min, |
| double | lambda_max, | ||
| double | lambda_step | ||
| ) |
Create a 1D spectrum structure.
| [in] | lambda_min | minimum wavelength of spectrum |
| [in] | lambda_max | maximum wavelength of spectrum |
| [in] | lambda_step | lambda binning |
Definition at line 69 of file xsh_data_spectrum.c.
References check, xsh_spectrum::errs, xsh_spectrum::errs_header, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, lambda_step, xsh_spectrum::lambda_step, xsh_spectrum::qual, xsh_spectrum::qual_header, xsh_spectrum::size, xsh_spectrum::size_lambda, xsh_spectrum::size_slit, xsh_spectrum::slit_max, xsh_spectrum::slit_min, XSH_ASSURE_NOT_ILLEGAL, XSH_CALLOC, XSH_NEW_PROPERTYLIST, xsh_pfits_set_extname(), xsh_pfits_set_wcs1(), and xsh_spectrum_free().
Referenced by create_input_product_frame(), and xsh_merge_ord_with_tag().
| xsh_spectrum * xsh_spectrum_2D_create | ( | double | lambda_min, |
| double | lambda_max, | ||
| double | lambda_step, | ||
| double | slit_min, | ||
| double | slit_max, | ||
| double | slit_step | ||
| ) |
Create a 2D spectrum structure.
| [in] | lambda_min | minimum wavelength of spectrum |
| [in] | lambda_max | maximum wavelength of spectrum |
| [in] | lambda_step | lambda binning |
| [in] | slit_min | minimum slit value |
| [in] | slit_max | maximum slit value |
| [in] | slit_step | slit step |
Definition at line 130 of file xsh_data_spectrum.c.
References check, xsh_spectrum::errs, xsh_spectrum::errs_header, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, lambda_step, xsh_spectrum::lambda_step, xsh_spectrum::qual, xsh_spectrum::qual_header, xsh_spectrum::size, xsh_spectrum::size_lambda, xsh_spectrum::size_slit, xsh_spectrum::slit_max, xsh_spectrum::slit_min, slit_step, xsh_spectrum::slit_step, XSH_ASSURE_NOT_ILLEGAL, XSH_CALLOC, XSH_NEW_PROPERTYLIST, xsh_pfits_set_extname(), xsh_pfits_set_wcs1(), xsh_pfits_set_wcs2(), xsh_set_cd_matrix2d(), and xsh_spectrum_free().
Referenced by main(), and xsh_merge_ord_with_tag().
| cpl_error_code xsh_spectrum_cut_dichroic_uvb | ( | cpl_frame * | frame1d | ) |
Definition at line 905 of file xsh_data_spectrum.c.
References assure, check, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, xsh_spectrum::size, xsh_free_frame(), xsh_free_propertylist(), xsh_pfits_get_pcatg(), xsh_spectrum_extract_range(), xsh_spectrum_free(), xsh_spectrum_load(), xsh_spectrum_save(), and XSH_UVB_DICHROIC_WAVE_CUT.
Referenced by xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
| xsh_spectrum * xsh_spectrum_duplicate | ( | xsh_spectrum * | org | ) |
Definition at line 822 of file xsh_data_spectrum.c.
References check, xsh_spectrum::errs, xsh_spectrum::errs_header, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, xsh_spectrum::qual, xsh_spectrum::qual_header, xsh_spectrum::size, xsh_spectrum::size_lambda, xsh_spectrum::size_slit, xsh_spectrum::slit_max, xsh_spectrum::slit_min, XSH_ASSURE_NOT_NULL, and XSH_CALLOC.
Referenced by do_calib_spectrum().
| xsh_spectrum * xsh_spectrum_extract_range | ( | xsh_spectrum * | org, |
| const double | wmin, | ||
| const double | wmax | ||
| ) |
Definition at line 853 of file xsh_data_spectrum.c.
References check, xsh_spectrum::errs, xsh_spectrum::errs_header, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, xsh_spectrum::qual, xsh_spectrum::qual_header, xsh_spectrum::size, xsh_spectrum::size_lambda, xsh_spectrum::size_slit, xsh_spectrum::slit_max, xsh_spectrum::slit_min, XSH_ASSURE_NOT_NULL, and XSH_CALLOC.
Referenced by xsh_spectrum_cut_dichroic_uvb(), and xsh_spectrum_orders_cut_dichroic_uvb().
| void xsh_spectrum_free | ( | xsh_spectrum ** | s | ) |
free memory associated to an 1D spectrum
| [in] | s | spectrum structure to free |
Definition at line 607 of file xsh_data_spectrum.c.
References s, XSH_FREE, xsh_free_image(), and xsh_free_propertylist().
Referenced by analyse_localization(), analyse_merge_ord(), analyse_spectrum(), create_input_product_frame(), main(), xsh_add_product_spectrum(), xsh_add_sdp_product_spectrum(), xsh_compute_absorp(), xsh_compute_resampling_accuracy(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_response_ord(), xsh_compute_wavelength_resampling_accuracy(), xsh_frame_spectrum_save(), xsh_localize_ifu_slitlet(), xsh_localize_obj_auto(), xsh_mark_tell(), xsh_merge_ord_with_tag(), xsh_monitor_spectrum1D_extra_qc(), xsh_monitor_spectrum1D_flux(), xsh_obs_std_correct(), xsh_spectrum_1D_create(), xsh_spectrum_2D_create(), xsh_spectrum_cut_dichroic_uvb(), xsh_spectrum_load(), xsh_spectrum_load_order(), xsh_spectrum_orders_cut_dichroic_uvb(), xsh_star_flux_list_load_spectrum(), and xsh_star_flux_list_to_frame().
| double * xsh_spectrum_get_errs | ( | xsh_spectrum * | s | ) |
Get errs of spectrum.
| [in] | s | spectrum structure |
Definition at line 510 of file xsh_data_spectrum.c.
References check, s, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_localize_ifu_slitlet(), xsh_merge_ord_with_tag(), xsh_sdp_spectrum_create(), and xsh_spectrum_to_table().
| cpl_image * xsh_spectrum_get_errs_ima | ( | xsh_spectrum * | s | ) |
Get flux of spectrum as image.
| [in] | s | spectrum structure |
Definition at line 571 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
| double * xsh_spectrum_get_flux | ( | xsh_spectrum * | s | ) |
Get flux of spectrum.
| [in] | s | spectrum structure |
Definition at line 488 of file xsh_data_spectrum.c.
References check, s, and XSH_ASSURE_NOT_NULL.
Referenced by analyse_merge_ord(), analyse_spectrum(), do_calib_spectrum(), main(), xsh_compute_absorp(), xsh_localize_ifu_slitlet(), xsh_merge_ord_with_tag(), xsh_response_calculate(), xsh_sdp_spectrum_create(), xsh_spectrum_correct(), xsh_spectrum_to_table(), and xsh_star_flux_list_to_frame().
| cpl_image * xsh_spectrum_get_flux_ima | ( | xsh_spectrum * | s | ) |
Get flux of spectrum as image.
| [in] | s | spectrum structure |
Definition at line 553 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
| double xsh_spectrum_get_lambda_max | ( | xsh_spectrum * | s | ) |
Get maximum lambda of spectrum.
| [in] | s | spectrum structure |
Definition at line 445 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_response_calculate(), xsh_sdp_spectrum_create(), xsh_spectrum_correct(), and xsh_telluric_model_eval().
| double xsh_spectrum_get_lambda_min | ( | xsh_spectrum * | s | ) |
Get minimum lambda of spectrum.
| [in] | s | spectrum structure |
Definition at line 424 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
Referenced by do_calib_spectrum(), xsh_localize_ifu_slitlet(), xsh_response_calculate(), xsh_sdp_spectrum_create(), xsh_spectrum_correct(), xsh_spectrum_to_table(), and xsh_telluric_model_eval().
| double xsh_spectrum_get_lambda_step | ( | xsh_spectrum * | s | ) |
Get bin in lambda of spectrum.
| [in] | s | spectrum structure |
Definition at line 466 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
Referenced by do_calib_spectrum(), xsh_localize_ifu_slitlet(), xsh_response_calculate(), xsh_sdp_spectrum_create(), xsh_spectrum_correct(), and xsh_spectrum_to_table().
| int * xsh_spectrum_get_qual | ( | xsh_spectrum * | s | ) |
Get qual of spectrum.
| [in] | s | spectrum structure |
Definition at line 532 of file xsh_data_spectrum.c.
References check, s, and XSH_ASSURE_NOT_NULL.
Referenced by analyse_spectrum(), do_calib_spectrum(), xsh_localize_ifu_slitlet(), xsh_mark_tell(), xsh_merge_ord_with_tag(), xsh_response_calculate(), xsh_sdp_spectrum_create(), and xsh_spectrum_to_table().
| cpl_image * xsh_spectrum_get_qual_ima | ( | xsh_spectrum * | s | ) |
Get flux of spectrum as image.
| [in] | s | spectrum structure |
Definition at line 590 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
| int xsh_spectrum_get_size | ( | xsh_spectrum * | s | ) |
Get size of spectrum.
| [in] | s | spectrum structure |
Definition at line 360 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_mark_tell(), xsh_response_calculate(), xsh_sdp_spectrum_create(), and xsh_spectrum_correct().
| int xsh_spectrum_get_size_lambda | ( | xsh_spectrum * | s | ) |
Get lambda axis size of spectrum.
| [in] | s | spectrum structure |
Definition at line 381 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
Referenced by do_calib_spectrum(), main(), xsh_compute_absorp(), xsh_localize_obj_auto(), xsh_merge_ord_with_tag(), and xsh_spectrum_to_table().
| int xsh_spectrum_get_size_slit | ( | xsh_spectrum * | s | ) |
Get slit axis ize of spectrum.
| [in] | s | spectrum structure |
Definition at line 403 of file xsh_data_spectrum.c.
References s, and XSH_ASSURE_NOT_NULL.
Referenced by do_calib_spectrum(), main(), xsh_localize_obj_auto(), and xsh_merge_ord_with_tag().
| xsh_spectrum * xsh_spectrum_load | ( | cpl_frame * | s1d_frame | ) |
Load a 1D spectrum structure.
| [in] | s1d_frame | the 1D spectrum frame |
Definition at line 189 of file xsh_data_spectrum.c.
References check, xsh_spectrum::errs, xsh_spectrum::errs_header, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, xsh_spectrum::qual, xsh_spectrum::qual_header, xsh_spectrum::size, size, xsh_spectrum::size_lambda, xsh_spectrum::size_slit, xsh_spectrum::slit_max, xsh_spectrum::slit_min, xsh_spectrum::slit_step, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_free_vector(), xsh_pfits_get_cdelt1(), xsh_pfits_get_cdelt2(), xsh_pfits_get_crval1(), xsh_pfits_get_crval2(), xsh_pfits_get_naxis(), xsh_pfits_get_naxis1(), xsh_pfits_get_naxis2(), xsh_spectrum_free(), and xsh_unwrap_vector().
Referenced by analyse_localization(), analyse_merge_ord(), analyse_spectrum(), main(), xsh_add_product_spectrum(), xsh_add_sdp_product_spectrum(), xsh_calibrate_flux(), xsh_compute_absorp(), xsh_compute_resampling_accuracy(), xsh_compute_response(), xsh_compute_response2(), xsh_compute_wavelength_resampling_accuracy(), xsh_frame_spectrum_save(), xsh_localize_ifu_slitlet(), xsh_localize_obj_auto(), xsh_mark_tell(), xsh_monitor_spectrum1D_extra_qc(), xsh_monitor_spectrum1D_flux(), xsh_obs_std_correct(), xsh_spectrum_cut_dichroic_uvb(), xsh_star_flux_list_load_spectrum(), and xsh_star_flux_list_to_frame().
| xsh_spectrum * xsh_spectrum_load_order | ( | cpl_frame * | s1d_frame, |
| xsh_instrument * | instr, | ||
| const int | order | ||
| ) |
Load a 1D spectrum structure.
| [in] | s1d_frame | the 1D spectrum frame |
| [in] | instr | instrument structure |
| [in] | order | order to be loaded |
Definition at line 274 of file xsh_data_spectrum.c.
References check, xsh_spectrum::errs, xsh_spectrum::errs_header, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, order, xsh_spectrum::qual, xsh_spectrum::qual_header, xsh_spectrum::size, size, xsh_spectrum::size_lambda, xsh_spectrum::size_slit, xsh_spectrum::slit_max, xsh_spectrum::slit_min, xsh_spectrum::slit_step, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_free_vector(), xsh_pfits_get_cdelt1(), xsh_pfits_get_cdelt2(), xsh_pfits_get_crval1(), xsh_pfits_get_crval2(), xsh_pfits_get_naxis(), xsh_pfits_get_naxis1(), xsh_pfits_get_naxis2(), xsh_spectrum_free(), and xsh_unwrap_vector().
Referenced by xsh_compute_response_ord(), and xsh_spectrum_orders_cut_dichroic_uvb().
| cpl_error_code xsh_spectrum_orders_cut_dichroic_uvb | ( | cpl_frame * | frame1d, |
| xsh_instrument * | instr | ||
| ) |
Definition at line 969 of file xsh_data_spectrum.c.
References assure, check, xsh_spectrum::lambda_max, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, xsh_spectrum::size, xsh_free_frame(), xsh_free_propertylist(), xsh_pfits_get_pcatg(), xsh_spectrum_extract_range(), xsh_spectrum_free(), xsh_spectrum_load_order(), xsh_spectrum_save(), xsh_spectrum_save_order(), and XSH_UVB_DICHROIC_WAVE_CUT.
Referenced by xsh_scired_slit_nod(), xsh_scired_slit_offset(), and xsh_scired_slit_stare().
| cpl_frame * xsh_spectrum_save | ( | xsh_spectrum * | s, |
| const char * | filename, | ||
| const char * | tag | ||
| ) |
save a spectrum
| [in] | s | spectrum structure to save |
| [in] | filename | name of the save file |
| [in] | tag | spectrum pro catg |
Definition at line 631 of file xsh_data_spectrum.c.
References check, check_msg, s, XSH_ASSURE_NOT_NULL, XSH_BUNIT_NONE_C, xsh_free_frame(), xsh_free_vector(), xsh_pfits_get_cdelt1(), xsh_pfits_get_cdelt2(), xsh_pfits_get_crpix1(), xsh_pfits_get_crpix2(), xsh_pfits_get_crval1(), xsh_pfits_get_crval2(), xsh_pfits_set_bunit(), xsh_pfits_set_ctype1(), xsh_pfits_set_cunit1(), xsh_pfits_set_extname(), xsh_pfits_set_pcatg(), xsh_pfits_set_wcs(), xsh_pfits_set_wcs1(), xsh_plist_set_extra_keys(), XSH_SPECTRUM_DATA_BPP, XSH_SPECTRUM_ERRS_BPP, and XSH_SPECTRUM_QUAL_BPP.
Referenced by create_input_product_frame(), main(), xsh_add_product_spectrum(), xsh_compute_resampling_accuracy(), xsh_compute_response(), xsh_compute_wavelength_resampling_accuracy(), xsh_frame_spectrum_save(), xsh_mark_tell(), xsh_merge_ord_with_tag(), xsh_monitor_spectrum1D_extra_qc(), xsh_monitor_spectrum1D_flux(), xsh_spectrum_cut_dichroic_uvb(), xsh_spectrum_orders_cut_dichroic_uvb(), and xsh_star_flux_list_to_frame().
| cpl_frame * xsh_spectrum_save_order | ( | xsh_spectrum * | s, |
| const char * | filename, | ||
| const char * | tag, | ||
| const int | order | ||
| ) |
save a spectrum
| [in] | s | spectrum structure to save |
| [in] | filename | name of the save file |
| [in] | tag | spectrum pro catg |
| [in] | order | spectrum relative order (if >0 spectrum is saved as extend) |
Definition at line 756 of file xsh_data_spectrum.c.
References check, check_msg, order, s, XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_free_vector(), xsh_pfits_set_pcatg(), XSH_SPECTRUM_DATA_BPP, XSH_SPECTRUM_ERRS_BPP, and XSH_SPECTRUM_QUAL_BPP.
Referenced by xsh_compute_response_ord(), and xsh_spectrum_orders_cut_dichroic_uvb().