Imaging: Helper notebooks

This page documents the jupyter notebooks available under /Helper_notebooks.

Introductory notebooks

  • Starting notebook: Boilerplate notebook - starts by loading the schema code and making a connection to the database. This can be re-used for whatever purpose.

  • Starting notebook - follow the tree: Follows the main branches of the schema. This is a good starting point if you haven’t worked with the imaging database before and just want to get a rough overview over what is there.

  • SpatialAnalysis plotting: Shows how to plot results for spatial analyses like path-spike plots, ratemaps, etc.

Notebooks for adding information

In order for downstream processes to run correctly, users have to add information after the basic processing has run through and Session, etc. entries are created.

At the moment this concerns the Session.SessionType and Session.ArenaObject tables for session type (open field, wheel, etc.) and object type and locations in open field sessions respectively.

Object location adding via Napari

More specialized notebooks

  • FOV unwarping: 2p miniscope raw recordings undergo distortions because of uncalibrated scanner responses to command voltages (and are therefore different for every scope vs. setup combination). In order to obtain undistorted cell maps and projections, we can unwarp these (raw) field of views by comparing with a calibration slide. The process of saving a calibration (=affine transformation) matrix into datajoint is shown in this notebook. For a more thorough explanation see Imaging: Field-of-view unwarping

  • DLC add new Model/Processing method: Helper notebook to insert (register) new deep lab cut (DLC) model and associated processing method.

Useful routines

  • Unwarp tif files: Quick and easy way to obtain undistorted tif files and view those with Napari. See Imaging: Field-of-view unwarping

  • Suite2p python reader: Notebook that shows the usage of the suite2p python reader class, which is also used when loading suite2p output into datajoint. It provides convenience functions for rapidly investigating suite2p python exports and plotting results of the imaging analysis.