Full Name: | herschel.hifi.pipeline.util.tools.SelectSpectrumTask |
Alias: | selectHifi |
Type: | Java Task -
![]() |
Import: | from herschel.hifi.pipeline.util.tools import SelectSpectrumTask |
Category |
Task for selecting datasets and/or rows of a timeline product ({@link HifiProduct}
or a dataset ({@link Spectrum2d}).
A timeline product or a dataset can be specififed as input but not both - otherwise a runtime exception is thrown. It is an
extension of the SelectSpectrumTask in herschel.ia.toolbox.spectrum
from which it inherits the selection functionality from within the datasets. An additional selection scheme is available
to select datasets from within the HifiTimelineProduct
by looking at meta data.
In summary, the following selection models are available:
Selection of the datasets from the timeline product by referring to meta data: use 'selection_meta'.
Selection of the rows from the (possibly in the previous steps pre-selected) datasets by looking up suitable values in specific (1d-)columns: use 'selection_lookup'.
Select rows by specifying a list of row numbers: use 'selection_index'. Note that this seems not to be suited when processing timeline products.
Selection of the rows from a general selection model (such as IntervalSelectionModel): use 'selection'.
Remarks:Note that only either a timeline product or a dataset should be passed as input data. In case a timeline product and a dataset are passed a runtime exception is thrown.
Example 1: in HIPE | ||
---|---|---|
|
HifiTimelineProduct htp
[INPUT, OPTIONAL, default=No default value.]
|
|
---|---|
The input timeline product. |
PyList selection_index
[INPUT, OPTIONAL, default=No default value.]
|
|
---|---|
Specify a PyList with the indices of the point spectra to be considered. |
Boolean return_single_ds
[INPUT, OPTIONAL, default=False.]
|
|
---|---|
If set to true all the selected point spectra are written to a single dataset. In case a single dataset should be returned the situation may occur taht not all datasets that should be selected have exactly the same subband lengths. In this situation, the subbands are cropped (from above) to the minimum subband length of the spectra to be selected. |
PyDictionary selection_meta
[INPUT, OPTIONAL, default=No default value.]
|
|
---|---|
Selects point spectra (scans) if the hosting dataset have meta data with given values. |
PyList add_from_metadata
[INPUT, OPTIONAL, default=no default value.]
|
|
---|---|
If you set
Note that in particular for boolean parameters caution is needed. |