/Custom-Multiphoton-Patterning

Convert image- or vector-based ''masks'' into command files that control 2-photon imaging software .

Primary LanguageJupyter Notebook

Custom Multi-photon Patterning

This codebase is design to take image- or vector-based ''masks'' and convert them into mask files that can be imported into 2-photon imaging software (PrairieView by Bruker) and direct the microscope system to selectively "expose" regions of a sample to laser power according to the mask.

Getting Started

The easiest way to start will be to download this code, and use Anaconda to setup a python environment. Then use a jupyter notebook to load and run the conversion code. You can do this via the following steps:

  1. Download a release or clone this repository into a folder (e.g. .../cmp/) on your computer.

    • Download the latest release here.
    • Note: If you clone this repository, you will need to import the submodules via the following commands:
      git submodule init
      git submodule update
  2. Download and install Anaconda (individual edition) if you do not already have it

  3. From the anaconda prompt cd to this repository directory, then run one the following commands.

    conda env create --prefix ./env --file env.yml 

    If issues occur with the first method here you can try generating the enviornment from the explicit package list:

    conda env create --prefix ./env --file .env-explicit.txt
  4. Activate the anaconda enviornment by the following command

    conda activate ./env
  5. Open a jupyter notebook by entering the following command

    jupyter lab getting_started.ipynb
  6. Once in the jupyter notebook run and edit the cells to see how to use the mask generation codebase.

Todo

  • Add more examples of using parameters.
  • Add documentation to classes and functions.
  • Handling additional edge cases.

Done

  • Create example jupyter notebook.