Project

General

Profile

Actions

Bug #2632

closed

Decorate SensorSample objects with the names of the data fields

Added by Rafael Bailon-Ruiz about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Start date:
2021-01-27
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

Updated by Rafael Bailon-Ruiz about 3 years ago

  • Status changed from New to Resolved
Actions #2

Updated by Rafael Bailon-Ruiz about 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF