biomarkersParkinson / tsdf

A package to read, modify and write TSDF data in Python.
https://biomarkersparkinson.github.io/tsdf/
Apache License 2.0
2 stars 0 forks source link

[BUG] iso8601 is a required field #84

Open Erikpostt opened 2 months ago

Erikpostt commented 2 months ago

I don't quite remember why we made the _iso8601 fields obligatory when storing metadata, but perhaps we want to reconsider this as it is not always relevant (perhaps only for longitudinal studies).

Describe the Bug For the publication of the first paper on arm swing, we are using a different dataset which does not have any dates/times attached to it. I would like to store it as tsdf though.

To Reproduce Steps to reproduce the behavior:

  1. Create a metadata variable without the _startiso8601 and _endiso8601 fields
  2. Append the metadata to the list of metafiles: l_metafiles.append(tsdf.write_binary_file(path_output, f"values.bin", data_sensors, metadata_sensor))

image

Expected Behavior The metadata is stored without an iso8601 field.

Actual Behavior TSDFMetadataFieldError: Value for the obligatory TSDF field 'start_iso8601' is missing in the provided TSDF metadata file.

tsdf Version

Environment Details

kretep commented 1 month ago

The _iso8601 fields are obligatory as specified in the TSDF format specification (see https://arxiv.org/abs/2211.11294). So in order to keep the library in-line with the format, I don't think we'll change this. You could perhaps consider using a dummy date.