diff --git a/geomagio/edge/FDSNFactory.py b/geomagio/edge/FDSNFactory.py index 618395c46246defd50d2cdd301fab8c98a308922..7425cd46b5c8b1e0000dd2704bab2817a3ef5e29 100644 --- a/geomagio/edge/FDSNFactory.py +++ b/geomagio/edge/FDSNFactory.py @@ -258,6 +258,25 @@ class FDSNFactory(TimeseriesFactory): data = self._rotate_and_return_requested_channel( data, sncl, starttime, endtime, channel ) + + for trace in data: + response = trace.stats.response + if response.instrument_sensitivity: + if response.instrument_sensitivity.input_units == "T": + # some ASL stations produce data in Teslas, not nanoteslas + response.instrument_sensitivity.value /= 1e9 + response.instrument_sensitivity.input_units = "nT" + # apply total gain/sensitivity, ignore any frequency response + trace.remove_sensitivity() + else: + # according to fdsn docs, if no instrument_sensitivity, + # the response must be an instrument_polynomial + # https://docs.fdsn.org/projects/stationxml/en/latest/reference.html#instrumentsensitivity + + # Geomag Program observatories use 2nd order instrument_polynomial + # to capture both offset and scale, but no frequency response + data.remove_response() + if data.count() == 0 and add_empty_channels: data += self._get_empty_trace( starttime=starttime,