AllenSDK icon indicating copy to clipboard operation
AllenSDK copied to clipboard

static_gratings stimulus

Open alih100011 opened this issue 2 years ago • 3 comments

Hello!

I want to extract the static gratings stimulus that show to the mouse by brain observatory cache. I have extracted natural scene stimulus by : data_set.get_stimulus_template('natural_scenes')

but I don't know it for static_gratings to attain its picture.

Thanks.

alih100011 avatar Sep 01 '22 07:09 alih100011

when I write :

   data_set.get_stimulus_template('static_gratings')

I see this Error :

KeyError Traceback (most recent call last)

in ----> 1 data_set.get_stimulus_template('static_gratings')

2 frames

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

/usr/local/lib/python3.7/dist-packages/h5py/_hl/group.py in getitem(self, name) 286 raise ValueError("Invalid HDF5 object reference") 287 else: --> 288 oid = h5o.open(self.id, self._e(name), lapl=self._lapl) 289 290 otype = h5i.get_type(oid)

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/h5o.pyx in h5py.h5o.open()

KeyError: "Unable to open object (object 'static_gratings_image_stack' doesn't exist)"

alih100011 avatar Sep 03 '22 13:09 alih100011

@alih100011

Can you include more of the script that caused the error? Specifically: which data release are you trying to access?

danielsf avatar Sep 12 '22 15:09 danielsf

There is no stimulus template for the static gratings because the stimulus is generated programmatically, rather than consisting of images. There might be functions in allensdk.brain_observatory.stimulus_info to recreate the static gratings stimulus from the stimulus parameters.

saskiad avatar Aug 04 '23 04:08 saskiad