3.2. How to run nanopyx notebooks on google colab - HenriquesLab/NanoPyx GitHub Wiki

NanoPyx Jupyter Notebooks on Google Colab

This tutorial provides step-by-step instructions on how to open and run NanoPyx Jupyter Notebooks directly on Google Colab. The table below contains links to specific notebooks, categorized by different methods and functionalities.

Note: When running these notebooks on Google Colab, be aware that some notebooks may attempt to connect to Google Drive to allow you to load your data from it. Ensure that you are comfortable with the permissions granted before proceeding.

Steps to Run on Google Colab

  1. From the NanoPyx's Github Page, click on the "Open in Colab" badge next to the desired notebook.
  2. The notebook will open in Google Colab in a new tab.
  3. Sign in to your Google account if prompted.
  4. Click on the "Copy to Drive" button to save the notebook to your Google Drive.
  5. Run the notebook cells by clicking the play button next to each cell sequentially and interact with the automatically generated graphical user interface to perform the image analysis.

Note: When running NanoPyx through Jupyter notebooks the output of your analysis will be saved in the same path as your input image, adding a suffix to its filename to identify it as the output. This means that if you connected to google drive and loaded your data from there, the output will also be saved on your google drive.
If you loaded the data directly into google colab you need to save it to your local computer before disconnecting from the notebook as otherwise the output will be lost.

For a more detailed explanation of Google Colab and how it works you can check their official documentation here.

Providing OpenCL support for Google Colab

In some notebooks, if you want to have access to OpenCl implementations you need to run the first cell (marked as optional). Keep in mind that this process can take some time, however if you don't need OpenCL support you can ignore that cell.