Analyze with ipynb

Given a folder with .h5 files, use this feature to analyze data quickly. It provides convenient loading functions and an overview Jupyter notebook.

New in ScopeFoundry 2.0

This feature works best with Jupyter Notebook installed. We recommend the following steps:

  1. Install Visual Studio Code.
  2. Install the following extensions:
    1. Pylance (Microsoft)
    2. Jupyter (Microsoft)

Trigger Feature

There are two ways to start this feature:

In the app

Navigate to Advanced -> Analyze with ipynb. The folder acted upon is the one defined in the app/save_dir settings (bottom left panel).

Screenshot 2025-01-12 at 17.45.20

Without the app

Using ScopeFoundry tools (install instructions here), navigate to your "to/your_folder_with_data" and if necessary activate scopefoundry

Then run the following command:

python -m ScopeFoundry.tools

Click the button on the Welcome tab to proceed.

or with 2.1

python -m ScopeFoundry ipynb

Result

This feature generates the following:

  1. An h5_data_loaders.py file containing convenience methods based on the contents of the .h5 files.
  2. An overview.ipynb file where you can start your analysis.

analyze_with_ipynb

In the notebook, the top two cells are generated:

  • Cell 1: Imports the data loaders.
  • Cell 2: Lists paths to each .h5 file and demonstrates how they can be loaded.

Re-triggering

After adding more datafiles to the folder, it is generally safe to re-trigger this feature to update cell 2 and add more loaders. However, the following caveats apply:

  • Cell 1 will be overwritten: All changes will be lost.
  • Content of Cell 2 will never be deleted. Lines that do not already exist fuzzily will be added. For example, a line that has been commented will not be added again.
  • Cell 3 and onwards are not altered.