euroargodev / euroargodev/sensor_metadata_json

Naming of structures that group sensors and parameters

Open
#13 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
5
Forks
3
PR merge metrics
No merged PRs in 30d

Description

@jean-michel raised the following question

the argo variables dimension on N_SENSOR, eg
SENSOR
SENSOR_MAKER

are grouped into a structure SENSORS, eg

"SENSORS": [
{
"SENSOR": "SDN:R25::CTD_PRES",
"SENSOR_MAKER": "SDN:R26::RBR",
"SENSOR_MODEL": "SDN:R27::RBR_PRES_A",
"SENSOR_SERIAL_NO": "205908",
"SENSOR_FIRMWARE_VERSION": " ",
"sensor_vendorinfo": {
"vendor_schema" : "RBR",
"version": "1.0",
"RBR_foo1" : 1,
"RBR_foo2" : "twotwo"
}
},
{
"SENSOR": "SDN:R25::CTD_TEMP",
"SENSOR_MAKER": "SDN:R26::RBR",
"SENSOR_MODEL": "SDN:R27::RBR_ARGO3",
"SENSOR_SERIAL_NO": "205908",
"SENSOR_FIRMWARE_VERSION": " ",
"sensor_vendorinfo": {
"vendor_schema" : "None",
"example": "Vendors can add their own sensor info here; they can add any field they like as a fieldname below sensor_vendorinfo"
}
},

So when this is loaded into matlab, we end up with
js.SENSORS{1}.SENSOR
js.SENSORS{1}.SENSOR_MAKER

and so on.

And similar for
js.PARAMETERS{1}.PARAMETER
js.PARAMETERS{1}.PARAMETER_UNITS

@jean-michel question arises when one instrument, eg a CTD has multiple sensors (CTD_PRES, CTD_TEMP, CTD_CNDC, CTD_PSAL). His suggestion was to call the upper level structure 'INSTRUMENT' instead of 'SENSORS'.

So
js.INSTRUMENT
would have fields for SENSOR, SENSOR_MAKER and so on

This idea has some appeal in a file for a single instrument

But I think it breaks down when multiple instruments/sensors are aggregated for a full float.

The SENSOR array then grows to size 10, 15 or more for a BGC float.
The separate SENSOR entries are no longer so closely tied to their parent instrument.
There is just a collection of SENSORs, eg
CTD_PRES
CTD_TEMP
CTD_CNDC
TRANSISTOR_PH
OPTODE_DOXY
and so on.
All the sensors have the same status in the array, so grouping them under "SENSORS" seems like a good choice to me.

Comments welcome

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.