Delay correction
As written in the tutorial, stage-level correction
s are calculated by
OBSINFO using the filter-level offset
, stage-level delay
and
datalogger-level delay_correction
fields:
offset
can be set at the Filter level. If not, it is set to zero. It is a required field forFIR
filters (why not the other digital filters?)delay
can be set at the Stage level. If it is not specified, it is set to the Stage Filter’soffset
divided by the Stage’s ‘input_sample rate
. This cannot be done when the Stage is first read, because the Stage’sinput_sample_rate
usually depends on the preceding Stages.correction
depends on the value ofdatalogger.delay_correction
:if
datalogger.delay_correction
isNone
(i.e., not specified in the information file,correction
=delay
in every stageotherwise,
correction = datalogger.delay_correction
in the last stage andcorrection = 0
in every other stage.
this calculation can only be made after
delay
is calculated
The process for calculating delay
and ` correction
is as follows:
An attribute dictionary is passed to
Instrument._init()
, whichcreates
Sensor
,Datalogger
, andPreAmplifier
properties using their constructorseach one creates/contains a ResponseStages() property, but only the
Datalogger
object gets adelay_correction`
valueThe
ResponseStages
constructor creates a list ofStage
s. EachStage
:contains a
delay
(usually not specfied in the information file, in which casedelay = None
)`contains a
Filter`
that contains anoffset
(set to0
if not specified)
calls
self.combine_response_stages()
, which combines the Sensor, PreAmplifier and DataLogger stages into a single, ordered list (Sensor stages, then Preamplifier and finally Datalogger)calls
self.integrate_response_stages()
, which loops through each stage, checking/creating continuity, calculatingdelay
(inStage.calculate_delay()
) and settingcorrection = delay
ifcorrection
isNone
creates a list of
obspy
stages and incorporates them into an obspyResponse
object (including calculating Sensitivity)