BouchardLab / nsds_lab_to_nwb

Python package to convert NSDS Lab data to NWB files.
https://nsds-lab-to-nwb.readthedocs.io/en/latest/
0 stars 4 forks source link

Add weight #65

Closed jthermiz closed 3 years ago

jthermiz commented 3 years ago

Add weight and 'g' to indicate grams. This works on the tdt pipeline. I have not yet tested with the htk pipeline

jthermiz commented 3 years ago

This addresses #53

jihyunbak commented 3 years ago

@jthermiz Thanks for this! I have one suggestion - it would be nice if all metadata validation/fix happened within MetadataManager, so that all we need to care about in NWBBuilder is to extract using correct metadata keys.

Specifically, I suggest that we modify MetadataManager.__check_subject(). There, check if the weight metadata is a string that ends with 'g' (for now assuming that the unit is always gram), and if not, append 'g' !

jihyunbak commented 3 years ago

Separately, I think eventually we want to do subject=Subject(**self.metadata['subject']), ... when we inject the subject metadata into the NWB content, near L148 of nwb_builder.py.

~To do that we need to fix the key subject id to subject_id in metadata.~ ——> Done in PR #74

jihyunbak commented 3 years ago

PR #74 can replace this, unless there is something else you want to do in this PR @jthermiz

jthermiz commented 3 years ago

That sounds good. I'm closing this PR