Delay correction
As written in the tutorial, stage-level correction s are calculated by
OBSINFO using the filter-level delay.samples or delay.seconds,
stage-level delay and datalogger-level correction fields:
delay.samplescan be set at the Filter level. If not, it is set to zero. It is a required field forFIRfilters (why not the other digital filters?)delaycan be set at the Stage level. If it is not specified, it is set to the Stage Filter’sdelay.samplesdivided by the Stage’s ‘input_sample rate. This cannot be done when the Stage is first read, because the Stage’sinput_sample_rateusually depends on the preceding Stages.correctiondepends on the value ofdatalogger.correction:if
datalogger.correctionisNone(i.e., not specified in the information file,correction=delayin every stageotherwise,
correction = datalogger.correctionin the last stage andcorrection = 0in every other stage.
this calculation can only be made after
delayis calculated
The process for calculating delay and correction is as follows:
An attribute dictionary is passed to
Instrument._init(), whichcreates
Sensor,Datalogger, andPreAmplifierproperties using their constructorseach one creates/contains a Stages() property, but only the
Dataloggerobject gets acorrection`valueThe
Stagesconstructor creates a list ofStages. EachStage:contains a
delay(usually not specfied in the information file, in which casedelay = None)`contains a
Filter`that contains anoffset(set to0if not specified)
calls
self.combine_stages(), which combines the Sensor, PreAmplifier and DataLogger stages into a single, ordered list (Sensor stages, then Preamplifier and finally Datalogger)calls
self.integrate_stages(), which loops through each stage, checking/creating continuity, calculatingdelay(inStage.calculate_delay()) and settingcorrection = delayifcorrectionisNonecreates a list of
obspystages and incorporates them into an obspyResponseobject (including calculating Sensitivity)