Skip to content
Snippets Groups Projects
Commit ff9ee051 authored by Wilbur, Spencer Franklin's avatar Wilbur, Spencer Franklin
Browse files

Ran Lint again on FDSNFactory.

parent 2f95692c
No related branches found
No related tags found
1 merge request!291Committing two new files, FDSNSNCL and FDSNFactory. The factory is modeled...
...@@ -83,20 +83,17 @@ class FDSNFactory(TimeseriesFactory): ...@@ -83,20 +83,17 @@ class FDSNFactory(TimeseriesFactory):
interval: Optional[DataInterval] = None, interval: Optional[DataInterval] = None,
variometerMetadata: Optional[VariometerMetadata] = None, variometerMetadata: Optional[VariometerMetadata] = None,
locationCode: Optional[str] = None, locationCode: Optional[str] = None,
): ):
TimeseriesFactory.__init__(self, observatory, channels, type, interval) TimeseriesFactory.__init__(self, observatory, channels, type, interval)
self.Client = FDSNClient(base_url) self.Client = FDSNClient(base_url)
self.tag = tag self.tag = tag
self.forceout = forceout self.forceout = forceout
self.interval = interval self.interval = interval
self.observatoryMetadata = variometerMetadata or VariometerMetadata() self.observatoryMetadata = variometerMetadata or VariometerMetadata()
self.network = network self.network = network
self.locationCode = locationCode self.locationCode = locationCode
def get_timeseries( def get_timeseries(
self, self,
...@@ -147,12 +144,12 @@ class FDSNFactory(TimeseriesFactory): ...@@ -147,12 +144,12 @@ class FDSNFactory(TimeseriesFactory):
raise TimeseriesFactoryException( raise TimeseriesFactoryException(
'Starttime before endtime "%s" "%s"' % (starttime, endtime) 'Starttime before endtime "%s" "%s"' % (starttime, endtime)
) )
###################### ######################
#I do not entirely understand what the pupose of the sys.stdout was tryinig to accomplish # I do not entirely understand what the pupose of the sys.stdout was tryinig to accomplish
# so I left it out but I think this may be worth a discussion. Apart from this I removed a lot of # so I left it out but I think this may be worth a discussion. Apart from this I removed a lot of
# post processing functionality that dealt with removing NaN values from the timeseries. My understadning is that # post processing functionality that dealt with removing NaN values from the timeseries. My understadning is that
# the IRIS DMC will return empty data but not NaN values. # the IRIS DMC will return empty data but not NaN values.
###################### ######################
# # obspy factories sometimes write to stdout, instead of stderr # # obspy factories sometimes write to stdout, instead of stderr
...@@ -182,8 +179,6 @@ class FDSNFactory(TimeseriesFactory): ...@@ -182,8 +179,6 @@ class FDSNFactory(TimeseriesFactory):
return timeseries return timeseries
def _get_timeseries( def _get_timeseries(
self, self,
starttime: UTCDateTime, starttime: UTCDateTime,
...@@ -333,7 +328,7 @@ class FDSNFactory(TimeseriesFactory): ...@@ -333,7 +328,7 @@ class FDSNFactory(TimeseriesFactory):
"This is provisional data. Any data secured from the USGS database that are identified as provisional have not received Director's approval and are subject to revision. Source and Authority: U.S. Geological Survey Manual, Section 500.24", "This is provisional data. Any data secured from the USGS database that are identified as provisional have not received Director's approval and are subject to revision. Source and Authority: U.S. Geological Survey Manual, Section 500.24",
"DISCLAIMER", "DISCLAIMER",
] ]
def _set_metadata( def _set_metadata(
self, self,
stream: Stream, stream: Stream,
...@@ -363,7 +358,7 @@ class FDSNFactory(TimeseriesFactory): ...@@ -363,7 +358,7 @@ class FDSNFactory(TimeseriesFactory):
self, trace: Trace, starttime: UTCDateTime self, trace: Trace, starttime: UTCDateTime
) -> tuple[float, float]: ) -> tuple[float, float]:
# Retrieve station orientation information using FDSN for each trace # Retrieve station orientation information using FDSN for each trace
sncl = FDSNSNCL.get_sncl( sncl = FDSNSNCL.get_sncl(
data_type=trace.stats.location, data_type=trace.stats.location,
element=trace.stats.channel, element=trace.stats.channel,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment