Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing change detection sessions #159

Open
Tracked by #160
ThalionA opened this issue Feb 23, 2023 · 6 comments
Open
Tracked by #160

Accessing change detection sessions #159

ThalionA opened this issue Feb 23, 2023 · 6 comments
Labels

Comments

@ThalionA
Copy link

Hi,

I've been trying to access the behavioural sessions with the change detection task. I can filter for those sessions by "OPHYS", but I can't actually access the session data. The problem seems to be that the code only expects to find an h5 file, whereas the new behavioural sessions only contain nwb files. Is there a way to get around this?

@vijayiyer05
Copy link
Collaborator

Thank you for bringing this matter forward.

During the run-up to the recent v0.9.3 release, I did notice that the ophys sessions only seemed to have one of the two types of linked files that have been coded at some point.

As I'm taking a look now at a session in the current OphysQuickstart example, it seems to be using NWB files and not H5 files.

Sanity check: are you using the (just-released) v0.9.3?

@ThalionA
Copy link
Author

ThalionA commented Feb 24, 2023

I was actually trying with the current version, but I also tried with the previous one. I think the problem might be specifically with the newer OPHYS_(1-6)images(A/B) sessions that contain the change detection task data, because it does seem to work with the "three_session" sessions..
I get the following error:
`Error using assert
Expected to find exactly one H5 file

Error in bot.item.concrete.OphysSession (line 1244)
assert(isscalar(h5Idx),"Expected to find exactly one H5 file ");

Error in bot.getSessions (line 61)
sessionObj = bot.item.concrete.OphysSession(sessionIDSpec);`

I have managed to get around this and just download the nwb files with the quick hack:

try
                    assert(isscalar(h5Idx),"Expected to find exactly one H5 file ");
                    obj.insertLinkedFileInfo("SessH5",obj.info.well_known_files(h5Idx));
                    
                    obj.initLinkedFiles();
                    
                    obj.experiment = bot.experiment(obj.info.experiment_container_id);
                    obj.cells = obj.experiment.cells;
                catch
                    obj.insertLinkedFileInfo("SessH5",obj.info.well_known_files(1));
                    obj.initLinkedFiles();
                    obj.experiment = bot.experiment(obj.info.experiment_container_id);
                    obj.cells = obj.experiment.cells;
                    return
                end

in OphysSession line 1239, but I'm not sure yet whether this will allow me to access the actual data once the download is done..

@vijayiyer05
Copy link
Collaborator

vijayiyer05 commented Feb 24, 2023

Thank you @ThalionA for this detailed info about code changes which at least partially address the issue.

@vijayiyer05
Copy link
Collaborator

vijayiyer05 commented Feb 24, 2023

One question @ThalionA, does change detection task imply you are working with or seeking to work with the Visual Behavior datasets?

The reason I ask: I only see a reference to the change detection task for the Visual Behavior datasets HERE.

Currently the Brain Observatory Toolbox only supports the Visual Coding datasets, not yet the Visual Behavior datasets.

@ThalionA
Copy link
Author

Thanks for your answer @vijayiyer05. Indeed, I was trying to access the Visual Behavior dataset, so I guess that explains it. I guess I'll try to use python to access the data in the meantime. Thanks for your work on this toolbox!

@vijayiyer05
Copy link
Collaborator

Thank you @ThalionA for confirming.

From this end, it's good to have a user request for the Visual Behavior datasets & your workaround above suggests it may be a step closer than previously presumed. I've created issue #160 & marked it as a stretch goal for v0.9.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants