Dataset inspection utilities

class DatasetInspection(dataset)[source]

Bases: object

export(directory)[source]

Exports all traces in the dataset to MiniSEED files, grouped by day.

Requires pyrocko to be installed.

Parameters:

directory (str | Path) – Directory to write MiniSEED files to.

Return type:

None

Returns:

None

get_pyrocko_event(sample_idx)[source]

Returns the event of a sample as a pyrocko Event object.

Requires pyrocko to be installed.

Parameters:

idx – Idx of sample to return event for, or event source_id

Return type:

Event

Returns:

pyrocko Event object

get_pyrocko_picks(sample_idx)[source]

Returns the picks of a sample as a list of pyrocko Pick objects.

Requires pyrocko to be installed.

Parameters:

idx – Idx of sample to return picks for

Return type:

list[PhaseMarker]

Returns:

List of pyrocko Pick objects

get_pyrocko_station(sample_idx)[source]
Return type:

Station

get_pyrocko_traces(sample_idx)[source]

Returns the waveforms of a sample as a list of pyrocko Trace objects.

Requires pyrocko to be installed.

Parameters:

idx – Idx of sample to return traces for

Return type:

list[Trace]

Returns:

List of pyrocko Trace objects

pyrocko_snuffle_event(event)[source]

Snuffle all traces, picks and the event associated with a given event.

Requires pyrocko to be installed.

Parameters:

event (int | str) – Event identifier

Return type:

None

Returns:

pyrocko Snuffle object

pyrocko_snuffle_sample(sample_idx)[source]

Returns a pyrocko Snuffle object containing the traces, event and picks of a sample.

Requires pyrocko to be installed.

Parameters:

idx – Idx of sample to return Snuffle for

Return type:

None

Returns:

pyrocko Snuffle object