Functions | |
static cpl_frame * | xsh_extract_with_tag (cpl_frame *rec_frame, cpl_frame *loc_frame, xsh_instrument *instrument, xsh_extract_param *extract_par, const char *tag, cpl_frame **res_frame_ext) |
Simple 1D extraction of point source like object. | |
static cpl_error_code | xsh_extraction_get_slit_minmax (xsh_localization *loc_list, const double lambda, const double slit_0, const double slit_step, const int nslit, int *ylow, int *yup, double *y_frac_up, double *y_frac_low) |
cpl_error_code | xsh_extract_clean_slice (const float *flux, const float *errs, int *qual, const double *lambda, const int ilambda, xsh_instrument *instrument, const int slit_min, const int slit_max, const int nlambda, const int nslit, const int mask_hsize, double *fluxval, double *errval, int *qualval) |
static cpl_frame * | xsh_extract_clean_with_tag (cpl_frame *rec_frame, cpl_frame *loc_frame, xsh_instrument *instrument, xsh_extract_param *extract_par, xsh_interpolate_bp_param *ipol_bp_par, const char *tag, cpl_frame **res_frame_ext) |
Simple 1D extraction of point source like object. | |
cpl_frame * | xsh_extract (cpl_frame *rec_frame, cpl_frame *loc_frame, xsh_instrument *instrument, xsh_extract_param *extract_par, cpl_frame **res_frame_ext, const char *rec_prefix) |
simple 1D extraction of point source like object | |
cpl_frame * | xsh_extract_clean (cpl_frame *rec_frame, cpl_frame *loc_frame, xsh_instrument *instrument, xsh_extract_param *extract_par, xsh_interpolate_bp_param *ipol_bp_par, cpl_frame **res_frame_ext, const char *rec_prefix) |
simple 1D extraction of point source like object | |
cpl_frameset * | xsh_extract_ifu (cpl_frameset *rec_frameset, cpl_frameset *loc_frameset, xsh_instrument *instrument, xsh_extract_param *extract_par, const char *rec_prefix) |
Loop on IFU Frames to extract simple 1D (1 per slitlet). | |
static void | fill_img (cpl_image *img, int ilambda, cpl_image *down, cpl_image *cen, cpl_image *up, int up_shift, int cen_shift) |
static void | make_data_cube (xsh_pre_3d *pre_3d, xsh_pre *pre_down, xsh_pre *pre_cen, xsh_pre *pre_up) |
cpl_frame * | xsh_format (cpl_frameset *spectrum_frame_set, const char *result_name, xsh_instrument *instrument, const char *rec_prefix) |
static int * | create_sky_mask (cpl_frame *sky_line_frame, int size, double lambda_min, double lambda_step, xsh_instrument *instrument) |
Create a sky mask from a SKY LINE lIST where flag sky lines are 1. | |
void | xsh_center_cube (cpl_frame *cube_frame, cpl_frame *sky_line_frame, int chunk_size, xsh_instrument *instrument) |
Shift a cube to center object at 0 arcsec. | |
cpl_frame * | xsh_cube (cpl_frameset *merge2d_frameset, xsh_instrument *instrument, const char *rec_prefix) |
Create a cube. |
Function ...
static int* create_sky_mask | ( | cpl_frame * | sky_line_frame, | |
int | size, | |||
double | lambda_min, | |||
double | lambda_step, | |||
xsh_instrument * | instrument | |||
) | [static] |
Create a sky mask from a SKY LINE lIST where flag sky lines are 1.
[in] | sky_line_frame | A Sky line list |
[in] | size | Size of mask |
[in] | chunk_size | Size of chunk along wavelength direction |
Definition at line 311 of file xsh_format.c.
References check, XSH_CALLOC, XSH_FREE, xsh_instrument_arm_tostring(), xsh_instrument_mode_tostring(), xsh_msg, xsh_msg_dbg_low, xsh_resolution_get(), xsh_round_double(), xsh_sort_table_1(), XSH_TABLE_FREE, and XSH_TABLE_LOAD.
Referenced by xsh_center_cube().
static void fill_img | ( | cpl_image * | img, | |
int | ilambda, | |||
cpl_image * | down, | |||
cpl_image * | cen, | |||
cpl_image * | up, | |||
int | up_shift, | |||
int | cen_shift | |||
) | [static] |
Definition at line 67 of file xsh_format.c.
References check, nx, ny, and xsh_msg_dbg_high.
Referenced by make_data_cube().
static void make_data_cube | ( | xsh_pre_3d * | pre_3d, | |
xsh_pre * | pre_down, | |||
xsh_pre * | pre_cen, | |||
xsh_pre * | pre_up | |||
) | [static] |
Definition at line 110 of file xsh_format.c.
References check, xsh_pre_3d::data, xsh_pre::data, xsh_pre_3d::errs, xsh_pre::errs, fill_img(), nx, ny, xsh_pre_3d::qual, xsh_pre::qual, xsh_free_image(), xsh_image_3d_insert(), xsh_msg, xsh_pre_3d_get_nx(), xsh_pre_3d_get_ny(), and xsh_pre_3d_get_nz().
Referenced by xsh_cube(), and xsh_format().
void xsh_center_cube | ( | cpl_frame * | cube_frame, | |
cpl_frame * | sky_line_frame, | |||
int | chunk_size, | |||
xsh_instrument * | instrument | |||
) |
Shift a cube to center object at 0 arcsec.
[in,out] | cube | The Data cube |
[in] | sky | lines frame The sky lines table or NULL |
[in] | chunk_size | Size of chunk along wavelength direction |
Definition at line 367 of file xsh_format.c.
References check, create_sky_mask(), xsh_pre_3d::data_header, sigma, XSH_ASSURE_NOT_NULL, xsh_error_reset, XSH_FREE, xsh_free_vector(), xsh_image_3d_get_data(), xsh_image_3d_get_size_x(), xsh_image_3d_get_size_y(), xsh_image_3d_get_size_z(), XSH_MALLOC, xsh_msg, xsh_pfits_get_cdelt2(), xsh_pfits_get_cdelt3(), xsh_pfits_get_crval2(), xsh_pfits_get_crval3(), xsh_pre_3d_free(), xsh_pre_3d_get_data(), xsh_pre_3d_load(), xsh_unwrap_vector(), and y.
Referenced by main().
cpl_frame* xsh_cube | ( | cpl_frameset * | merge2d_frameset, | |
xsh_instrument * | instrument, | |||
const char * | rec_prefix | |||
) |
Create a cube.
[in] | merge2d_frameset | merge 2D IFU slitlets frameset |
[in] | result_name | Name of cube |
[in] | instrument | the instrument in use |
[in] | rec_prefix | prefix of recipe |
Definition at line 496 of file xsh_format.c.
References check, xsh_pre::data_header, xsh_pre_3d::data_header, xsh_pre_3d::errs_header, make_data_cube(), xsh_pre_3d::qual_header, XSH_ASSURE_NOT_NULL, xsh_error_reset, xsh_free_frame(), XSH_GET_TAG_FROM_ARM, XSH_MERGE3D_IFU, 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_get_shiftifu_lambdaref(), xsh_pfits_get_shiftifu_slitref(), xsh_pfits_set_cdelt1(), xsh_pfits_set_cdelt2(), xsh_pfits_set_cdelt3(), xsh_pfits_set_crpix1(), xsh_pfits_set_crpix2(), xsh_pfits_set_crpix3(), xsh_pfits_set_crval1(), xsh_pfits_set_crval2(), xsh_pfits_set_crval3(), xsh_pfits_set_ctype3(), xsh_pfits_set_cunit1(), xsh_pfits_set_cunit2(), xsh_pfits_set_cunit3(), xsh_pfits_set_pcatg(), xsh_pfits_set_shiftifu_lambdaref(), xsh_pfits_set_shiftifu_slitcenref(), xsh_pfits_set_shiftifu_slitdownref(), xsh_pfits_set_shiftifu_slitupref(), xsh_pre_3d_free(), xsh_pre_3d_new(), xsh_pre_3d_save(), xsh_pre_flip(), xsh_pre_free(), xsh_pre_get_nx(), xsh_pre_get_ny(), xsh_pre_load(), and xsh_set_cd_matrix3d().
Referenced by xsh_geom_ifu().
cpl_frame* xsh_extract | ( | cpl_frame * | rec_frame, | |
cpl_frame * | loc_frame, | |||
xsh_instrument * | instrument, | |||
xsh_extract_param * | extract_par, | |||
cpl_frame ** | res_frame_ext, | |||
const char * | rec_prefix | |||
) |
simple 1D extraction of point source like object
[in] | rec_frame | Rectified frame (from xsh_rectify) |
[in] | loc_frame | Localization table |
[in] | instrument | Instrument pointer |
[in] | extract_par | Parameters for object extraction |
[out] | res_frame_ext | extracted frame in ESO format |
[in] | rec_prefix | recipe prefix (for PRO.CATG definition) |
Definition at line 716 of file xsh_extract.c.
References check, xsh_add_temporary_file(), xsh_extract_with_tag(), XSH_GET_TAG_FROM_ARM, and XSH_ORDER1D.
Referenced by xsh_absorp().
cpl_frame* xsh_extract_clean | ( | cpl_frame * | rec_frame, | |
cpl_frame * | loc_frame, | |||
xsh_instrument * | instrument, | |||
xsh_extract_param * | extract_par, | |||
xsh_interpolate_bp_param * | ipol_bp_par, | |||
cpl_frame ** | res_frame_ext, | |||
const char * | rec_prefix | |||
) |
simple 1D extraction of point source like object
[in] | rec_frame | Rectified frame (from xsh_rectify) |
[in] | loc_frame | Localization table |
[in] | instrument | Instrument pointer |
[in] | extract_par | Parameters for object extraction |
[in] | ipol_bp_par | Parameters for bad pixel interpolation during extraction |
[out] | res_frame_ext | extracted frame in ESO format |
[in] | rec_prefix | recipe prefix (for PRO.CATG definition) |
Definition at line 744 of file xsh_extract.c.
References check, xsh_add_temporary_file(), xsh_extract_clean_with_tag(), XSH_GET_TAG_FROM_ARM, and XSH_ORDER1D.
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().
cpl_error_code xsh_extract_clean_slice | ( | const float * | flux, | |
const float * | errs, | |||
int * | qual, | |||
const double * | lambda, | |||
const int | ilambda, | |||
xsh_instrument * | instrument, | |||
const int | slit_min, | |||
const int | slit_max, | |||
const int | nlambda, | |||
const int | nslit, | |||
const int | mask_hsize, | |||
double * | fluxval, | |||
double * | errval, | |||
int * | qualval | |||
) |
Definition at line 333 of file xsh_extract.c.
References xsh_instrument::decode_bp, m, QFLAG_INTERPOL_FLUX, QFLAG_MISSING_DATA, XSH_FREE, xsh_free_vector(), and xsh_msg_debug.
Referenced by xsh_extract_clean_with_tag(), and xsh_extract_local_clean().
static cpl_frame* xsh_extract_clean_with_tag | ( | cpl_frame * | rec_frame, | |
cpl_frame * | loc_frame, | |||
xsh_instrument * | instrument, | |||
xsh_extract_param * | extract_par, | |||
xsh_interpolate_bp_param * | ipol_bp_par, | |||
const char * | tag, | |||
cpl_frame ** | res_frame_ext | |||
) | [static] |
Simple 1D extraction of point source like object.
[in] | rec_frame | Rectified frame (from xsh_rectify) |
[in] | loc_frame | Localization table |
[in] | instrument | Instrument pointer |
[in] | extract_par | Parameters for object extraction |
[in] | tag | Product catg |
[out] | res_frame_ext | extracted frame in ESO format |
Definition at line 501 of file xsh_extract.c.
References check, EXTRACT_METHOD_PRINT, FULL_METHOD, xsh_rec_list::header, LOCALIZATION_METHOD, xsh_interpolate_bp_param::mask_hsize, xsh_extract_param::method, NOD_METHOD, order, xsh_rec_list::size, slit_step, XSH_ASSURE_NOT_NULL, xsh_extract_clean_slice(), xsh_extraction_get_slit_minmax(), XSH_FREE, xsh_free_propertylist(), xsh_localization_free(), xsh_localization_load(), xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_pfits_get_extract_slit_max(), xsh_pfits_get_extract_slit_min(), xsh_pfits_get_rectify_bin_space(), xsh_pfits_set_pcatg(), xsh_rec_list_create_with_size(), xsh_rec_list_free(), xsh_rec_list_get_data1(), xsh_rec_list_get_errs1(), xsh_rec_list_get_lambda(), xsh_rec_list_get_nlambda(), xsh_rec_list_get_nslit(), xsh_rec_list_get_order(), xsh_rec_list_get_qual1(), xsh_rec_list_get_slit(), xsh_rec_list_load(), xsh_rec_list_save(), xsh_rec_list_save2(), xsh_rec_list_set_data_size(), and xsh_stringcat_any().
Referenced by xsh_extract_clean().
cpl_frameset* xsh_extract_ifu | ( | cpl_frameset * | rec_frameset, | |
cpl_frameset * | loc_frameset, | |||
xsh_instrument * | instrument, | |||
xsh_extract_param * | extract_par, | |||
const char * | rec_prefix | |||
) |
Loop on IFU Frames to extract simple 1D (1 per slitlet).
[in] | rec_frameset | Rectified frameset (from xsh_rectify_ifu) |
[in] | loc_frameset | Localization table frameset (xsh_localize_ifu) |
[in] | instrument | Instrument pointer |
[in] | extract_par | Parameters for object extraction |
[in] | rec_prefix | recipe prefix (to define PRO.CATG value) |
Definition at line 776 of file xsh_extract.c.
References CENTER_IFU_SLITLET, check, LOWER_IFU_SLITLET, SlitletName, UPPER_IFU_SLITLET, XSH_ASSURE_NOT_NULL, xsh_extract_with_tag(), XSH_GET_TAG_FROM_ARM, xsh_msg, and xsh_msg_dbg_medium.
static cpl_frame* xsh_extract_with_tag | ( | cpl_frame * | rec_frame, | |
cpl_frame * | loc_frame, | |||
xsh_instrument * | instrument, | |||
xsh_extract_param * | extract_par, | |||
const char * | tag, | |||
cpl_frame ** | res_frame_ext | |||
) | [static] |
Simple 1D extraction of point source like object.
[in] | rec_frame | Rectified frame (from xsh_rectify) |
[in] | loc_frame | Localization table |
[in] | instrument | Instrument pointer |
[in] | extract_par | Parameters for object extraction |
[in] | tag | Product catg |
[out] | res_frame_ext | extracted frame in ESO format |
Definition at line 89 of file xsh_extract.c.
References check, xsh_localization::edglopoly, xsh_localization::edguppoly, EXTRACT_METHOD_PRINT, FULL_METHOD, xsh_rec_list::header, LOCALIZATION_METHOD, xsh_extract_param::method, NOD_METHOD, order, xsh_rec_list::size, slit_step, XSH_ASSURE_NOT_NULL, XSH_FREE, xsh_free_propertylist(), xsh_localization_free(), xsh_localization_load(), xsh_msg, xsh_msg_dbg_high, xsh_msg_dbg_medium, xsh_pfits_get_extract_slit_max(), xsh_pfits_get_extract_slit_min(), xsh_pfits_get_rectify_bin_space(), xsh_pfits_set_pcatg(), xsh_rec_list_create_with_size(), xsh_rec_list_free(), xsh_rec_list_get_data1(), xsh_rec_list_get_errs1(), xsh_rec_list_get_lambda(), xsh_rec_list_get_nlambda(), xsh_rec_list_get_nslit(), xsh_rec_list_get_order(), xsh_rec_list_get_qual1(), xsh_rec_list_get_slit(), xsh_rec_list_load(), xsh_rec_list_save(), xsh_rec_list_save2(), xsh_rec_list_set_data_size(), and xsh_stringcat_any().
Referenced by xsh_extract(), and xsh_extract_ifu().
static cpl_error_code xsh_extraction_get_slit_minmax | ( | xsh_localization * | loc_list, | |
const double | lambda, | |||
const double | slit_0, | |||
const double | slit_step, | |||
const int | nslit, | |||
int * | ylow, | |||
int * | yup, | |||
double * | y_frac_up, | |||
double * | y_frac_low | |||
) | [static] |
Definition at line 294 of file xsh_extract.c.
References xsh_localization::edglopoly, xsh_localization::edguppoly, xsh_msg, and xsh_msg_dbg_medium.
Referenced by xsh_extract_clean_with_tag().
cpl_frame* xsh_format | ( | cpl_frameset * | spectrum_frame_set, | |
const char * | result_name, | |||
xsh_instrument * | instrument, | |||
const char * | rec_prefix | |||
) |
Definition at line 152 of file xsh_format.c.
References check, xsh_pre_3d::data_header, xsh_pre::data_header, xsh_pre_3d::errs_header, lambda_step, make_data_cube(), xsh_pre_3d::qual_header, XSH_ASSURE_NOT_NULL, XSH_GET_TAG_FROM_ARM, XSH_MERGE3D_IFU, xsh_msg, xsh_pfits_get_cdelt2(), xsh_pfits_get_crval2(), xsh_pfits_get_rectify_bin_lambda(), xsh_pfits_get_rectify_lambda_max(), xsh_pfits_get_rectify_lambda_min(), xsh_pfits_set_cdelt1(), xsh_pfits_set_cdelt3(), xsh_pfits_set_crpix1(), xsh_pfits_set_crpix3(), xsh_pfits_set_crval1(), xsh_pfits_set_crval2(), xsh_pfits_set_crval3(), xsh_pfits_set_ctype3(), xsh_pfits_set_pcatg(), xsh_pre_3d_free(), xsh_pre_3d_new(), xsh_pre_3d_save(), xsh_pre_flip(), xsh_pre_free(), xsh_pre_get_nx(), xsh_pre_get_ny(), xsh_pre_load(), and xsh_set_cd_matrix3d().
Referenced by main().