Combine1dStep
- class jwst.combine_1d.Combine1dStep(name=None, parent=None, config_file=None, _validate_kwds=True, **kws)[source]
Bases:
JwstStep
Combine 1D spectra.
- exptime_key
A case-insensitive string that identifies the metadata element (or FITS keyword) for the weight to apply to the input data. The default is “exposure_time”. If the string is “effinttm” or starts with “integration”, the integration time (FITS keyword EFFINTTM) is used as the weight. If the string is “effexptm” or starts with “exposure”, the exposure time (FITS keyword EFFEXPTM) is used as the weight. If the string is “unit_weight” or “unit weight”, the same weight (1) will be used for all input spectra. If the string is anything else, a warning will be logged and unit weight will be used.
- Type:
- sigma_clip
Optional factor for sigma clipping outliers when combining spectra. If a floating point value is provided for
sigma_clip
, this value will be used to set an outlier threshold for any pixels in the input spectra that deviate from the median and median absolute deviation of the inputs. Defaults to None (such that no clipping is performed).- Type:
float or None
Create a
Step
instance.- Parameters:
name (str, optional) – The name of the Step instance. Used in logging messages and in cache filenames. If not provided, one will be generated based on the class name.
parent (Step instance, optional) – The parent step of this step. Used to determine a fully-qualified name for this step, and to determine the mode in which to run this step.
config_file (str or pathlib.Path, optional) – The path to the config file that this step was initialized with. Use to determine relative path names of other config files.
**kws (dict) – Additional parameters to set. These will be set as member variables on the new Step instance.
Attributes Summary
Methods Summary
process
(input_data)Combine the input data.
Attributes Documentation
- class_alias = 'combine_1d'
- spec
exptime_key = string(default="exposure_time") # Metadata key to use for weighting sigma_clip = float(default=None) # Factor for clipping outliers
Methods Documentation
- process(input_data)[source]
Combine the input data.
- Parameters:
input_data (str or ModelContainer or MultiSpecModel) – Input is expected to be an association file name, ModelContainer, or MultiSpecModel containing multiple spectra to be combined. Individual members of the association or container are expected to be MultiSpecModel instances.
- Returns:
output_spectrum – A single combined 1D spectrum.
- Return type:
MultiCombinedSpecModel