SilverLabUCL / PySilverLabNWB

Python tools for working with Silver Lab data in the NWB2 format
MIT License
1 stars 0 forks source link

Metadata editor treats wavelengths as strings #42

Open ageorgou opened 4 years ago

ageorgou commented 4 years ago

The metadata editor writes out emission and excitation wavelength values as text (e.g. '300') rather than floats (300.0).

This is because metadata.yaml lists NaN as the default value for the wavelengths. When the file is loaded, these values are read as strings. Instead, NaN should be represented as .nan in YAML (.NaN also seems to work with pyyaml). The downside is that the editor then displays this as -NaN! If this is confusing, the default value could be changed to 0.0.

(I think this became an issue in the transition to NWB2, when the type for wavelength changed from string to float, and metadata.yaml was updated accordingly)