# http://pyrocko.org - GPLv3 # # The Pyrocko Developers, 21st Century # ---|P------/S----------~Lg----------
geographic_midpoint_locations
raise NotImplementedError
source.distance_to(station))
return []
automap.add_stations(self.get_stations())
optional=True, help='List of files with station coordinates in Pyrocko format.')
optional=True, help='List of files with station coordinates in StationXML format.')
model.Station.T(), optional=True, help='List of Pyrocko stations')
StationGenerator.__init__(self, **kwargs) self._stations = None
if not self.get_stations(): return False return True
stations = self.get_stations() if not stations: return self._parent.get_center_latlon()
return geographic_midpoint_locations(self.get_stations())
stations = self.get_stations() if not stations: return self._parent.get_radius()
clat, clon = self.get_center_latlon() radii = distance_accurate50m_numpy( clat, clon, [st.effective_lat for st in stations], [st.effective_lon for st in stations])
return float(radii.max())
if self._stations is None:
stations = []
if self.stations_paths: for filename in self.stations_paths: stations.extend( load_stations(filename))
if self.stations_stationxml_paths: for filename in self.stations_stationxml_paths: sxml = stationxml.load_xml(filename=filename) stations.extend( sxml.get_pyrocko_stations())
if self.pyrocko_stations: stations.extend(self.pyrocko_stations)
self._stations = stations
return self._stations
stations = self.get_stations() return stations[istation].nsl()
self._stations = None
def nstations(self): return len(self.get_stations())
default=10, help='Number of randomly distributed stations.')
default='CO', help='Network name')
optional=True, default=['BHE', 'BHN', 'BHZ'], help='Seismic channels to generate. Default: BHN, BHE, BHZ')
StationGenerator.clear(self) self._stations = None
else: channels = None
float, self.get_coordinates(istation))
net, sta, loc, lat=lat, lon=lon, north_shift=north_shift, east_shift=east_shift, depth=depth, channels=channels)
|