|
MOONS Pipeline Reference Manual 0.13.2
|
Functions | |
| cpl_error_code | moo_apply_flat (moo_ext *ext, moo_ext *flat, moo_f2f *f2f) |
| Divide spectra by 1D flat-field. | |
| cpl_error_code | moo_apply_p2p (moo_det *flat, moo_det *p2pmap) |
| Divide DET by the pixel-to-pixel variation map. | |
| cpl_error_code | moo_calib_flux (moo_rbn *rbn, moo_atm *atm, moo_resp *resp) |
| Apply the relative flux calibration to 1D rebinned spectra. | |
| moo_sci * | moo_coadd (moo_scilist *scilist, moo_coadd_params *params, const char *filename) |
| Co-add reduced science frames in SCI format. | |
| moo_sci * | moo_combine_pair (moo_rbn *nod_rbn, moo_rbn *sky_rbn, moo_rbn *obj_rbn, moo_target_table *target_table, moo_f2f *f2f, const cpl_frame *solflux_frame, const cpl_frame *airglow_group_frame, const cpl_frame *airglow_var_frame, moo_combine_pair_params *combine_pair_params, moo_sub_sky_stare_params *sky_params, const char *filename, moo_products *products, const cpl_frame *ref_frame) |
| Combine the extracted spectra from a same objec. | |
| moo_rbn * | moo_combine_sky (moo_rbnlist *rbnlist) |
| Combine RBN sky frames. | |
| moo_f2f * | moo_compute_fibtrans (moo_ext *ext, moo_compute_fibtrans_params *params, const char *filename) |
| Computes fibre-to-fibre relative transmission table. | |
| cpl_error_code | moo_reproject_model (moo_det *flat1, moo_loc *loc1, moo_psf *model_flat1, const char *filename) |
| Reporject a model on detector. | |
| moo_det * | moo_compute_p2p (moo_det *flat1, moo_loc *loc1, moo_psf *model_flat1, moo_det *flat2, moo_loc *loc2, moo_psf *model_flat2) |
| To compute pixel-to-pixel variation map. | |
| moo_resp * | moo_compute_resp (moo_scilist *scilist, moo_atm *atm, moo_flx *flx, moo_compute_resp_params *params) |
| Compute instrumental response. | |
| float * | moo_compute_slitoffset (moo_det *det, moo_loc *loc, moo_compute_slitoffset_params *params) |
| Compute slit offset in LOC. | |
| cpl_error_code | moo_correct_tell (moo_rbn *rbn, moo_telluric *tell) |
| Apply the telluric correction to 1D rebinned spectra. | |
| cpl_error_code | moo_correct_tell_science (moo_sci *sci, moo_telluric *tell) |
| Apply the telluric correction to SCI. | |
| cpl_error_code | moo_create_s1d (cpl_frame *sci_frame, moo_create_s1d_params *params, const char *tag, moo_products *products) |
| Apply the telluric correction to SCI. | |
| cpl_error_code | moo_correct_bias (moo_det *det, const cpl_frame *masterbias_frame, moo_correct_bias_params *params) |
| Subtracts the Master Bias frame from a DET frame. | |
| cpl_error_code | moo_correct_dark (moo_det *det, moo_det *detoff, const cpl_frame *masterDarkVis, const cpl_frame *masterDarkNir) |
| Subtracts the master dark frame from a frame after scaling for exposure time (RI). Subtract OFF frame from ON frame (YJ, H) | |
| cpl_error_code | moo_correct_detlin (moo_det *det, const cpl_frame *cube_frame) |
| Apply the detector linearity correction. | |
| cpl_error_code | moo_single_compute_noise_map (moo_single *single, moo_nos_params *params, cpl_imagelist *list, cpl_imagelist *qlist) |
| Calculates the noisey bad pixel mask for one extension. | |
| cpl_error_code | moo_compute_noise_map (moo_det *det, moo_detlist *darkList, moo_masklist *cosmiclist, moo_nos_params *params) |
| Calculates the noisey bad pixel mask. | |
| cpl_error_code | moo_compute_hot_map (moo_det *det, moo_hot_params *params) |
| Calculates the hot bad pixel mask. | |
| moo_ext * | moo_extract (moo_det *det, moo_loc *loc, moo_psf *master_flat, moo_extract_params *params, const char *filename) |
| extract the 1D spectrum of fibres | |
| cpl_error_code | moo_flat_shift_compute (moo_det *det, moo_loc *ff_trace) |
| Compute the shift between FF_TRACE and FLAT. | |
| moo_loc * | moo_localise (moo_det *det, const cpl_frame *guess_loc, moo_localise_params *params, const char *locname) |
| To localise the centroid of fibre spectrum on frames. | |
| moo_psf * | moo_model_flat (moo_det *det, moo_loc *loc, moo_model_flat_params *params, const char *filename) |
| To extract 2D FF and model it, resulting MASTER_FLAT. | |
| moo_molectable * | moo_molecfit_model (const cpl_frame *sci_frame, const char *modename, const cpl_frame *molecule_frame, const cpl_frame *winc_frame, moo_molectable **pmt_atm_fitted, moo_molectable **best_fitted_model, moo_molecfit_model_params *params) |
| Apply the relative flux calibration to 1D rebinned spectra. | |
| moo_telluric * | moo_molecfit_calctrans (const cpl_frame *rbn_frame, const char *modename, const cpl_frame *molecules_frame, const cpl_frame *atm_frame, const cpl_frame *best_fit_frame, const cpl_frame *kernel_lib_frame, moo_molecfit_calctrans_params *params) |
| Apply the molcecfit calctrans to the RBN to compute telle telluric correction. | |
| moo_det * | moo_prepare (const cpl_frame *rawframe, const char *const badpixmask_rp, const char *const badpixmask_nl, const cpl_frame *masterbias, const cpl_frame *cube_frame, moo_prepare_params *params) |
| This function transforms RAW frames in DET frames attaching the default bad pixel map and an error image. | |
| moo_det * | moo_prepare_adu (const cpl_frame *rawframe, const char *const badpixmask_rp, moo_prepare_params *params) |
| This function transforms RAW frames in DET ADU frames attaching the default bad pixel. | |
| moo_rbn * | moo_rebin (moo_ext *ext, moo_map *wmap, moo_spectral_format *sformat, moo_rebin_params *params, const char *filename) |
| Rebin an EXT spectra in RBN format. | |
| moo_det * | moo_remove_CRH (moo_detlist *detlist, moo_masklist *cosmiclist, moo_crh_params *params) |
| Remove CRH in single frames or in a combination of multiple frames. | |
| cpl_array * | moo_select_sky (const char *targname, int indextarg, int obj_index, double obj_targalpha, double obj_targdelta, cpl_table *target_table, const char *index_colname, cpl_table *sky_stare_table, moo_detector_type type, int maxdistslit, double mintrans, int min_sky, double radius, double step_r, int target_table_idx, moo_f2f *f2f, cpl_array *allsky_indexes) |
| This function selects sky fibres around a target object. | |
| moo_sci * | moo_sub_sky_stare (moo_rbn *obja_rbn, moo_target_table *target_table, moo_rbn *objb_rbn, moo_f2f *f2f, const cpl_frame *solflux_frame, const cpl_frame *airglow_group_frame, const cpl_frame *airglow_var_frame, moo_sub_sky_stare_params *params, const char *filename, int ispaired) |
| This function subtracts the sky in wavelength calibrated and extracted science frames obtain in Stare mode observations. | |
| moo_det * | moo_subtract_nod (moo_det *object, moo_det *sky, const char *filename) |
| Sky from object subtraction. | |
| moo_map * | moo_wavesol (moo_ext *arc_ext, const char *lineCatname, moo_spectral_format *sformat, moo_loc *loc, moo_map *wmap, moo_wavesol_params *params) |
| Computes the wavelength solution from 1D extracted arc spectra. | |
| cpl_error_code moo_apply_flat | ( | moo_ext * | ext, |
| moo_ext * | flat, | ||
| moo_f2f * | f2f | ||
| ) |
Divide spectra by 1D flat-field.
| ext | EXT extracted to flatfield |
| flat | EXT extracted flatfield |
| f2f | fibre-to-fibre relative transmission table |
This function performs a simple division by a flat field.
Bad pixels flags:
Error code:
Definition at line 182 of file moo_apply_flat.c.
References MOO_BADPIX_LOW_QE, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_detector_get_extname(), moo_ext_get_fibre_table(), moo_ext_load_single(), moo_f2f_get_trans(), moo_f2f_order_by_index(), moo_fibres_table_add_f2f_cols(), and moo_fibres_table_get_spectro_index().
| cpl_error_code moo_apply_p2p | ( | moo_det * | flat, |
| moo_det * | p2pmap | ||
| ) |
Divide DET by the pixel-to-pixel variation map.
| flat | DET which is divided |
| p2pmap | DET pixel to pixel variation map |
This function performs a simple division by a P2P map.
Bad pixels flags:
Error code:
Definition at line 122 of file moo_apply_p2p.c.
References MOO_BADPIX_GOOD, moo_det_get_primary_header(), moo_det_load_single(), moo_detector_get_extname(), and moo_qc_set_is_p2pcor().
| cpl_error_code moo_calib_flux | ( | moo_rbn * | rbn, |
| moo_atm * | atm, | ||
| moo_resp * | resp | ||
| ) |
Apply the relative flux calibration to 1D rebinned spectra.
| rbn | RBN spectra |
| atm | Atmospheric extinction table |
| resp | Instrumental response |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 143 of file moo_calib_flux.c.
References MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_pfits_get_cd1_1(), moo_pfits_get_crpix1(), moo_pfits_get_crval1(), moo_pfits_get_dit(), moo_pfits_get_exptime(), moo_pfits_get_ndit(), moo_pfits_get_tel_airm_end(), moo_pfits_get_tel_airm_start(), moo_rbn_get_fibre_table(), moo_rbn_get_primary_header(), moo_rbn_load_single(), moo_rbn_single_get_header(), moo_rbn_single_get_image(), moo_resp_get_colname(), and moo_resp_get_table().
| moo_sci * moo_coadd | ( | moo_scilist * | scilist, |
| moo_coadd_params * | params, | ||
| const char * | filename | ||
| ) |
Co-add reduced science frames in SCI format.
| scilist | List of SCI files |
| params | coadd params |
| filename | name of result file |
_Flags considered as bad : BADPIX_COSMETIC | BADPIX_HOT
Bad pixels flags:
Error code:
Definition at line 134 of file moo_coadd.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_fits_create(), moo_imagelist_collapse_bitwiseor(), moo_pfits_update_ncoadd(), moo_sci_add_single(), moo_sci_add_target_table(), moo_sci_create(), moo_sci_delete(), moo_sci_get_single(), moo_sci_get_target_table(), moo_sci_new(), moo_sci_save(), moo_sci_single_get_header(), moo_sci_single_get_image(), moo_sci_single_get_qual(), moo_sci_single_get_sky(), moo_sci_single_new(), moo_scilist_get(), moo_scilist_get_single(), moo_scilist_get_size(), moo_scilist_load_single(), moo_target_table_find_index(), moo_target_table_find_target(), and moo_target_table_remove_coadd_cols().
| moo_sci * moo_combine_pair | ( | moo_rbn * | nod_rbn, |
| moo_rbn * | sky_rbn, | ||
| moo_rbn * | obj_rbn, | ||
| moo_target_table * | target_table, | ||
| moo_f2f * | f2f, | ||
| const cpl_frame * | solflux_frame, | ||
| const cpl_frame * | airglow_group_frame, | ||
| const cpl_frame * | airglow_var_frame, | ||
| moo_combine_pair_params * | combine_pair_params, | ||
| moo_sub_sky_stare_params * | sky_params, | ||
| const char * | filename, | ||
| moo_products * | products, | ||
| const cpl_frame * | ref_frame | ||
| ) |
Combine the extracted spectra from a same objec.
| nod_rbn | _RBN Wavelength calibrated science spectra from NOD |
| sky_rbn | _RBN Wavelength calibrated science spectra from SKY |
| obj_rbn | _RBN Wavelength calibrated science spectra from OBJECT |
| target_table | TARGET_TABLE Attached target table |
| f2f | F2F fibre to fibre table |
| solflux_frame | the monthly averages of solar radio flux at 10.7 cm frame |
| airglow_group_frame | the airglow line list frame (use in subsky) |
| airglow_var_frame | the airglow scaling parameters frame (use in subsky) |
| combine_pair_params | the combine pair parameters |
| sky_params | the sub sky stare parameters |
| filename | the SCI filename |
| products | the product structure to save file |
| ref_frame | the reference frame to produce product KW |
_Flags considered as bad : MOO_BADPIX_OUTSIDE_DATA_RANGE, MOO_BADPIX_CALIB_DEFECT
Bad pixels flags:
Error code:
Definition at line 802 of file moo_combine_pair.c.
References moo_products_add_sci(), moo_sci_delete(), moo_sci_save(), and moo_sub_sky_stare().
| moo_rbn * moo_combine_sky | ( | moo_rbnlist * | rbnlist | ) |
Combine RBN sky frames.
| rbnlist | list of RBN frames |
_Flags considered as bad : BADPIX_COSMETIC
Bad pixels flags:
Error code:
Definition at line 208 of file moo_combine_sky.c.
References MOO_BADPIX_GOOD, moo_qc_set_ncom(), moo_rbn_delete(), moo_rbn_get_fibre_table(), moo_rbn_new(), and moo_rbnlist_get().
| moo_f2f * moo_compute_fibtrans | ( | moo_ext * | ext, |
| moo_compute_fibtrans_params * | params, | ||
| const char * | filename | ||
| ) |
Computes fibre-to-fibre relative transmission table.
| ext | EXT spectra from which computes transmission |
| params | fibre transmission parameters |
| filename | name of the result F2F |
The function expects as input flat-field data obtained with a uniformly illuminated field of view. Then it decouples the relative intensity and the shape of the extracted flat-field spectra into a fibre-to-fibre relative transmission table and a normalised extracted Flat-field respectively.
Bad pixels flags:
Error code:
Definition at line 193 of file moo_compute_fibtrans.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_COSMETIC, MOO_BADPIX_HOT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_detector_get_extname(), moo_ext_get_fibre_table(), moo_ext_load_single(), moo_f2f_create(), moo_f2f_delete(), and moo_f2f_set_trans().
| cpl_error_code moo_compute_hot_map | ( | moo_det * | det, |
| moo_hot_params * | params | ||
| ) |
Calculates the hot bad pixel mask.
| det | DET Average dark frame |
| params | hot map parameters |
This function searches for hot bad pixels in a master dark frame by applying an iterative kappa-sigma clipping algorithm. The QUAL extension of det frame is updated.
Bad pixels flags:
Error code:
Definition at line 830 of file moo_drl.c.
References MOO_BADPIX_COSMETIC, MOO_BADPIX_COSMIC_UNREMOVED, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_load_single(), and moo_detector_get_extname().
| cpl_error_code moo_compute_noise_map | ( | moo_det * | det, |
| moo_detlist * | darkList, | ||
| moo_masklist * | cosmiclist, | ||
| moo_nos_params * | params | ||
| ) |
Calculates the noisey bad pixel mask.
| det | DET Average dark frame |
| darkList | series of individual DET dark frames |
| cosmiclist | series of individual MASK of dark frames |
| params | noise map parameters |
This function searches for static bad pixels in stacks of dark frames taken with equal exposure times. The noise in each pixel stack is computed and compared to the mean noise and a pixel is declared bad if the deviation exceeds nos-clip-sigma. The QUAL extension of det frame is updated.
_Flags considered as bad : BADPIX_COSMETIC | BADPIX_COSMIC_UNREMOVED | BADPIX_HOT
Bad pixels flags:
Error code:
Definition at line 629 of file moo_drl.c.
References MOO_BADPIX_COSMETIC, MOO_BADPIX_COSMIC_UNREMOVED, MOO_BADPIX_HOT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_load_single(), moo_detlist_free_single(), moo_detlist_get_single_data(), moo_detlist_get_single_qual(), moo_detlist_get_size(), moo_detlist_load_single(), moo_mask_get(), moo_mask_to_badpix(), moo_masklist_get(), and moo_single_compute_noise_map().
| moo_det * moo_compute_p2p | ( | moo_det * | flat1, |
| moo_loc * | loc1, | ||
| moo_psf * | model_flat1, | ||
| moo_det * | flat2, | ||
| moo_loc * | loc2, | ||
| moo_psf * | model_flat2 | ||
| ) |
To compute pixel-to-pixel variation map.
| flat1 | DET first flat field |
| loc1 | LOC localisation of the first flat field |
| model_flat1 | PSF model of the first flat field |
| flat2 | DET second flat field |
| loc2 | LOC localisation of the second flat field |
| model_flat2 | PSF model of the second flat field |
The function co-adds two preprocessed flat-field frames at two slit positions is order to increase the illumination coverage of the detectors, and it co-adds as well the corresponding modeled FFs. Then it derives the pixel-to-pixel variation map.
Bad pixels flags:
Error code:
Definition at line 398 of file moo_compute_p2p.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_LOW_QE, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_delete(), moo_det_load_single(), moo_det_new(), moo_detector_get_extname(), moo_fits_create(), moo_fits_write_extension_image(), moo_loc_get_fibre_table(), moo_loc_get_single(), and moo_psf_get_single().
| moo_resp * moo_compute_resp | ( | moo_scilist * | scilist, |
| moo_atm * | atm, | ||
| moo_flx * | flx, | ||
| moo_compute_resp_params * | params | ||
| ) |
Compute instrumental response.
| scilist | List of sky subtracted spectra of the standard star |
| atm | Atmospheric extinction table |
| flx | Standard star flux table |
| params | Compute response parameters |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 257 of file moo_compute_resp.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_COSMETIC, MOO_BADPIX_HOT, MOO_BADPIX_LOW_QE, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_median_filter(), moo_pfits_get_cd1_1(), moo_pfits_get_tel_airm_end(), moo_pfits_get_tel_airm_start(), moo_resp_create(), moo_resp_get_table(), moo_sci_get_single(), moo_sci_get_target_table(), moo_sci_single_get_header(), moo_scilist_get(), moo_scilist_get_size(), and moo_target_table_find_index().
| float * moo_compute_slitoffset | ( | moo_det * | det, |
| moo_loc * | loc, | ||
| moo_compute_slitoffset_params * | params | ||
| ) |
Compute slit offset in LOC.
| det | the DET frame |
| loc | the LOC frame |
| params | the compute slit offset parameters |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 197 of file moo_compute_slitoffset.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_COSMETIC, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_load_single(), and moo_loc_get_single().
| cpl_error_code moo_correct_bias | ( | moo_det * | det, |
| const cpl_frame * | masterbias_frame, | ||
| moo_correct_bias_params * | params | ||
| ) |
Subtracts the Master Bias frame from a DET frame.
| det | DET frame to subtract |
| masterbias_frame | the Master bias frame |
| params | correct bias parameters |
This function applies to the RI extensions, it is applied to frames in basic calibration recipes and to frames used in science reduction in stare mode. The Master Bias extensions are simply subtracted from the corresponding extensions in the input Frame, taking into account the associated Bad Pixel Map extensions. The output frame is an image with associated bad pixel map and statistical errors. The output bad pixel maps are the combination of the input ones.
Bad pixels flags:
Error code:
Definition at line 86 of file moo_drl.c.
References MOO_BADPIX_GOOD, moo_det_create(), moo_det_delete(), moo_det_load_single(), moo_single_get_image(), moo_single_get_qual(), and MOO_TYPE_RI.
| cpl_error_code moo_correct_dark | ( | moo_det * | det, |
| moo_det * | detoff, | ||
| const cpl_frame * | masterDarkVis, | ||
| const cpl_frame * | masterDarkNir | ||
| ) |
Subtracts the master dark frame from a frame after scaling for exposure time (RI). Subtract OFF frame from ON frame (YJ, H)
| det | DET structure to subtract |
| detoff | corresponding DET Off structure or NULL |
| masterDarkVis | Master dark frame for optical detectors |
| masterDarkNir | Master dark frame for IR detectors or NULL |
The input frame is corrected for dark current using the Master Dark frame and accounting for its associated Bad Pixel Mask darkbpixmask which identifies pixels where the dark current is far above the average. In RI extensions the Master Dark is scaled according to the exposure time and subtracted from the input frame. The bad pixel masks are combined and propagated. In YJ and H extensions, the OFF frame or the master dark (IR) is subtracted from the ON frame and the bad pixel masks are combined and propagated.
Bad pixels flags:
Error code:
Definition at line 250 of file moo_drl.c.
References MOO_BADPIX_GOOD, moo_det_create(), moo_det_delete(), moo_det_get_single(), moo_det_load_single(), moo_detector_get_extname(), moo_pfits_get_exptime(), moo_single_get_image(), moo_single_sub(), MOO_TYPE_H, MOO_TYPE_RI, and MOO_TYPE_YJ.
| cpl_error_code moo_correct_detlin | ( | moo_det * | det, |
| const cpl_frame * | cube_frame | ||
| ) |
Apply the detector linearity correction.
| det | DET frame to correct |
| cube_frame | cube coefficients to appply linearity correction by pixel |
Bad pixels flags:
Error code:
Definition at line 507 of file moo_drl.c.
References MOO_BADPIX_GOOD, moo_cube_delete(), moo_det_get_primary_header(), moo_det_load_single(), and moo_qc_set_is_linearcor().
Referenced by moo_prepare().
| cpl_error_code moo_correct_tell | ( | moo_rbn * | rbn, |
| moo_telluric * | tell | ||
| ) |
Apply the telluric correction to 1D rebinned spectra.
| rbn | RBN specta |
| tell | TELLURIC correction |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 124 of file moo_correct_tell.c.
References MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_pfits_get_cd1_1(), moo_pfits_get_crpix1(), moo_pfits_get_crval1(), moo_rbn_get_fibre_table(), moo_rbn_get_primary_header(), moo_rbn_load_single(), moo_rbn_single_get_header(), moo_rbn_single_get_image(), moo_telluric_get_band(), moo_telluric_get_image(), and moo_telluric_get_index().
| cpl_error_code moo_correct_tell_science | ( | moo_sci * | sci, |
| moo_telluric * | tell | ||
| ) |
Apply the telluric correction to SCI.
| sci | sky Input wavelength calibrated, sky corrected frame |
| tell | telluric corerction |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 246 of file moo_correct_tell.c.
References MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_pfits_get_cd1_1(), moo_pfits_get_crpix1(), moo_pfits_get_crval1(), moo_sci_get_target_table(), moo_sci_load_single(), moo_sci_single_get_header(), moo_sci_single_get_image(), moo_telluric_get_band(), moo_telluric_get_image(), and moo_telluric_get_index().
| cpl_error_code moo_create_s1d | ( | cpl_frame * | sci_frame, |
| moo_create_s1d_params * | params, | ||
| const char * | tag, | ||
| moo_products * | products | ||
| ) |
Apply the telluric correction to SCI.
| sci_frame | Input wavelength calibrated, sky corrected frame |
| params | Parameters od create_s1d |
| tag | The S1D associated tag |
| products | the saving products structure |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 177 of file moo_create_s1d.c.
References MOO_BADPIX_GOOD, moo_products_add_s1d(), moo_s1d_delete(), moo_s1d_save(), moo_sci_create(), moo_sci_delete(), moo_sci_get_single(), moo_sci_get_target_table(), moo_sci_load_single(), and moo_target_table_get_exptime().
| moo_ext * moo_extract | ( | moo_det * | det, |
| moo_loc * | loc, | ||
| moo_psf * | master_flat, | ||
| moo_extract_params * | params, | ||
| const char * | filename | ||
| ) |
extract the 1D spectrum of fibres
| det | DET frame to extract |
| loc | LOC localisation of the fibres |
| master_flat | PSF the master flat or NULL |
| params | the extraction parameters |
| filename | the file name for the result |
This function is to extract fibre spectra into 1D with two different methods defined by extract-method: “sum” or “optimal”. The latter will request the MasterFlat input, in order to use the fibre profiles along the slit.
Bad pixels flags:
Error code:
Definition at line 523 of file moo_extract.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_COSMETIC, MOO_BADPIX_GOOD, MOO_BADPIX_HOT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_get_fibre_table(), moo_det_load_single(), moo_detector_get_extname(), moo_ext_add_fibre_table(), moo_ext_add_single(), moo_ext_delete(), moo_ext_new(), moo_fibres_table_add_extract_cols(), moo_fibres_table_by_index(), moo_fibres_table_get_spectro_indexext(), moo_fits_create(), moo_loc_get_fibre_table(), moo_loc_get_single(), and moo_psf_get_single().
| cpl_error_code moo_flat_shift_compute | ( | moo_det * | det, |
| moo_loc * | ff_trace | ||
| ) |
Compute the shift between FF_TRACE and FLAT.
| det | DET frame to analyse |
| ff_trace | the given FF_TRACE |
Bad pixels flags:
Error code:
Definition at line 174 of file moo_flat_shift_compute.c.
References MOO_BADPIX_COSMETIC, MOO_BADPIX_HOT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_load_single(), moo_detector_get_extname(), and moo_loc_get_single().
| moo_loc * moo_localise | ( | moo_det * | det, |
| const cpl_frame * | guess_loc, | ||
| moo_localise_params * | params, | ||
| const char * | locname | ||
| ) |
To localise the centroid of fibre spectrum on frames.
END CREATE_GUESS
| det | DET frame to localize |
| guess_loc | FF_TRACE_GUESS frame or NULL |
| params | the localisation parameters |
| locname | the file name of the result |
This function is to find the localisation of the centroid of each fibre spectrum on CCD Frame, then generate the FF_TRACE. It is able be excuted in two cases:
Bad pixels flags:
Error code:
Definition at line 3093 of file moo_localise.c.
References MOO_BADPIX_COSMETIC, MOO_BADPIX_HOT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_loc_delete(), and moo_loc_load().
| moo_psf * moo_model_flat | ( | moo_det * | det, |
| moo_loc * | loc, | ||
| moo_model_flat_params * | params, | ||
| const char * | filename | ||
| ) |
To extract 2D FF and model it, resulting MASTER_FLAT.
| det | DET frame to extract |
| loc | LOC localisation of the fibres |
| params | the model flat parameters |
| filename | the name of the result |
This function is to model the extracted FF, and resultsing a modelled FF, i.e., the MasterFlat.
_Flags considered as bad : BADPIX_COSMETIC | BADPIX_HOT
Bad pixels flags:
Error code:
Definition at line 1546 of file moo_model_flat.c.
References MOO_BADPIX_COSMETIC, MOO_BADPIX_HOT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_load_single(), moo_detector_get_extname(), moo_loc_get_fibre_table(), moo_loc_get_single(), moo_psf_add_single(), and moo_psf_create().
| moo_telluric * moo_molecfit_calctrans | ( | const cpl_frame * | rbn_frame, |
| const char * | modename, | ||
| const cpl_frame * | molecules_frame, | ||
| const cpl_frame * | atm_frame, | ||
| const cpl_frame * | best_fit_frame, | ||
| const cpl_frame * | kernel_lib_frame, | ||
| moo_molecfit_calctrans_params * | params | ||
| ) |
Apply the molcecfit calctrans to the RBN to compute telle telluric correction.
| rbn_frame | The RBN SPECTRA |
| modename | mode LR or HR |
| molecules_frame | The MOLECULES frame |
| atm_frame | the ATM frame (from model) |
| best_fit_frame | the BEST_FIT frame (from model) |
| kernel_lib_frame | the KERNEL frame |
| params | the calctrans parameters |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 1428 of file moo_molecfit.c.
References MOO_BADPIX_GOOD, moo_kernel_delete(), moo_kernel_get_header(), moo_kernel_get_matrix(), moo_kernel_load(), moo_molectable_delete(), moo_molectable_get_data(), moo_molectable_load(), moo_molectable_new(), moo_pfits_get_cd1_1(), moo_pfits_get_crpix1(), moo_pfits_get_crval1(), moo_rbn_create(), moo_rbn_delete(), moo_rbn_get_fibre_table(), moo_rbn_get_single(), moo_rbn_single_get_header(), moo_rbn_single_get_image(), moo_rbn_single_load(), MOO_TELLURIC_EXT_RI, moo_telluric_new(), and moo_telluric_set_image().
| moo_molectable * moo_molecfit_model | ( | const cpl_frame * | sci_frame, |
| const char * | modename, | ||
| const cpl_frame * | molecule_frame, | ||
| const cpl_frame * | winc_frame, | ||
| moo_molectable ** | pmt_atm_fitted, | ||
| moo_molectable ** | best_fitted_model, | ||
| moo_molecfit_model_params * | params | ||
| ) |
Apply the relative flux calibration to 1D rebinned spectra.
| sci_frame | the sky Input wavelength calibrated, sky corrected frame |
| modename | the instrument mode (LR or HR) |
| molecule_frame | the MOLECULE frame |
| winc_frame | the WAVE_INCLUDE frame |
| pmt_atm_fitted | The ATM fitted result |
| best_fitted_model | The BEST FITTED model result |
| params | the molecfit model parameters |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 1158 of file moo_molecfit.c.
References MOO_BADPIX_GOOD, moo_detector_get_name(), moo_molectable_delete(), moo_molectable_get_data(), moo_molectable_load(), moo_molectable_new(), moo_molectable_set_data(), moo_pfits_get_cd1_1(), moo_pfits_get_crpix1(), moo_pfits_get_crval1(), moo_sci_create(), moo_sci_delete(), moo_sci_get_single(), moo_sci_single_get_header(), moo_sci_single_get_image(), and moo_sci_single_load().
| moo_det * moo_prepare | ( | const cpl_frame * | rawframe, |
| const char *const | badpixmask_rp, | ||
| const char *const | badpixmask_nl, | ||
| const cpl_frame * | masterbias, | ||
| const cpl_frame * | cube_frame, | ||
| moo_prepare_params * | params | ||
| ) |
This function transforms RAW frames in DET frames attaching the default bad pixel map and an error image.
| rawframe | the RAW cpl frame to prepare |
| badpixmask_rp | the filename of the bad pixel mask RP or NULL |
| badpixmask_nl | the filename of the bad pixel mask NL or NULL |
| masterbias | the MASTER_BIAS frame or NULL if not |
| cube_frame | the LINEARITY_COEFF_CUBE frame or NULL if no correction |
| params | the prepare parameters |
This function is placed at the beginning of every recipe, it transforms an input RAW frame in a DET frame attaching to it additional extensions: a bad pixel map, and an error image for each detector extension. The bad pixel map is the default one or a zero image if the default map does not exist. The error image is built summing the Read Out Noise and the shot noise.
Bad pixels flags:
Error code:
Definition at line 324 of file moo_prepare.c.
References moo_correct_detlin(), moo_det_delete(), moo_det_get_single(), moo_det_save(), moo_detector_get_extname(), and moo_prepare_adu().
| moo_det * moo_prepare_adu | ( | const cpl_frame * | rawframe, |
| const char *const | badpixmask_rp, | ||
| moo_prepare_params * | params | ||
| ) |
This function transforms RAW frames in DET ADU frames attaching the default bad pixel.
| rawframe | the RAW cpl frame to prepare |
| badpixmask_rp | the filename of the bad pixel mask RP or NULL |
| params | the prepare parameters |
This function is placed at the beginning of every recipe, it transforms an input RAW frame in a DET frame attaching to it additional extensions: a bad pixel map, and an error image for each detector extension. The bad pixel map is the default one or a zero image if the default map does not exist. The error image is built summing the Read Out Noise and the shot noise.
Bad pixels flags:
Error code:
Definition at line 430 of file moo_prepare.c.
References moo_det_create(), moo_det_delete(), moo_det_get_single(), moo_det_save(), moo_detector_get_extname(), moo_pfits_get_det_chip_live(), and moo_pfits_get_live().
Referenced by moo_prepare().
| moo_rbn * moo_rebin | ( | moo_ext * | ext, |
| moo_map * | wmap, | ||
| moo_spectral_format * | sformat, | ||
| moo_rebin_params * | params, | ||
| const char * | filename | ||
| ) |
Rebin an EXT spectra in RBN format.
| ext | EXT Extracted 1D spectra |
| wmap | EXT Wave map |
| sformat | the spectral format |
| params | the rebin parameters |
| filename | the file name for the result |
This function rebin the extracted spectra.
Bad pixels flags:
Error code:
Definition at line 783 of file moo_rebin.c.
References MOO_BADPIX_GOOD, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_detector_get_name(), moo_ext_get_fibre_table(), moo_ext_load_single(), moo_fibres_table_add_rebin_cols(), moo_fibres_table_get_spectro_indexext(), moo_fits_create(), moo_rbn_add_fibre_table(), moo_rbn_add_single(), moo_rbn_delete(), moo_rbn_new(), moo_rbn_single_delete(), moo_rbn_single_get_data(), moo_rbn_single_get_errs(), moo_rbn_single_new(), moo_rbn_single_set_wcs1(), moo_spectral_format_get(), moo_spectral_format_get_wave_range(), moo_spectral_format_info_delete(), and moo_table_and_selected_sequal_string().
| moo_det * moo_remove_CRH | ( | moo_detlist * | detlist, |
| moo_masklist * | cosmiclist, | ||
| moo_crh_params * | params | ||
| ) |
Remove CRH in single frames or in a combination of multiple frames.
| detlist | list of DET frames |
| cosmiclist | list of MASK or NULL |
| params | the remove CRH parameters |
The function will behave differently depending on the number of input frames. For now, only multiple input is implemented.
Bad pixels flags:
Error code:
Definition at line 427 of file moo_remove_crh.c.
References MOO_BADPIX_GOOD, moo_det_delete(), moo_det_get_fibre_table(), moo_det_new(), moo_detlist_get(), moo_qc_set_ncom(), moo_qc_set_ncrh_tot(), MOO_TYPE_H, MOO_TYPE_RI, and MOO_TYPE_YJ.
| cpl_error_code moo_reproject_model | ( | moo_det * | flat1, |
| moo_loc * | loc1, | ||
| moo_psf * | model_flat1, | ||
| const char * | filename | ||
| ) |
Reporject a model on detector.
| flat1 | DET first flat field |
| loc1 | LOC localisation of the first flat field |
| model_flat1 | PSF model of the first flat field |
| filename | the name of the produce DET file |
Definition at line 232 of file moo_compute_p2p.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_LOW_QE, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_det_load_single(), moo_fits_create(), moo_fits_write_extension_image(), moo_loc_get_fibre_table(), moo_loc_get_single(), and moo_psf_get_single().
| cpl_array * moo_select_sky | ( | const char * | targname, |
| int | indextarg, | ||
| int | obj_index, | ||
| double | obj_targalpha, | ||
| double | obj_targdelta, | ||
| cpl_table * | target_table, | ||
| const char * | index_colname, | ||
| cpl_table * | sky_stare_table, | ||
| moo_detector_type | type, | ||
| int | maxdistslit, | ||
| double | mintrans, | ||
| int | min_sky, | ||
| double | radius, | ||
| double | step_r, | ||
| int | target_table_idx, | ||
| moo_f2f * | f2f, | ||
| cpl_array * | allsky_indexes | ||
| ) |
This function selects sky fibres around a target object.
| targname | Name of the target object |
| indextarg | Index of the target in the TARGET_TABLE |
| obj_index | Index RBN of the target in the TARGET_TABLE |
| obj_targalpha | Alpha position of the target |
| obj_targdelta | Delta position of the target |
| target_table | the TARGET TABLE |
| index_colname | the name of the INDEX column in table |
| sky_stare_table | the SKY fibres results table |
| type | the detector type RI,YJ or H |
| maxdistslit | the maximum distance on the slit for the sky fibres |
| mintrans | the minimum value of transmission for the sky fibres |
| min_sky | the minimum of sky fibres to find |
| radius | the radius around the object position to find the sky fibres |
| step_r | the step to increase rhe radius to search the sky fibres |
| f2f | the fibre to fibre transmission |
| allsky_indexes | the indexes of sky fibres in target_table |
Definition at line 122 of file moo_sub_sky_stare.c.
References moo_f2f_get_trans_colname(), moo_select_sky(), and moo_sky_distance().
Referenced by moo_select_sky().
| cpl_error_code moo_single_compute_noise_map | ( | moo_single * | single, |
| moo_nos_params * | params, | ||
| cpl_imagelist * | list, | ||
| cpl_imagelist * | qlist | ||
| ) |
Calculates the noisey bad pixel mask for one extension.
| single | DET single extension |
| params | noise map parameters |
| list | DARK list DATA images |
| qlist | DARK list QUAL images |
Bad pixels flags:
Error code:
Definition at line 559 of file moo_drl.c.
References MOO_BADPIX_NOISY, moo_compute_sigma_map(), moo_kappa_sigma_clipping(), moo_single_apply_mask(), and moo_single_get_data().
Referenced by moo_compute_noise_map().
| moo_sci * moo_sub_sky_stare | ( | moo_rbn * | obja_rbn, |
| moo_target_table * | target_table, | ||
| moo_rbn * | objb_rbn, | ||
| moo_f2f * | f2f, | ||
| const cpl_frame * | solflux_frame, | ||
| const cpl_frame * | airglow_group_frame, | ||
| const cpl_frame * | airglow_var_frame, | ||
| moo_sub_sky_stare_params * | params, | ||
| const char * | filename, | ||
| int | ispaired | ||
| ) |
This function subtracts the sky in wavelength calibrated and extracted science frames obtain in Stare mode observations.
| obja_rbn | RBN Wavelength calibrated science spectra for object A |
| target_table | TARGET_TABLE Attached target table |
| objb_rbn | RBN Wavelength calibrated science spectra for object B |
| f2f | the F2F (fibre to fibre transmission) table |
| solflux_frame | the monthly averages of solar radio flux at 10.7 cm frame |
| airglow_group_frame | the airglow line list frame (use in subsky) |
| airglow_var_frame | the airglow scaling parameters frame (use in subsky) |
| params | the sub sky stare parameters |
| filename | the name of the result SCI |
| ispaired | MOO_SCI1D_NOT_PAIRED or MOO_SCI1D_PAIRED |
_Flags considered as bad : BADPIX_COSMETIC | BADPIX_HOT
Bad pixels flags:
Error code:
Definition at line 810 of file moo_sub_sky_stare.c.
References MOO_BADPIX_CALIB_DEFECT, MOO_BADPIX_OUTSIDE_DATA_RANGE, moo_f2f_order_by_indexrbn(), moo_fits_create(), moo_pfits_get_dit(), moo_pfits_get_exptime(), moo_pfits_get_ndit(), moo_rbn_get_fibre_table(), moo_rbn_get_single(), moo_rbn_load_single(), moo_rbn_single_get_header(), moo_sci_add_single(), moo_sci_add_target_table(), moo_sci_delete(), moo_sci_new(), moo_target_table_duplicate(), moo_target_table_select_obj_index(), moo_target_table_select_sky_index(), and moo_target_table_xswitch_paired().
Referenced by moo_combine_pair().
| moo_det * moo_subtract_nod | ( | moo_det * | object, |
| moo_det * | sky, | ||
| const char * | filename | ||
| ) |
Sky from object subtraction.
| object | [DET] object det file |
| sky | [DET] skt det file |
| filename | file name of the new nod DET |
_Flags considered as bad :
Bad pixels flags:
Error code:
Definition at line 70 of file moo_subtract_nod.c.
References MOO_BADPIX_GOOD, moo_det_create(), moo_det_delete(), moo_det_get_fibre_table(), moo_det_get_primary_header(), moo_det_load(), moo_det_rescale_using_exptime(), moo_det_save(), moo_det_subtract(), moo_fibres_table_add_nod_cols(), and moo_qc_set_frame_raw2().
| moo_map * moo_wavesol | ( | moo_ext * | arc_ext, |
| const char * | lineCatname, | ||
| moo_spectral_format * | sformat, | ||
| moo_loc * | loc, | ||
| moo_map * | wmap, | ||
| moo_wavesol_params * | params | ||
| ) |
Computes the wavelength solution from 1D extracted arc spectra.
| arc_ext | EXT Extracted 1D arc spectra |
| lineCatname | Name of the Line list file |
| sformat | the SPECTRAL FORMAT |
| loc | LOC localization trace |
| wmap | the WAVE MAP GUESS if a preliminary solution is alrezady computed |
| params | the wavesol parameters |
This function computes the wavelength solution. It first determine the (X,Y) positions of a set of arc lines given as input, and then creates a wavelength map for each detector extensions in the input frame.
Bad pixels flags:
Error code:
Definition at line 2728 of file moo_wavesol.c.
References moo_map_check().