Bug #2632
closedDecorate SensorSample objects with the names of the data fields
0%
Description
The SensorSample class do not store any information about the name or data types of the values it holds. Furthermore it is advised to use a numpy array of floats as the data field, but its application is not enforced.
As a consequence, the geographic data storage module can not save samples whose collection has not been registered in the CAMS code beforehand, limiting the ability to extend CAMS easily.
Currently a workaround exists with the DataServer._create_collection method to extract the names of SensorSample fields from the variable name if it follows the convention "field1_field2_fieldN". This is only used by horizontal wind samples and fails for other kind of samples, like "energy" from the Energy plugin.
This problem could be solved with the inclusion of a variable holding a list of field names and types. A metaclass could be envisioned to construct new SensorSamples types on the fly.
Updated by Rafael Bailon-Ruiz about 3 years ago
- Status changed from New to Resolved
Updated by Rafael Bailon-Ruiz about 3 years ago
- Status changed from Resolved to Closed