Closed kobbejager closed 7 years ago
Units are saved separately for each dataset in a json data file. If supplied in the CSV metadata upload, they are verified (against axis names and altnames) and (if found) corrected. If the names are not found, or if they are not supplied in the CSV upload, the default axes will be chosen (first listed in datatypes.json)
No attempt is taken to get units from the uploaded data files (not extracted from e.g. spc or jcamp-dx files). Maybe later?
Currently axis names and units are defined on a technique-based manner in a system-wide, dedicated json configuration file (specformat.json). Axis names and units are not stored in the json data files, but its "type" metadata refers to the axis information in specformat.json. This is not ideal. If FTIR data is stored in absorbance values, it should not be possible to change the axis name into transmittance system-wide (without conversion). Also data files are supposed to be fully self-explaining for long-term archival purposes.
[x] specformat.json: rename file (not only spectra) into datatypes.json?
[x] module_import: lookup data type; if it exists in the configuration files, also check axis names/units. If axis names/units don't exist, it is probably safe to store the standard axis names/units for a given technique?
[x] DyGraph viewer: get the axis names/units from data files instead of general configuration files