LorenFrankLab / rec_to_nwb

Data Migration REC -> NWB 2.0 Service
Other
2 stars 8 forks source link

Video data not filled in #21

Closed acomrie closed 2 years ago

acomrie commented 2 years ago

I have some nwb files that appear to be missing significant video information. These nwb files were created in ~Dec 21/Jan 22 using rec_to_nwb. When I open an example nwb file as nwbf using pynwb, the video-related section looks like so:

video_files pynwb.base.ProcessingModule at 0x140233856552816
Fields:
  data_interfaces: {
    video <class 'pynwb.behavior.BehavioralEvents'>
  }
  description: Contains all associated video files data

@rly please let us know if you have any ideas about what the issue might be in the video file section of rec_to_nwb. Thanks much for any help!


For a bit more context -

As a result of this, there's no video info to access using get_data_interface(), so I can't populate video file information in our DataJoint database system. That is, there are no Fields in video if I run the following: video = get_data_interface(nwbf, 'video', pynwb.behavior.BehavioralEvents)

And, in case useful, an example nwbf overall looks like so:

root pynwb.file.NWBFile at 0x140233856821808
Fields:
  acquisition: {
    e-series <class 'pynwb.ecephys.ElectricalSeries'>
  }
  devices: {
    camera_device 0 <class 'abc.CameraDevice'>,
    camera_device 1 <class 'abc.CameraDevice'>,
    dataacq_device0 <class 'abc.DataAcqDevice'>,
    header_device <class 'abc.HeaderDevice'>,
    probe 0 <class 'abc.Probe'>,
    probe 1 <class 'abc.Probe'>
  }
  electrode_groups: {
    0 <class 'abc.NwbElectrodeGroup'>,
    1 <class 'abc.NwbElectrodeGroup'>,
    10 <class 'abc.NwbElectrodeGroup'>,
    11 <class 'abc.NwbElectrodeGroup'>,
    12 <class 'abc.NwbElectrodeGroup'>,
    13 <class 'abc.NwbElectrodeGroup'>,
    14 <class 'abc.NwbElectrodeGroup'>,
    15 <class 'abc.NwbElectrodeGroup'>,
    16 <class 'abc.NwbElectrodeGroup'>,
    17 <class 'abc.NwbElectrodeGroup'>,
    18 <class 'abc.NwbElectrodeGroup'>,
    19 <class 'abc.NwbElectrodeGroup'>,
    2 <class 'abc.NwbElectrodeGroup'>,
    20 <class 'abc.NwbElectrodeGroup'>,
    21 <class 'abc.NwbElectrodeGroup'>,
    22 <class 'abc.NwbElectrodeGroup'>,
    23 <class 'abc.NwbElectrodeGroup'>,
    24 <class 'abc.NwbElectrodeGroup'>,
    25 <class 'abc.NwbElectrodeGroup'>,
    3 <class 'abc.NwbElectrodeGroup'>,
    4 <class 'abc.NwbElectrodeGroup'>,
    5 <class 'abc.NwbElectrodeGroup'>,
    6 <class 'abc.NwbElectrodeGroup'>,
    7 <class 'abc.NwbElectrodeGroup'>,
    8 <class 'abc.NwbElectrodeGroup'>,
    9 <class 'abc.NwbElectrodeGroup'>
  }
  electrodes: electrodes <class 'hdmf.common.table.DynamicTable'>
  epochs: epochs <class 'pynwb.epoch.TimeIntervals'>
  experiment_description: Memory and value guided decision making
  experimenter: ['Alison Comrie']
  file_create_date: [datetime.datetime(2021, 12, 22, 11, 29, 56, 77853, tzinfo=tzoffset(None, -28800))]
  identifier: 8b3cbede-635d-11ec-8b32-79740f285a96
  institution: University of California, San Francisco
  intervals: {
    epochs <class 'pynwb.epoch.TimeIntervals'>
  }
  lab: Loren Frank
  processing: {
    analog <class 'pynwb.base.ProcessingModule'>,
    associated_files <class 'pynwb.base.ProcessingModule'>,
    behavior <class 'pynwb.base.ProcessingModule'>,
    camera_sample_frame_counts <class 'pynwb.base.ProcessingModule'>,
    sample_count <class 'pynwb.base.ProcessingModule'>,
    tasks <class 'pynwb.base.ProcessingModule'>,
    video_files <class 'pynwb.base.ProcessingModule'>
  }
  session_description: Spatial bandit task (regular)
  session_id: j16_20210706
  session_start_time: 2021-07-06 09:24:39.436000-07:00
  subject: subject pynwb.file.Subject at 0x140233856044768
Fields:
  description: Long Evans Rat
  genotype: Wild Type
  sex: Male
  species: Rat
  subject_id: j16
  weight: 566g

  timestamps_reference_time: 1970-01-01 00:00:00+00:00
edeno commented 2 years ago

This seems to be resolved with the current version but we should implement some sort of validation of nwb files with our specific data.