Functions | |
static void | chunk_coadd (double *data, double *flux, int *qual, int nx, int ny, int ifirst, int ilast, const int decode_bp, int *skymask) |
static void | tab_minmax_get_index (double *data, int size, xsh_slit_limit_param *slit_limit_par, int *min, int *max) |
static xsh_localization * | xsh_localize_obj_auto (cpl_frame *merge_frame, cpl_frame *skymask_frame, xsh_instrument *instrument, xsh_localize_obj_param *loc_obj_par, xsh_slit_limit_param *slitlimit_par, const int decode_bp) |
Build localization table frame from the rectified table frame. | |
static xsh_localization * | xsh_localize_obj_manual (xsh_instrument *instrument, xsh_localize_obj_param *loc_obj_par) |
cpl_frame * | xsh_localize_obj (cpl_frame *rec_frame, cpl_frame *skymask_frame, xsh_instrument *instrument, xsh_localize_obj_param *loc_obj_par, xsh_slit_limit_param *slitlimit_par, const char *fname) |
Build the localization table. | |
cpl_frameset * | xsh_localize_obj_ifu (cpl_frameset *rec_frameset, cpl_frame *skymask_frame, xsh_instrument *instrument, xsh_localize_obj_param *locobj_par, xsh_slit_limit_param *slitlimit_par) |
double | xsh_convert_seeing (cpl_frame *frame) |
Convert seeing keywork in mu sigma. | |
cpl_frame * | xsh_localize_ifu_slitlet (cpl_frame *merge2d_slitlet, cpl_frame *skymask_frame, int smooth_hsize, int nscales, int HF_skip, const char *resname, double cut_sigma_low, double cut_sigma_up, double cut_snr_low, double cut_snr_up, double slit_min, double slit_max, int deg, int box_hsize, xsh_instrument *instrument) |
Localize center of object on a merge 2D IFU slitlet. | |
cpl_frameset * | xsh_localize_ifu (cpl_frameset *merge2d_frameset, cpl_frame *skymask_frame, xsh_localize_ifu_param *locifu_par, xsh_instrument *instrument, const char *prefix) |
Localize center of object on a merge 2D IFU slitlet. |
Function ...
static void chunk_coadd | ( | double * | data, | |
double * | flux, | |||
int * | qual, | |||
int | nx, | |||
int | ny, | |||
int | ifirst, | |||
int | ilast, | |||
const int | decode_bp, | |||
int * | skymask | |||
) | [static] |
Definition at line 106 of file xsh_localize_obj.c.
References XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, XSH_FREE, and xsh_msg_dbg_medium.
Referenced by xsh_localize_obj_auto().
static void tab_minmax_get_index | ( | double * | data, | |
int | size, | |||
xsh_slit_limit_param * | slit_limit_par, | |||
int * | min, | |||
int * | max | |||
) | [static] |
Definition at line 160 of file xsh_localize_obj.c.
References xsh_slit_limit_param::max_slit_idx, xsh_slit_limit_param::min_slit_idx, and XSH_ASSURE_NOT_NULL.
Referenced by xsh_localize_obj_auto().
double xsh_convert_seeing | ( | cpl_frame * | frame | ) |
Convert seeing keywork in mu sigma.
[in] | Object | frame |
Definition at line 954 of file xsh_localize_obj.c.
References check, XSH_ASSURE_NOT_NULL, xsh_free_propertylist(), XSH_LAMBDA_DIMM, xsh_msg, xsh_pfits_get_airm_mean(), xsh_pfits_get_seeing_end(), and xsh_pfits_get_seeing_start().
cpl_frameset* xsh_localize_ifu | ( | cpl_frameset * | merge2d_frameset, | |
cpl_frame * | skymask_frame, | |||
xsh_localize_ifu_param * | locifu_par, | |||
xsh_instrument * | instrument, | |||
const char * | prefix | |||
) |
Localize center of object on a merge 2D IFU slitlet.
[in] | merge2d_slitlet | merge 2D IFU slitlet |
[in] | smooth_hsize | Half size of median filter using for smoothing |
[in] | nscales | nscales use for atrous decomposition |
[in] | HF_skip | Number of skipping High Frequency used to reconstruct signal |
[in] | prefix | of result table |
Definition at line 1522 of file xsh_localize_obj.c.
References xsh_localize_ifu_param::bckg_deg, xsh_localize_ifu_param::box_hsize, check, xsh_localize_ifu_param::cut_sigma_low, xsh_localize_ifu_param::cut_sigma_up, xsh_localize_ifu_param::cut_snr_low, xsh_localize_ifu_param::cut_snr_up, xsh_localize_ifu_param::HF_skip, LOWER_IFU_SLITLET, xsh_localize_ifu_param::nscales, SlitletName, xsh_localize_ifu_param::slitlow_edges_mask, xsh_localize_ifu_param::slitup_edges_mask, xsh_localize_ifu_param::smooth_hsize, xsh_localize_ifu_param::use_skymask, XSH_ASSURE_NOT_NULL, xsh_free_frameset(), xsh_free_propertylist(), xsh_instrument_arm_tostring(), xsh_localize_ifu_slitlet(), xsh_msg, xsh_pfits_get_rectify_space_max(), and xsh_pfits_get_rectify_space_min().
Referenced by xsh_geom_ifu().
cpl_frame* xsh_localize_ifu_slitlet | ( | cpl_frame * | merge2d_slitlet, | |
cpl_frame * | skymask_frame, | |||
int | smooth_hsize, | |||
int | nscales, | |||
int | HF_skip, | |||
const char * | resname, | |||
double | cut_sigma_low, | |||
double | cut_sigma_up, | |||
double | cut_snr_low, | |||
double | cut_snr_up, | |||
double | slit_min, | |||
double | slit_max, | |||
int | deg, | |||
int | box_hsize, | |||
xsh_instrument * | instrument | |||
) |
Localize center of object on a merge 2D IFU slitlet.
[in] | merge2d_slitlet | merge 2D IFU slitlet |
[in] | smooth_hsize | Half size of median filter using for smoothing |
[in] | nscales | nscales use for atrous decomposition |
[in] | HF_skip | Number of skipping High Frequency used to reconstruct signal |
[in] | resname | Name of result table |
[in] | cut_sigma_low | Gaussian fits of the cross-dispersion profile whose FWHM is lower than this value are rejected |
[in] | cut_sigma_up | Gaussian fits of the cross-dispersion profile whose FWHM is upper than this value are rejected |
[in] | cut_snr_low | Gaussian fits of the cross-dispersion profile whose SNR is lower than this value are rejected |
[in] | cut_snr_up | Gaussian fits of the cross-dispersion profile whose SNR is upper than this value are rejected |
[in] | box_hsize | Half size of running chunk box |
[in] | slit_min | min slit value |
[in] | slit_max | max slit value |
[in] | deg | poly degree |
[in] | box_hsize | half size of box |
[in] | instrument | arm setting |
Definition at line 1013 of file xsh_localize_obj.c.
References check, xsh_instrument::decode_bp, xsh_spectrum::flux_header, M_PI, sigma, xsh_spectrum::size_lambda, xsh_spectrum::size_slit, xsh_spectrum::slit_min, xsh_spectrum::slit_step, _xsh_hist_::start, width, xsh_add_temporary_file(), XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, xsh_atrous(), XSH_CALLOC, xsh_data_interpolate(), xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, xsh_error_reset, xsh_frame_product(), XSH_FREE, xsh_free_matrix(), xsh_free_propertylist(), xsh_free_table(), xsh_free_vector(), xsh_gsl_fit_gaussian(), xsh_gsl_init_gaussian_fit(), XSH_MALLOC, XSH_MATH_SQRT_2, xsh_msg_dbg_low, xsh_msg_dbg_medium, XSH_OBJPOS_COLNAME_SLIT, XSH_OBJPOS_COLNAME_WAVELENGTH, XSH_OBJPOS_UNIT_SLIT, XSH_OBJPOS_UNIT_WAVELENGTH, xsh_pfits_get_slit_width(), XSH_REGDEBUG, xsh_resolution_get(), xsh_round_double(), xsh_sort_table_1(), xsh_spectrum_free(), xsh_spectrum_get_errs(), xsh_spectrum_get_flux(), xsh_spectrum_get_lambda_min(), xsh_spectrum_get_lambda_step(), xsh_spectrum_get_qual(), xsh_spectrum_load(), XSH_TABLE_FREE, XSH_TABLE_LOAD, XSH_TABLE_NEW_COL, and xsh_unwrap_vector().
Referenced by main(), and xsh_localize_ifu().
cpl_frame* xsh_localize_obj | ( | cpl_frame * | rec_frame, | |
cpl_frame * | skymask_frame, | |||
xsh_instrument * | instrument, | |||
xsh_localize_obj_param * | loc_obj_par, | |||
xsh_slit_limit_param * | slitlimit_par, | |||
const char * | fname | |||
) |
Build the localization table.
[in] | rec_frame | Rectified frame (from xsh_rectify) or NULL in MANUAL mode |
[in] | skymask_frame | sky mask frame |
[in] | instrument | Pointer to instrument description structure |
[in] | loc_obj_par | Parameters for localization |
[in] | slitlimit_par | Parameters defining slit limits |
[in] | fname | output filename |
Definition at line 220 of file xsh_localize_obj.c.
References check, xsh_instrument::decode_bp, LOC_MANUAL_METHOD, LOCALIZE_METHOD_PRINT, xsh_localize_obj_param::method, xsh_localize_obj_param::slit_hheight, xsh_localize_obj_param::slit_position, xsh_add_temporary_file(), XSH_ASSURE_NOT_NULL, xsh_free_frame(), xsh_instrument_arm_tostring(), xsh_localization_free(), xsh_localization_save(), xsh_localize_obj_auto(), xsh_localize_obj_manual(), xsh_merge_ord(), xsh_msg_dbg_low, and xsh_msg_dbg_medium.
Referenced by main(), xsh_localize_obj_ifu(), xsh_respon_slit_nod(), xsh_respon_slit_offset(), xsh_scired_slit_nod(), xsh_scired_slit_nod_accurate(), xsh_scired_slit_offset(), and xsh_slit_stare_correct_crh_and_sky().
static xsh_localization * xsh_localize_obj_auto | ( | cpl_frame * | merge_frame, | |
cpl_frame * | skymask_frame, | |||
xsh_instrument * | instrument, | |||
xsh_localize_obj_param * | loc_obj_par, | |||
xsh_slit_limit_param * | slitlimit_par, | |||
const int | decode_bp | |||
) | [static] |
Build localization table frame from the rectified table frame.
[in] | merge_frame | Merge frame (from xsh_merge_ord) or NULL in MANUAL mode |
[in] | skymask_frame | Sky mask frame |
[in] | instrument | Pointer to instrument description structure |
[in] | loc_obj_par | Parameters for localization [in] slitlimit_par Parameters to define slit limits [in] decode_bp Bad pixel code |
Definition at line 343 of file xsh_localize_obj.c.
References xsh_localization::cenpoly, check, chunk_coadd(), xsh_localization::edglopoly, xsh_localization::edguppoly, xsh_spectrum::flux, xsh_spectrum::flux_header, xsh_localize_obj_param::kappa, kappa, xsh_spectrum::lambda_min, xsh_spectrum::lambda_step, lambda_step, xsh_localize_obj_param::loc_chunk_nb, xsh_localize_obj_param::loc_deg_poly, LOC_GAUSSIAN_METHOD, xsh_localize_obj_param::loc_thresh, xsh_localize_obj_param::method, xsh_localize_obj_param::niter, niter, xsh_localize_obj_param::nod_step, xsh_localization::pol_degree, xsh_spectrum::qual, sigma, xsh_spectrum::slit_min, xsh_spectrum::slit_step, slit_step, tab_minmax_get_index(), threshold, xsh_localize_obj_param::use_skymask, width, XSH_ARCSEC_NIR, XSH_ARCSEC_UVB, XSH_ARCSEC_VIS, XSH_ARM_NIR, XSH_ARM_UVB, XSH_ARM_VIS, XSH_ASSURE_NOT_ILLEGAL, XSH_ASSURE_NOT_NULL, XSH_CALLOC, xsh_debug_level_get(), XSH_DEBUG_LEVEL_MEDIUM, xsh_error_reset, XSH_FREE, xsh_free_polynomial(), xsh_free_table(), xsh_free_vector(), xsh_instrument_get_arm(), xsh_localization_create(), xsh_msg_dbg_low, xsh_msg_dbg_medium, xsh_msg_warning, xsh_pfits_get_slit_width(), xsh_polynomial_fit_1d_create(), xsh_resolution_get(), xsh_round_double(), xsh_sort_table_1(), xsh_spectrum_free(), xsh_spectrum_get_size_lambda(), xsh_spectrum_get_size_slit(), xsh_spectrum_load(), XSH_TABLE_LOAD, and xsh_unwrap_vector().
Referenced by xsh_localize_obj().
cpl_frameset* xsh_localize_obj_ifu | ( | cpl_frameset * | rec_frameset, | |
cpl_frame * | skymask_frame, | |||
xsh_instrument * | instrument, | |||
xsh_localize_obj_param * | locobj_par, | |||
xsh_slit_limit_param * | slitlimit_par | |||
) |
Definition at line 908 of file xsh_localize_obj.c.
References check, LOWER_IFU_SLITLET, SlitletName, XSH_ASSURE_NOT_NULL, xsh_free_frameset(), xsh_instrument_arm_tostring(), xsh_localize_obj(), and xsh_msg.
Referenced by main().
static xsh_localization * xsh_localize_obj_manual | ( | xsh_instrument * | instrument, | |
xsh_localize_obj_param * | loc_obj_par | |||
) | [static] |
Definition at line 286 of file xsh_localize_obj.c.
References xsh_localization::cenpoly, check, xsh_localization::edglopoly, xsh_localization::edguppoly, xsh_localization::pol_degree, xsh_localize_obj_param::slit_hheight, xsh_localize_obj_param::slit_position, XSH_ASSURE_NOT_NULL, xsh_localization_create(), and xsh_msg_dbg_medium.
Referenced by xsh_localize_obj().