gui.marker
¶
-
class
Marker
(nslc_ids, tmin, tmax, kind=0)[source]¶ General purpose marker GUI element and base class for
EventMarker
andPhaseMarker
.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
Marker
objects - fn – filename as string
- fdigits – number of decimal digits to use for sub-second time strings (default 3)
- markers – list of
-
static
load_markers
(fn)[source]¶ Static method to load markers from file.
Parameters: filename – filename as string Returns: list of Marker
,EventMarker
orPhaseMarker
objects
-
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()
.
-
class
EventMarker
(event, kind=0, event_hash=None)[source]¶ GUI element representing a seismological event.
Parameters: - event – A
pyrocko.model.Event
object containing meta information of a seismological event - kind – (optional) integer to distinguish groups of markers
- event_hash – (optional) hash code of event (see:
pyrocko.model.Event.get_hash()
)
-
get_event
()[source]¶ Return an instance of the
pyrocko.model.Event
associated to thisEventMarker
- event – A
-
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]¶ A 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
pyrocko.model.Event
object containing meta information of a seismological event - event_hash – (optional) hash code of event (see:
pyrocko.model.Event.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
pyrocko.model.Event
associated to thisEventMarker
-
load_markers
(filename)[source]¶ Load markers from file.
Parameters: filename – filename as string Returns: list of Marker
Objects