obspy.io.pde.mchedr.Unpickler

class Unpickler[source]

Bases: object

De-serializes a mchedr string into an ObsPy Catalog object.

Public Methods

load

Reads mchedr file into ObsPy catalog object.

loads

Parses mchedr string into ObsPy catalog object.

Private Methods

Warning

Private methods are mainly for internal/developer use and their API might change without notice.

Unpickler._angle_between(u1, u2)[source]

Returns the angle in degrees between unit vectors ‘u1’ and ‘u2’: Source: https://stackoverflow.com/q/2827393

Unpickler._coordinate_sign(type)[source]
Unpickler._decode_fe_region_number(number)[source]

Converts Flinn-Engdahl region number to string.

Unpickler._deserialize()[source]
Unpickler._float(string)[source]
Unpickler._float_unused(string)[source]
Unpickler._float_with_format(string, format_string, scale=1)[source]
Unpickler._int(string)[source]
Unpickler._int_unused(string)[source]
Unpickler._int_zero(string)[source]
Unpickler._lat_err_to_deg(latitude_stderr)[source]

Convert latitude error from km to degrees using a simple formula

Unpickler._lon_err_to_deg(longitude_stderr, latitude)[source]

Convert longitude error from km to degrees using a simple formula

Unpickler._parse_record_a(line, event)[source]

Parses the ‘additional parameters’ record A

Unpickler._parse_record_ae(line, event)[source]

Parses the ‘additional hypocenter error and magnitude record’ AE

Unpickler._parse_record_ah(line, event)[source]

Parses the ‘additional hypocenter’ record AH

Unpickler._parse_record_c(line, event)[source]

Parses the ‘general comment’ record C

Unpickler._parse_record_da(line, focal_mechanism)[source]

Parses the ‘source parameter data - principal axes and nodal planes’ record Da

Unpickler._parse_record_dc(line, focal_mechanism)[source]

Parses the ‘source parameter data - comment’ record Dc

Unpickler._parse_record_dp(line, event)[source]

Parses the ‘source parameter data - primary’ record Dp

Unpickler._parse_record_dt(line, focal_mechanism)[source]

Parses the ‘source parameter data - tensor’ record Dt

Unpickler._parse_record_e(line, event)[source]

Parses the ‘error and magnitude’ record E

Unpickler._parse_record_hy(line)[source]

Parses the ‘hypocenter’ record HY

Unpickler._parse_record_l(line, event)[source]

Parses the ‘90 percent error ellipse’ record L

Unpickler._parse_record_m(line, event, pick)[source]

Parses the ‘surface wave record’ M

Unpickler._parse_record_p(line, event)[source]

Parses the ‘primary phase record’ P

The primary phase is the first phase of the reading, regardless its type.

Unpickler._parse_record_s(line, event, p_pick, p_arrival)[source]

Parses the ‘secondary phases’ record S

Secondary phases are following phases of the reading, and can be P-type or S-type.

Unpickler._spherical_to_cartesian(spherical_coords)[source]
Unpickler._store_uncertainty(error, value, scale=1)[source]
Unpickler._tensor_code_sign(code)[source]

Converts tensor from ‘x,y,z’ system to ‘r,t,p’ and translates ‘f’ code to ‘p’

Unpickler._tensor_store(tensor, code, value, error)[source]
Unpickler._to_deg(radians)[source]
Unpickler._to_rad(degrees)[source]

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__()[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).