StationXML Management
The daemon automatically generates and maintains a StationXML file (station.xml). This file is the “passport” for your seismic data, containing the metadata required to convert raw ADC counts into physical ground motion (velocity, displacement, or acceleration).
Purpose of StationXML
Section titled “Purpose of StationXML”- Instrument Deconvolution: Allows software like ObsPy to “undo” the effects of the geophone, amplifier, and ADC.
- FDSN Compliance: Metadata is formatted to the international standard for seismic data exchange.
Fingerprint Tracking
Section titled “Fingerprint Tracking”Every time the daemon starts, it calculates a SHA-256 fingerprint of your hardware settings (gain, sensitivity, sample rate, etc.). This is stored in station.xml.sha256.
- Included in Fingerprint:
network,station,sampling_rate,adc_gain,vref, and all channel-specific physical constants. - Excluded: Job settings like trigger thresholds or notification URLs (as these don’t affect the raw data values).
Epoch & History Management
Section titled “Epoch & History Management”An Epoch is a period where the instrument response remains constant. If you swap a geophone or change the analog gain, you must signal the start of a new epoch.
The Epoch Logic Flow
Section titled “The Epoch Logic Flow”- Change Detected: You modify a hardware setting (e.g.,
analog_gain) inconfig.yml. - Validation: The daemon compares the new settings against the stored fingerprint.
- The
start_dateCheck:- If
start_dateis unchanged: The daemon raises aStationXMLEpochErrorand refuses to start. This prevents corrupting your existing metadata. - If
start_dateis updated: The daemon closes the current epoch instation.xml(setting theEndDate) and appends a new epoch starting at your new date.
- If
The 3-Stage Response Chain
Section titled “The 3-Stage Response Chain”The daemon calculates the total system sensitivity by combining three distinct hardware stages.
Physics: Pole-Zero (LAPLACE)
Computed using natural_frequency and damping.
Calculates the conversion from Ground Motion (m/s) to Voltage (V).
Physics: Scalar Gain A simple multiplier based on your instrumentation amplifier (e.g., LT1167).
- Source:
analog_gaininconfig.yml. - Unit: V/V.
Physics: Digital Sensitivity Calculates how many digital counts represent 1 Volt.
Example (Gain 64, 2.5V Ref): ~215,384,678 Counts/V.
Total System Sensitivity
Section titled “Total System Sensitivity”The final <InstrumentSensitivity> value is the product of all three stages. For a standard GD-4.5 setup, this is typically in the range of ~620,307,472,640 counts/(m/s).
Using the StationXML
Section titled “Using the StationXML”In Python (ObsPy)
Section titled “In Python (ObsPy)”You can easily remove the instrument effect to get real-world velocity:
from obspy import read, read_inventory
st = read("data/archive/2026/XX/RPI3/EHZ.D/...")inv = read_inventory("station.xml")
# Convert raw counts to Velocity (m/s)st.remove_response(inventory=inv, output="VEL")