ADConversion
Description
Analog-to-Digital conversion stage. Allows the user to specify the voltage and
digital unit limits, calculates output gain, which obsinfo will compare
with the specificied gain.
Python class:
ADConversion
YAML / JSON label:
ADCONVERSION
Corresponding StationXML structure
Coefficients (with no coefficients except one numerator equal to one)
Object Hierarchy
Superclass
Subclasses
None
Relationships
Is nested in Stage
Attributes
Name |
Type |
Required |
Default |
Equivalent StationXML |
Remarks |
delay.samples |
number |
N |
0 |
None |
|
v_minus |
number |
Y |
None |
None |
minimum voltage input |
counts_minus |
integer or hexadecimal string |
Y |
None |
None |
output counts at minimum voltage input |
v_plus |
number |
Y |
None |
None |
maximum voltage input |
counts_plus |
integer or hexadecimal string |
Y |
None |
None |
output counts at maximum voltage input |
counts_dtype |
string |
Y |
None |
None |
the dtype for counts. Can be ‘int16’, ‘int24’, ‘int32’, ‘uint16’, ‘unit24’ or ‘unit32’. Critical for interpreting hexadecimal strings (‘intXX’ values are interpreted as two’s complement) |
JSON schema
https://www.gitlab.com/resif/smm/obsinfo/-/tree/master/obsinfo/data/schemas/filter.schema.json
Example
_templates/AD_Conversion.filter.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
filter:
type : "ADCONVERSION"
v_minus: -4.5 # minimum data input voltage
v_plus: 4.5 # maximum data input voltage
counts_minus: '0xB00000' # counts corresponding to v_minus. If string,
# should start with '0x', followed by n_bits/4
# hexadecimal characters, where n_bits is the
# numeric part of counts_dtype.
# If counts_type starts with 'uint', this value is
# interpreted as the two's complement
counts_plus: '0x4FFFFF' # counts corresponding to v_plus. If string, see above.
counts_dtype: 'int24' # choices: "int16", "int24", "int32", "int64",
# "uint16", "uint24", "uint32", "uint64"
# Not required if counts_minus and counts_plus
# are decimal numbers
# BEGIN OPTIONAL filter elements
delay.samples: 0 # Samples that the conversion delays the data (0)
# the following elements are used to calculate the stage gain.
# if it is not the same as the stage:gain, obsinfo will tell you what
# both values are
counts_dtype: 'int24' # choices: "int16", "int24", "int32", "int64",
# "uint16", "uint24", "uint32", "uint64"
# END OPTIONAL filter elements
# BEGIN OPTIONAL top-level elements
notes:
- ""
# END OPTIONAL top-level elements