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

Nwb integration #28

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open

Nwb integration #28

wants to merge 35 commits into from

Conversation

mhturner
Copy link
Member

@mhturner mhturner commented Jun 4, 2024

Adds the option of saving .nwb file formats instead of the old visprotocol-based .hdf5 files. A major change in organization is that now each epoch run is associated with a separate .nwb file, instead of a single .hdf5 file holding all of the subjects and epoch runs for that day's experiment. This is required by .nwb format specifications. This necessitated big changes in the GUI that I couldn't figure out how to smoothly switch between, so there are two different GUI versions.

The way to switch to .nwb is to use the NWBData class in data_nwb, e.g. in your lab-pack data.py module you can add:

class Data(data_nwb.NWBData):
    def __init__(self, cfg):
        super().__init__(cfg)  # call the parent class init method

assuming your config file looks like this:

module_paths:  # relative to the labpack directory specified in stimpack.experiment's path_to_labpack.txt
  data: labpack/data.py  # module for data class. Class name should be "Data"

Then run the nwb-specific GUI with:
python gui_nwb.py

I tested these two ways of running stimpack and both seem to be working OK, but I would recommend testing thoroughly before deploying in your own labs, where people are still using the old file format. We have switched exclusively to .nwb in my lab.

h-mayorquin and others added 21 commits November 14, 2023 17:39
commented out lines 582 and 583 in the gui.py TEMPORARILY to fix fxn calls for new directory swapping parent dir to normal dir and then subjects/ flies to NWB HDF5 files
…eed to fix loading, changing series, data tree, etc etc
…hen can append to it within thread. Not sure why, but this is how OG stimpack works. Still segfaults on GUI close and need to fix or ditch attribute tree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants