Results containers
The classes presented below are not available directly to the user and are instead returned by other functions or methods.
Checking the results
- class KVPOutput(kvp_items, wt_traces, cf_traces)[source]
Class to store KVP outputs. It contains
KVPickinstances and supports list-like indexing, i.e.output[idx], to access them. It also supports iteration to yield picks, i.e.iter()function andfor pick in output: ...iterator syntax.If filtered or CF traces are saved after a run, they can be retrieved from the corresponding methods,
wt_traces()andcf_traces(), respectively. The returned tuples contain a series of two-tuples with the data arrays and dictionaries containing sampling rate and starttime.- append_to_file(fout, **kwargs)[source]
Append picks to an open file, i.e. an object returned by the
open()function. Output columns arerec_id, onset time, number of bands, lowest band, and highest band, respectively.- Parameters:
fout (file object) – Open file object
posix (
bool, optional) – Flag to get onsets as POSIX time, default isTrue. If not, get time in seconds from input data startisoformat (
bool, optional) – Flag to write POSIX times as ISO datetime strings orfloatnumbers, default isTrue. Only relevant ifposixis set toTrue
- property picks
List of picks.
- class KVPick(single_ptrs, bands)[source]
Grouped KVP phase pick.
- onset(method='med', posix=True)[source]
Get onset time.
- Parameters:
method (
str) – Method to calculate the onset, only median is implemented for now ('med')posix (
bool, optional) – Flag to get onset as POSIX time, default isTrue. If not, get time in seconds from input data start
- property singlepicks
Individual singlepicks.
- property nb
Number of bands.
- property centralfreqs
Central frequencies.