Stage
Description
Stages are discrete units in the block diagram of an electronic circuit which perform a specific function and is usually physically circumscribed to a printed board. An instrument component in obsinfo is usually composed of several chained stages which connect the output of one stage to the input of the next one.
Python class:
Stage
YAML / JSON label:
Unnamed element of stages array. The array itself has a label stages
Corresponding StationXML structure
Stage
Object Hierarchy
Superclass
None
Subclasses
None
Relationships
Attributes
Name |
Type |
Required |
Default |
Equivalent StationXML |
Remarks |
name |
string |
N |
None |
e.g. FIR. name |
In StationXML this attribute is at the filter (PZ, Coeff, FIR, etc.) level. |
description |
string |
N |
None |
e.g. FIR. Description |
In StationXML this attribute is in the filter (PolesZeros, Coefficients, FIR, etc.) |
input_units |
IRISUnits |
Y |
None |
e.g. FIR. InputUnits |
In StationXML this attribute is at the filter (PZ, Coeff, FIR, etc.) level. |
output_units |
IRISUnits |
Y |
None |
e.g. FIR. OutputUnits |
In StationXML this attribute is at the filter (PZ, Coeff, FIR, etc.) level. |
gain: |
Y |
None |
|||
|
number |
Y |
None |
In Hertz |
|
|
number |
Y |
None |
||
filter |
Y |
None |
None |
No filter attribute in StationXML. Individual filters are subsumed in Stage. |
|
calibration_date |
date |
N |
None |
None |
In StationXML this attribute is only found at the equipment level. |
decimation_factor |
number |
N |
1.0 |
Decimation. Factor |
|
input_sample_rate |
number |
Y |
None |
Decimation. InputSampleRate |
|
delay |
number |
N |
0.0 |
Decimation. Delay |
If not set, will be calculated as filter.offset / input_sample_rate |
polarity |
string with values “+” and “-” |
Y |
None |
None |
“+” = counts increase when the input voltage increase, “-” otherwise. |
Calculated Attributes
These attributes do not exist in the YAML/JSON file. They are or may be calculated programmatically to feed corresponding values in the StationXML file or for other purposes.
Name |
Type |
Default |
Equivalent StationXML |
Remarks |
stage_sequence_number |
integer |
0 |
number |
|
correction |
number |
0.0 |
Decimation.Correction |
This value is calculated as a function of correction in class Datalogger. If delay.correction exists correction=0 for all stages but the last, which has value = delay.correction. If it does not exist, correction = delay. |
output_sample_rate |
number |
0.0 |
None |
JSON schema
https://www.gitlab.com/resif/smm/obsinfo/-/tree/master/obsinfo/data/schemas/stage_base.schema.json
Example
file: _templates/stage_base.yaml
---
format_version: "1.0"
revision:
authors:
- {$ref: "persons/EXAMPLE.person.yaml"} # Reference to person file,
# or fields of a person element
date: "2024-09-30" # yyyy-mm-dd
stage_base:
input_units:
name: "V"
# BEGIN OPTIONAL units elements
description: "Volts"
# END OPTIONAL units elements
output_units:
name: "V"
# BEGIN OPTIONAL units elements
description: "Volts"
# END OPTIONAL units elements
gain :
value: 10 # Gain (output_units/input_units)
frequency: 10 # Frequency at which gain is given
filter: {$ref: 'sensor_bases/stage_bases/filters/EXAMPLE_BBSeismometer_SN1-399.filter.yaml'}
# BEGIN OPTIONAL stage_base elements
name: "Funky filter" # Stage/Filter name
description: "Oddball offbeat filter" # Stage/Filter description
delay: 0 # Value to put in StationXML stage w/o modification.
# if not specified and this is a digital stage, calculate
# as filter offset / input_sample_rate
polarity: "+" # "+" if the stage does not invert sign from input to output
# "-" if it does invert sign
# ("+")
input_sample_rate: 100 # Only use if fixed input_sample rate
decimation_factor: 2 # Factor by which this stage decimates data
calibration_dates:
- "2004-12-31T00:00:00"
- "2024-12-31T00:00:00"
resource_id: "IPGP:2004iepw44" # Unique ID of the filter, typically
# "GENERATOR:Meaningful_ID"
configuration_default: "10x"
configurations:
"1x": {gain: {value : 1, frequency : 10.}}
"5x": {gain: {value : 5, frequency : 10.}}
"10x": {gain: {value : 10, frequency : 10.}}
"20x": {gain: {value : 20, frequency : 10.}}
# END OPTIONAL stage_base elements
# BEGIN OPTIONAL top-level elements
notes:
- ""
# END OPTIONAL top-level elements