Closed jthermiz closed 3 years ago
This addresses #53
@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' !
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
PR #74 can replace this, unless there is something else you want to do in this PR @jthermiz
That sounds good. I'm closing this PR
Add weight and 'g' to indicate grams. This works on the tdt pipeline. I have not yet tested with the htk pipeline