pyrocko.gui.snuffler.marker¶
Functions
|
Reassociate phases to events after import from markers file. |
|
Load markers from file. |
|
Save markers to file. |
Classes
|
GUI element representing a seismological event. |
|
General purpose marker GUI element and base class for |
|
A PhaseMarker is a GUI-element representing a seismological phase arrival |
Exceptions
Raised when a marker with exactly one NSLC entry is required but there are zero or more than one. |
- exception MarkerOneNSLCRequired[source]¶
Bases:
ExceptionRaised when a marker with exactly one NSLC entry is required but there are zero or more than one.
- class Marker(nslc_ids, tmin, tmax, kind=0)[source]¶
Bases:
objectGeneral purpose marker GUI element and base class for
EventMarkerandPhaseMarker.- Parameters:
nslc_ids – list of (network, station, location, channel) tuples (may contain wildcards)
tmin – start time
tmax – end time
kind – (optional) integer to distinguish groups of markers (color-coded)
- static save_markers(markers, fn, fdigits=3)[source]¶
Static method to write marker objects to file.
- Parameters:
markers – list of
Markerobjectsfn – filename as string
fdigits – number of decimal digits to use for sub-second time strings (default 3)
- static load_markers(fn)[source]¶
Static method to load markers from file.
- Parameters:
filename – filename as string
- Returns:
list of
Marker,EventMarkerorPhaseMarkerobjects
- set(nslc_ids, tmin, tmax)[source]¶
Set
nslc_ids, start time and end time ofMarker.- Parameters:
nslc_ids – list or set of (network, station, location, channel) tuples
tmin – start time
tmax – end time
- set_kind(kind)[source]¶
Set kind of
Marker.- Parameters:
kind – (optional) integer to distinguish groups of markers (color-coded)
- get_nslc_ids()[source]¶
Get marker’s network-station-location-channel pattern.
- Returns:
list or set of (network, station, location, channel) tuples
The network, station, location, or channel strings may contain wildcard expressions.
- match_nsl(nsl)[source]¶
See documentation of
pyrocko.util.match_nslc().
- match_nslc(nslc)[source]¶
See documentation of
pyrocko.util.match_nslc().
- one_nslc()[source]¶
Get single NSLC pattern or raise an exception if there is not exactly one.
If nslc_ids contains a single entry, return it. If more than one is available, raise
MarkerOneNSLCRequired.
- class EventMarker(event, kind=0, event_hash=None)[source]¶
Bases:
MarkerGUI element representing a seismological event.
- Parameters:
event – A
Eventobject containing meta information of a seismological eventkind – (optional) integer to distinguish groups of markers
event_hash – (optional) hash code of event (see:
get_hash())
- get_event()[source]¶
Return an instance of the
Eventassociated to thisEventMarker
- class PhaseMarker(nslc_ids, tmin, tmax, kind=0, event=None, event_hash=None, event_time=None, phasename=None, polarity=None, automatic=None, incidence_angle=None, takeoff_angle=None)[source]¶
Bases:
MarkerA PhaseMarker is a GUI-element representing a seismological phase arrival
- Parameters:
nslc_ids – list of (network, station, location, channel) tuples (may contain wildcards)
tmin – start time
tmax – end time
kind – (optional) integer to distinguish groups of markers (color-coded)
event – a
Eventobject containing meta information of a seismological eventevent_hash – (optional) hash code of event (see:
get_hash())event_time – (optional) time of the associated event
phasename – (optional) name of the phase associated with the marker
polarity – (optional) polarity of arriving phase
automatic – (optional)
incident_angle – (optional) incident angle of phase
takeoff_angle – (optional) take off angle of phase
- get_event()[source]¶
Return an instance of the
Eventassociated to thisEventMarker
- load_markers(filename)[source]¶
Load markers from file.
- Parameters:
filename – filename as string
- Returns:
list of
MarkerObjects