You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm guessing there was a missed test case when the ability to add tables to the stimulus was enabled? I successfully created such files but upon reading them back through PyNWB for demonstration purposes, the stimulus group in the file read back does not find anything besides the classic TimeSeries descendants
Also confirmed the HDF5 file contained the desired objects
Steps to Reproduce
importdandiimporth5pyimportremfileimportwarningsdefread_dandi_file(asset: RemoteAsset) ->pynwb.NWBFile:
"""Remotely load the NWB file from a DANDI asset object."""# Harmless warnings from PyNWBwarnings.filterwarnings(action="ignore", message="No cached namespaces found in .*")
warnings.filterwarnings(action="ignore", message="Ignoring cached namespace .*")
s3_url=asset.get_content_url()
byte_stream=remfile.File(url=s3_url)
file=h5py.File(name=byte_stream)
io=pynwb.NWBHDF5IO(file=file, mode="r", load_namespaces=True)
nwbfile=io.read()
returnnwbfiledefread_visual_coding_ophys_file(dandiset: RemoteDandiset, session_id: str) ->pynwb.NWBFile:
"""Load the NWB file from DANDI given only the unique session ID in the Visual Coding - Optical Physiology dataset."""asset=next(assetforassetindandiset.get_assets() iff"ses-{session_id}"inasset.path)
returnread_dandi_file(asset=asset)
dandiset_id="000728"client=DandiAPIClient()
dandiset=client.get_dandiset(dandiset_id=dandiset_id)
session_id_with_drifting_gratings="501940850"nwbfile_with_drifting_gratings=read_visual_coding_ophys_file(dandiset=dandiset, session_id=session_id_with_drifting_gratings)
list(nwbfile_with_drifting_gratings.stimulus.keys())
> ['natural_movie_one_stimulus', 'natural_movie_three_stimulus']
# but...list(nwbfile_with_drifting_gratings._AbstractContainer__read_io._HDF5IO__file["stimulus"]["presentation"].keys())
> ['drifting_gratings', 'natural_movie_one_stimulus', 'natural_movie_three_stimulus', 'spontaneous_stimulus']
What happened?
I'm guessing there was a missed test case when the ability to add tables to the
stimulus
was enabled? I successfully created such files but upon reading them back through PyNWB for demonstration purposes, thestimulus
group in the file read back does not find anything besides the classicTimeSeries
descendantsAlso confirmed the HDF5 file contained the desired objects
Steps to Reproduce
Traceback
No response
Operating System
Windows
Python Executable
Conda
Python Version
3.11
Package Versions
PyNWB==2.6.0
Code of Conduct
The text was updated successfully, but these errors were encountered: