obspy.io.gse2.bulletin.Unpickler
- class Unpickler(inventory, default_network_code, default_location_code, default_channel_code, res_id_prefix, fields, event_point_separator, agency)[source]
Bases:
object
De-serialize a GSE2.0 string into an ObsPy Catalog object.
Public Methods
Read GSE2.0 file into ObsPy catalog object. |
Private Methods
Warning
Private methods are mainly for internal/developer use and their API might change without notice.
- Unpickler._check_header(first_line)[source]
Just check some stuff in header.
- Parameters
first_line (str) – First line of header.
- Unpickler._get_channel(station, time)[source]
Use inventory to retrieve channel and location code.
- Parameters
station (str) – Station code
time (
UTCDateTime
) – Only use channel active at given point in time.
- Return type
str,
Channel
- Returns
Network code, channel retrieved.
- Unpickler._get_res_id(ident, parent=None, parent_res_id=None)[source]
Create a
ResourceIdentifier
object.- Parameters
ident (str) – Id of the
ResourceIdentifier
.parent (
Origin
,Event
or any other object with a resource_id attribute.) – The resource_id attribute of the parent will be used as a prefix for the newResourceIdentifier
.parent_res_id (
ResourceIdentifier
) –ResourceIdentifier
of the parent.
- Return type
- Returns
ResourceIdentifier object.
- Unpickler._parse_first_line_origin(line, event, magnitudes)[source]
Parse the first line of origin data.
- Parameters
- Return type
- Returns
Parsed origin or None, resource identifier of the origin.
- Unpickler._parse_origin(event)[source]
Parse an origin.
- Parameters
event (
Event
) – Event of the origin.- Return type
- Returns
Parsed origin or None, resource identifier of the origin.
- Unpickler._warn(message)[source]
Display a warning message with the line number.
- Parameters
message (str) – Message to be displayed
Special Methods
- Unpickler.__delattr__(name, /)
Implement delattr(self, name).
- Unpickler.__dir__()
Default dir() implementation.
- Unpickler.__eq__(value, /)
Return self==value.
- Unpickler.__format__(format_spec, /)
Default object formatter.
- Unpickler.__ge__(value, /)
Return self>=value.
- Unpickler.__getattribute__(name, /)
Return getattr(self, name).
- Unpickler.__gt__(value, /)
Return self>value.
- Unpickler.__hash__()
Return hash(self).
- Unpickler.__init__(inventory, default_network_code, default_location_code, default_channel_code, res_id_prefix, fields, event_point_separator, agency)[source]
- Unpickler.__init_subclass__()
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
- Unpickler.__le__(value, /)
Return self<=value.
- Unpickler.__lt__(value, /)
Return self<value.
- Unpickler.__ne__(value, /)
Return self!=value.
- Unpickler.__new__(**kwargs)
- Unpickler.__reduce__()
Helper for pickle.
- Unpickler.__reduce_ex__(protocol, /)
Helper for pickle.
- Unpickler.__repr__()
Return repr(self).
- Unpickler.__setattr__(name, value, /)
Implement setattr(self, name, value).
- Unpickler.__sizeof__()
Size of object in memory, in bytes.
- Unpickler.__str__()
Return str(self).
- Unpickler.__subclasshook__()
Abstract classes can override this to customize issubclass().
This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).