AllenInstitute / AllenSDK

code for reading and processing Allen Institute for Brain Science data
https://allensdk.readthedocs.io/en/latest/
Other
340 stars 150 forks source link

unwarped images in VBN session object stimulus_templates have missing (NaN) pixels #2516

Closed corbennett closed 1 year ago

corbennett commented 2 years ago

Describe the bug The VBN session object stimulus_templates look fine for the warped images, but the unwarped images have NaNs where they shouldn't. Displaying these shows holes in the image that aren't there for the warped templates (and weren't on the display for the animal during experiments).

To Reproduce

cache = VisualBehaviorNeuropixelsProjectCache.from_s3_cache(
            cache_dir=cache_dir)

session_id = 1053941483
session = cache.get_ecephys_session(
            ecephys_session_id=session_id)

image = np.copy(session.stimulus_templates['unwarped']['im034_r'])
plt.imshow(image,cmap='gray')

This will produce the following image: image

The white patches are NaNs in the array. The warped image doesn't have these holes:

image

Expected behavior I expect the unwarped image to look like the pre-warped warped image.

morriscb commented 1 year ago

Already fixed in current release 2.14.1 SDK release.