Beispiel #1
0
def _create_origin_quality(ser):
    """ create origing quality/error and attach to origin """
    origin = get_object(ser.orid)

    ser = ser[ser > 0]  # remove unfilled values

    # create origin quality object
    oq = oe.OriginQuality(standard_error=ser.get('sdobs'), )

    origin.quality = oq
Beispiel #2
0
 def _get_origin_quality():
     return ev.OriginQuality(
         associate_phase_count=1,
         used_phase_count=1,
         associated_station_count=1,
         used_station_count=1,
         depth_phase_count=1,
         standard_error=.02,
         azimuthal_gap=.12,
         ground_truth_level='GT0',
     )
Beispiel #3
0
 def _get_origin_quality_info(self, origin, out):
     """Get information from quality info."""
     quality_attrs = (
         ("standard_error", np.NaN),
         ("associated_phase_count", out.get("associated_phase_count", 0)),
         ("azimuthal_gap", np.NaN),
         ("used_phase_count", out.get("used_phase_count", 0)),
     )
     quality = getattr(origin, "quality", ev.OriginQuality())
     for (attr, default) in quality_attrs:
         out[attr] = getattr(quality, attr, None) or default
Beispiel #4
0
 def events_with_origin_quality(self, bingham_dataset):
     """ Return events with an overridden origin quality """
     cat = bingham_dataset.event_client.get_events().copy()
     oq = ev.OriginQuality(
         associated_phase_count=42,
         used_phase_count=10,
         associated_station_count=21,
         used_station_count=5,
     )
     for event in cat:
         origin = event.preferred_origin()
         origin.quality = oq
     return cat