combine_2d_with_rejection¶
- msaexp.utils.combine_2d_with_rejection(drizzled_slits, outlier_threshold=5, grow=0, trim=2, prf_center=None, prf_sigma=1.0, center_limit=8, fit_prf=True, fix_center=False, fix_sigma=False, profile_slice=None, sigma_bounds=(0.5, 2.0), background=None, **kwargs)[source]¶
Combine single drizzled arrays with outlier detection
- Parameters
- drizzled_slitslist
List of drizzled 2D slitlets from
msapipe.utils.drizzle_slits_2d, i.e., frommsapipe.pipe.NirspecPipeline.get_background_slits.N.B. This can be a concatenation from mulitple
NirspecPipelineobjects, e.g., multiple visits or combining across the two detectors to a single output product.- outlier_thresholdfloat
Outlier threshold (absolute value) for identifying outliers between the different slitlets, e.g., bad pixels and cosmic rays
- growint
not used
- trimint
Number of pixels to trim from the edges of the output spectra
- prf_centerfloat
Center of the extraction profile relative to the center of the 2D array
- prf_sigmafloat
Sigma width of the GaussianPRF profile
- center_limitfloat
Tolerance to search/fit for the profile relative to
prf_center- fit_prfbool
Fit updates to the prf parameters
- fix_centerbool
If
fit_prf, this sets fixing the center of the fitted profile- fix_sigmabool
If
fit_prf, this sets fixing the width of the fitted profile
- Returns
- sci2darray
Combined 2D spectrum
- wht2darray
Inverse variance weights of the combination
- profile2darray
Profile used for the optimal 1D extraction
- spec
astropy.table.Table 1D extraction
- prof_tab
astropy.table.Table Cross-dispersion profile