|
12 | 12 |
|
13 | 13 |
|
14 | 14 | class Extract1dStep(Step): |
15 | | - """ |
16 | | - Extract a 1D spectrum from 2D data. |
17 | | -
|
18 | | - Attributes |
19 | | - ---------- |
20 | | - subtract_background : bool or None |
21 | | - A flag which indicates whether the background should be subtracted. |
22 | | - If None, the value in the extract_1d reference file will be used. |
23 | | - If not None, this parameter overrides the value in the |
24 | | - extract_1d reference file. |
25 | | - apply_apcorr : bool |
26 | | - Switch to select whether to apply an APERTURE correction during |
27 | | - the Extract1dStep. Default is True. |
28 | | - extraction_type : str or None |
29 | | - If 'box', a standard extraction is performed, summing over an |
30 | | - aperture box. If 'optimal', a PSF-based extraction is performed. |
31 | | - If None, optimal extraction is attempted whenever use_source_posn is |
32 | | - True. Currently, optimal extraction is only available for MIRI LRS |
33 | | - Fixed Slit data. |
34 | | - use_source_posn : bool or None |
35 | | - If True, the source and background extraction regions specified in |
36 | | - the extract1d reference file will be shifted to account for the computed |
37 | | - position of the source in the data. If None (the default), this parameter |
38 | | - is set to True for point sources in NIRSpec and MIRI LRS fixed slit modes. |
39 | | - position_offset : float |
40 | | - Number of pixels to offset the source and background extraction regions |
41 | | - in the cross-dispersion direction. This is intended to allow a manual |
42 | | - tweak to the aperture defined via reference file; the default value is 0.0. |
43 | | - model_nod_pair : bool |
44 | | - If True, and the extraction type is 'optimal', then a negative trace |
45 | | - from nod subtraction is modeled alongside the positive source during |
46 | | - extraction. Even if set to True, this will be attempted only if the |
47 | | - input data has been background subtracted and the dither pattern |
48 | | - indicates that only 2 nods were used. |
49 | | - optimize_psf_location : bool |
50 | | - If True, and the extraction type is 'optimal', then the placement of |
51 | | - the PSF model for the source location (and negative nod, if present) |
52 | | - will be iteratively optimized. This parameter is recommended if |
53 | | - negative nods are modeled. |
54 | | - smoothing_length : int or None |
55 | | - If not None, the background regions (if any) will be smoothed |
56 | | - with a boxcar function of this width along the dispersion |
57 | | - direction. This should be an odd integer. |
58 | | - bkg_fit : str |
59 | | - A string indicating the type of fitting to be applied to |
60 | | - background values in each column (or row, if the dispersion is |
61 | | - vertical). Allowed values are `poly`, `mean`, and `median`. |
62 | | - Default is `None`. |
63 | | - bkg_order : int or None |
64 | | - If not None, a polynomial with order `bkg_order` will be fit to |
65 | | - each column (or row, if the dispersion direction is vertical) |
66 | | - of the background region or regions. For a given column (row), |
67 | | - one polynomial will be fit to all background regions. The |
68 | | - polynomial will be evaluated at each pixel of the source |
69 | | - extraction region(s) along the column (row), and the fitted value |
70 | | - will be subtracted from the data value at that pixel. |
71 | | - If both `smoothing_length` and `bkg_order` are not None, the |
72 | | - boxcar smoothing will be done first. |
73 | | - log_increment : int |
74 | | - if `log_increment` is greater than 0 (the default is 50) and the |
75 | | - input data are multi-integration (which can be CubeModel or |
76 | | - SlitModel), a message will be written to the log with log level |
77 | | - INFO every `log_increment` integrations. This is intended to |
78 | | - provide progress information when invoking the step interactively. |
79 | | - save_profile : bool |
80 | | - If True, the spatial profile containing the extraction aperture |
81 | | - is saved to disk. Ignored for IFU and NIRISS SOSS extractions. |
82 | | - save_scene_model : bool |
83 | | - If True, a model of the 2D flux as defined by the extraction aperture |
84 | | - is saved to disk. Ignored for IFU and NIRISS SOSS extractions. |
85 | | - save_residual_image : bool |
86 | | - If True, the residual image (from the input minus the scene model) |
87 | | - is saved to disk. Ignored for IFU and NIRISS SOSS extractions. |
88 | | - center_xy : int or None |
89 | | - A list of 2 pixel coordinate values at which to place the center |
90 | | - of the IFU extraction aperture, overriding any centering done by the step. |
91 | | - Two values, in x,y order, are used for extraction from IFU cubes. |
92 | | - Default is None. |
93 | | - ifu_autocen : bool |
94 | | - Switch to turn on auto-centering for point source spectral extraction |
95 | | - in IFU mode. Default is False. |
96 | | - bkg_sigma_clip : float |
97 | | - Background sigma clipping value to use on background to remove outliers |
98 | | - and maximize the quality of the 1d spectrum. Used for IFU mode only. |
99 | | - ifu_rfcorr : bool |
100 | | - Switch to select whether or not to apply a 1d residual fringe correction |
101 | | - for MIRI MRS IFU spectra. Default is True. |
102 | | - ifu_set_srctype : str |
103 | | - For MIRI MRS IFU data override srctype and set it to either POINT or EXTENDED. |
104 | | - ifu_rscale : float |
105 | | - For MRS IFU data a value for changing the extraction radius. The value provided is |
106 | | - the number of PSF FWHMs to use for the extraction radius. Values accepted are between |
107 | | - 0.5 to 3.0. The default extraction size is set to 2 * FWHM. Values below 2 will result |
108 | | - in a smaller radius, a value of 2 results in no change to the radius and a value above |
109 | | - 2 results in a larger extraction radius. |
110 | | - ifu_covar_scale : float |
111 | | - Scaling factor by which to multiply the ERR values in extracted spectra to account |
112 | | - for covariance between adjacent spaxels in the IFU data cube. |
113 | | - soss_atoca : bool, default=False |
114 | | - Switch to toggle extraction of SOSS data with the ATOCA algorithm. |
115 | | - WARNING: ATOCA results not fully validated, and require the photom step |
116 | | - be turned off. Default is False, meaning SOSS data use box extraction. |
117 | | - soss_threshold : float |
118 | | - Threshold value above which a pixel will be included when modeling the SOSS |
119 | | - trace in ATOCA. Default is 0.01. |
120 | | - soss_n_os : int |
121 | | - Oversampling factor of the underlying wavelength grid when modeling the SOSS |
122 | | - trace in ATOCA. Default is 2. |
123 | | - soss_wave_grid_in : str or SossWaveGrid or None |
124 | | - Filename or SossWaveGrid containing the wavelength grid used by ATOCA |
125 | | - to model each pixel valid pixel of the detector. If not given, the grid is determined |
126 | | - based on an estimate of the flux (soss_estimate), the relative tolerance (soss_rtol) |
127 | | - required on each pixel model and the maximum grid size (soss_max_grid_size). |
128 | | - soss_wave_grid_out : str or None |
129 | | - Filename to hold the wavelength grid calculated by ATOCA. |
130 | | - soss_estimate : str or SpecModel or None |
131 | | - Filename or SpecModel of the estimate of the target flux. The estimate must |
132 | | - be a SpecModel with wavelength and flux values. |
133 | | - soss_rtol : float |
134 | | - The relative tolerance needed on a pixel model. It is used to determine the sampling |
135 | | - of the soss_wave_grid when not directly given. |
136 | | - soss_max_grid_size: int |
137 | | - Maximum grid size allowed. It is used when soss_wave_grid is not provided |
138 | | - to make sure the computation time or the memory used stays reasonable. |
139 | | - soss_tikfac : float |
140 | | - The regularization factor used for extraction in ATOCA. If left to default |
141 | | - value of None, ATOCA will find an optimized value. |
142 | | - soss_width : float |
143 | | - Aperture width used to extract the SOSS spectrum from the decontaminated |
144 | | - trace in ATOCA. Default is 40. |
145 | | - soss_bad_pix : str |
146 | | - Method used to handle bad pixels, accepts either "model" or "masking". Default |
147 | | - method is "model". |
148 | | - soss_modelname : str |
149 | | - Filename for optional model output of ATOCA traces and pixel weights. |
150 | | - """ |
| 15 | + """Extract a 1D spectrum from 2D data.""" |
151 | 16 |
|
152 | 17 | class_alias = "extract_1d" |
153 | 18 |
|
|
0 commit comments