flap.select¶
Created on Fri Apr 12 19:23:25 2019
Selecting parts of the data in FLAP.
@author: Sandor Zoletnik (zoletnik.sandor@ek-cer.hu) Centre for Energy Research
- flap.select.select_intervals(object_descr, coordinate=None, exp_id='*', intervals=None, options=None, plot_options=None, output_name=None)¶
Select intervals from data interactively.
- Parameters:
- object_descrflap.DataObject | str
Object to operate on.
If a data object: Plot this data object to select.
String: Will be interpreted as a data object name in flap storage.
- coordinatestr, optional, default=None
The name of the coordinate to use for x axis. This will be the coordinate of the selection.
- exp_idstr, optional, default=’*’
The experiment ID, if object_descr is a string.
- intervalsdict | str, optional, default=None
Information of processing intervals.
If dictionary with a single key: {selection coordinate: description}). Key is a coordinate name which can be different from the calculation coordinate. Description can be
Intervals,DataObjector a list of two numbers. If it is a data object with data name identical to the coordinate, the error ranges of the data object will be used for interval. If the data name is not the same as coordinate, a coordinate with the same name will be searched for in the data object and the value_ranges will be used from it to set the intervals.If not a dictionary and not None, it is interpreted as the interval description, the selection coordinate is taken the same as coordinate.
If None, the whole data interval will be used as a single interval.
- optionsdict, optional, default=None
Possible keys and values:
‘Select’ (default=’Full’):
‘Start’: Select start of intervals. (Needs Length to be set.)
‘End’: Select end of intervals. (Needs Length to be set.)
‘Full’: Select start and end of interval.
‘Center’: Select center of interval.
None: No interactive selection.
‘Length’ (default=None):
float: Length of intervals.
‘Event’ (default=None):
dict: Dictionary describing events to search for. A reference time will be determined for each event and a Length interval will be selected symmetrically around it. Trend removal and/or filtering should be done before calling this function.
Possible keys and values:
‘Type’:
‘Maximum’ or ‘Minimum’: Will look for signal pieces above/below threshold and calculate maximum place of signal in this piece.
‘Max-weight’ or ‘Min-weight’: Same as Maximum and Minimum but selects center of gravity for signal piece.
In each of the above cases the interval will be ‘Length’ long around the event.
‘Above’, ‘Below’: The intervals will be where the signal is above or below the threshold.
‘Correlation’: Will calculate the correlation between the filtered signal and filtered Gaussians, then then perform the same interval selection as above for ‘Max-weight’ and ‘Min-weight’. The sign of the treshold determines which one will be: (-) stands for ‘Min-weight’, (+) stands for ‘Max-weight’
‘Start delay’, ‘End delay’:
For the Above and Below events the start and end delay of the interval in the coordinate units.
‘Gaussian sigma’:
For Correlation events. It can be a float, or an 1D array of floats. It contains the sigma parameters of the Gaussians.
‘Int tau’:
For Correlation events. It is the tau parameter for the integrator filter.
‘Diff tau’:
For Correlation events. It is the tau parameter for the differentiator filter.
‘Threshold’:
The threshold for the event.
‘Thr-type’:
Threshold type:
‘Absolute’: Absolute signal value.
‘Sigma’: Threshold times sigma.
- plot_optionsdict, optional, default=None
Passed to plot().
- output_namestr, optional, default=None
Output object name in flap_storage.
- Returns:
- flap.DataObject
Data name is the coordinate name. The error gives the intervals.