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

clean up metadata and user interface #105

Closed jihyunbak closed 3 years ago

jihyunbak commented 3 years ago

Description and related issues

Close #71 Close #94 (this TIMIT test block is now detected as a bad block, and stopped before stim processing) Close #100 (temporary solution - for now adding as scratch data) Close #101 Close #103

Checklist:

jthermiz commented 3 years ago

@jihyunbak I get the below error when trying to run this branch. I don't get this error with main the branch.

Command

python scripts/generate_nwb.py --save_path /clusterfs/NSDS_data/jhermiz --block_metadata_path /clusterfs/NSDS_data/raw/RVG16/RVG16_B01/RVG16_B01.yaml RVG16_B01

Error

Traceback (most recent call last):
  File "scripts/generate_nwb.py", line 85, in <module>
    write_nwb=write_nwb)
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/convert_block.py", line 43, in convert_block
    use_htk=use_htk)
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/nwb_builder.py", line 82, in __init__
    self.metadata = self._collect_nwb_metadata()
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/nwb_builder.py", line 140, in _collect_nwb_metadata
    return self.metadata_manager.extract_metadata()
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/metadata/metadata_manager.py", line 384, in extract_metadata
    metadata = self._extract(metadata_input)
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/metadata/metadata_manager.py", line 414, in _extract
    self.__load_stimulus_info(value)
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/metadata/metadata_manager.py", line 453, in __load_stimulus_info
    stimulus_metadata.update(read_yaml(stim_yaml_path))
  File "/home/jhermiz/software/nsds_lab_to_nwb/nsds_lab_to_nwb/common/io.py", line 31, in read_yaml
    with open(file_path, 'r') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/home/jhermiz/software/NSDSLab-NWB-metadata/auditory/stimulus/wn2.yaml'
jthermiz commented 3 years ago

Should the sub-directories include a yaml folder?

What this branch expects: auditory/stimulus/wn2.yaml

What my NSDSLab-NWB-metadata path actually looks like: auditory/yaml/stimulus/wn2.yaml

jihyunbak commented 3 years ago

Yeah sorry for the inconvenience, I rearranged the metadata folder in a PR there which is currently open and ready for review (maybe I shouldn’t have changed the existing structure…)

On Sat, Jul 31, 2021 at 13:47 John Hermiz @.***> wrote:

Should the sub-directories include a yaml folder?

What this branch expects: auditory/stimulus/wn2.yaml

What my NSDSLab-NWB-metadata path actually looks like: auditory/yaml/stimulus/wn2.yaml

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BouchardLab/nsds_lab_to_nwb/pull/105#issuecomment-890402336, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJLF3437B3ZHOSZHKBLTU3TT2RONBANCNFSM5BBU2H6Q .

jthermiz commented 3 years ago

Ok checking out the open PR in the metadatafolder resolved it. Thanks! I won't be able to review the other aspects of this PR until next week.