我正在分析来自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)"
对此有任何帮助表示赞赏。
答案 0 :(得分:0)
这很奇怪。您能否提供用于创建expData
的其余代码?我可以查看NWB文件是否有问题。您也可以尝试删除NWB文件并在文件出现问题时重新下载(例如未完成下载)。
更新:忽略之前的回复 - 我误解了您的问题。
问题是我们目前没有提供静态光栅和漂移光栅刺激的模板。当我们呈现刺激时,这些刺激是通过心理学程序产生的。参见:
https://github.com/AllenInstitute/AllenSDK/issues/24
我们目前正在努力将这些方法合并到AllenSDK中,以便人们可以自己生成它们。 NWB文件中提供了自然电影,自然场景和局部稀疏噪声模板。