More complete documentation can be found at here
The package has many dependencies so by far the easiest way to install the package is to download Anaconda 2.7. Thereafter only two additional packages need to be installed. These are:
For windows the former is easily installed from here , the latter from here .
Thereafter simply download the repository and install it by running
pip install .
in the first twoptb directory (i.e. the one containing setup.py).
run convert_to_hdf5.py
Converts all data from .tif and .mat to hdf5 format for further processing. See script
for details of required directory structure.
run motion_register_data.py
Motion registration is based on the efficient subpixel registration routine. The reference image is automatically
selected by generating 100 (?) reference images based on random frames and selecting the sharpest (proxy for sharp-
ness here is np.sum(np.abs(np.grad(reference_image)),axis=(0,1))
This is a GUI that enables manual drawing of ROIs
Using this ROI drawer, ROIs are drawn on individual sessions that are grouped together in the hdf5 file.
If multiple sessions share a common reference, the ROIs are typically be shared across acquisition runs
to do this run
twoptb/ROIs/share_roiinfo.py /path/to/my_hdf5.py
and the ROIs will be copied across acquitions. Importantly, only one session can serve as a seed to copy from,
all other WILL BE OVERWRITTEN.
After having drawn ROIs on 'training' datasets, this automatic roi-drawing tool may be used by initially
training an ROI drawer using train_roi_finder.py
Using this ROI drawer, ROIs are drawn on individual sessions that are grouped together in the hdf5 file.
If multiple sessions share a common reference, the ROIs are typically be shared across acquisition runs
to do this run
python twoptb/ROIs/share_roiinfo.py /path/to/my_hdf5.py
and the ROIs will be copied across acquitions. Importantly, only one session can serve as a seed to copy from,
all other WILL BE OVERWRITTEN.
In this part of the pipeline we will extract traces, run neuropil correction, spike inference (c2s) etc
To run this, simply run
python twoptb/ROIs/extract_roi_traces.py /path/to/my_hdf5.py