我正在使用 static_gratings 刺激分析来自实验的数据。SDK 文档说 get_stimulus_template 函数可以将查询实验中使用的任何刺激作为参数。我在实验中调用了 list_stimuli() 以确认 static_gratings 是使用过的刺激。
当我运行 get_stimulus_template('static_gratings') 时,我得到这个回溯/错误:
Traceback (most recent call last):
File "<ipython-input-46-be84d6ea7546>", line 1, in <module>
sg_scenes = expData.get_stimulus_template('static_gratings')
File "/Users/randallellis/anaconda/lib/python2.7/site-packages/allensdk/core/brain_observatory_nwb_data_set.py", line 373, in get_stimulus_template
image_stack = f['stimulus']['templates'][stim_name]['data'].value
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2846)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2804)
File "/Users/randallellis/anaconda/lib/python2.7/site-packages/h5py/_hl/group.py", line 169, in __getitem__
oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2846)
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/_objects.c:2804)
File "h5py/h5o.pyx", line 190, in h5py.h5o.open (/Users/ilan/minonda/conda-bld/h5py_1490025880382/work/h5py/h5o.c:3740)
KeyError: "Unable to open object (Object 'static_gratings_image_stack' doesn't exist)"
对此的任何帮助表示赞赏。