Esempio n. 1
0
 def iter_selected_stations(self):
     """
     Iterate over the selected stations (channels)
     Yields (network, station, channel) for each selected channel
     """
     if self.stations:
         for (network, station, channel) in iter_channels(self.stations):
             sncl = get_sncl(network, station, channel)
             if sncl in self.selected_station_ids:
                 yield (network, station, channel)
Esempio n. 2
0
 def iter_selected_stations(self):
     """
     Iterate over the selected stations (channels)
     Yields (network, station, channel) for each selected channel
     """
     if self.stations:
         for (network, station, channel) in iter_channels(self.stations):
             sncl = get_sncl(network, station, channel)
             if sncl in self.selected_station_ids:
                 yield (network, station, channel)
Esempio n. 3
0
    def __init__(self, event, network, station, channel, *args, **kwargs):
        super(WaveformEntry, self).__init__(*args, **kwargs)

        self.event_ref = weakref.ref(event)
        self.network_ref = weakref.ref(network)
        self.station_ref = weakref.ref(station)
        self.channel_ref = weakref.ref(channel)

        self.sncl = get_sncl(network, station, channel)

        self.event_description = get_event_description(event)
        origin = get_preferred_origin(event)
        self.event_time = origin.time
        self.event_time_str = format_time_str(origin.time)
        self.event_depth = origin.depth / 1000
        mag = get_preferred_magnitude(event)
        self.event_mag = "%s%s" % (mag.mag, mag.magnitude_type)
        self.event_mag_value = mag.mag
        self.waveform_id = '%s_%s' % (self.sncl, get_event_id(event))

        self.distance = get_distance(origin.latitude, origin.longitude,
                                     station.latitude, station.longitude)
Esempio n. 4
0
    def __init__(self, event, network, station, channel, *args, **kwargs):
        super(WaveformEntry, self).__init__(*args, **kwargs)

        self.event_ref = weakref.ref(event)
        self.network_ref = weakref.ref(network)
        self.station_ref = weakref.ref(station)
        self.channel_ref = weakref.ref(channel)

        self.sncl = get_sncl(network, station, channel)

        self.event_description = get_event_description(event)
        origin = get_preferred_origin(event)
        self.event_time = origin.time
        self.event_time_str = format_time_str(origin.time)
        self.event_depth = origin.depth / 1000
        mag = get_preferred_magnitude(event)
        self.event_mag = "%s%s" % (mag.mag, mag.magnitude_type)
        self.event_mag_value = mag.mag
        self.waveform_id = '%s_%s' % (self.sncl, get_event_id(event))

        self.distance = get_distance(
            origin.latitude, origin.longitude,
            station.latitude, station.longitude)