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 KVPick instances and supports list-like indexing, i.e. output[idx], to access them. It also supports iteration to yield picks, i.e. iter() function and for 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() and cf_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 are rec_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 is True. If not, get time in seconds from input data start

  • isoformat (bool, optional) – Flag to write POSIX times as ISO datetime strings or float numbers, default is True. Only relevant if posix is set to True

wt_traces()[source]

List of filtered traces, if available.

cf_traces()[source]

List of CF traces, if available.

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 is True. If not, get time in seconds from input data start

property singlepicks

Individual singlepicks.

property nb

Number of bands.

property centralfreqs

Central frequencies.