This repository contains tools for analyzing fluorescence signals in a microfluidic channel. The workflow emphasizes a GUI-based approach for defining the edges of the channels, saving plots, and managing analysis results.
-
Channel Alignment and Preprocessing
- Rotate the image so the main channel is at the bottom.
- Cut unwanted frames to focus on the relevant data.
-
GUI-Based Region Definition
- Use an interactive GUI to define bounding boxes (bbox) for each channel.
-
Weight Map Calculation
- Generate equidistant lines throughout the bbox.
- Each pixel is assigned a value based on the length of its line of traversal within the bbox.
(See illustration below)
-
Data Storage
- Results are saved in a structured table for further analysis.
-
Visualization and Analysis
- Predefined plots for visualizing results.
- Out-of-the-box fitting for diffusion coefficient (D).
- Download the latest Python installer from the official Python website.
- Run the installer and make sure to check the option "Add Python to PATH" during the installation process.
- Verify the installation by running the following command in the Command Prompt:
python --version
- Install Python using Homebrew (recommended). First, install Homebrew if you haven't already:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - Install Python:
brew install python
- Verify the installation:
python3 --version
- Use your package manager to install Python (if not already installed). For example:
sudo apt update sudo apt install python3 python3-pip
- Verify the installation:
python3 --version
-
Open a terminal (Command Prompt, PowerShell, or your OS-specific terminal).
-
Navigate to your project folder:
cd /path/to/your/project -
Create a virtual environment:
python -m venv <your_venv_name>
This will create a folder named
your_venv_namein your project directory containing the isolated environment.Replace <your_venv_name> with the deisred name, for example:
python -m venv venv
-
Activate the virtual environment:
- Windows:
<your_venv_name>\Scripts\activate
- macOS/Linux:
source <your_venv_name>/bin/activate
- Windows:
-
Verify that the virtual environment is active:
- Your terminal prompt should now show
<your_venv_name>at the beginning. - Check the Python version in the environment:
python --version
- Your terminal prompt should now show
With the virtual environment active, install the channelintensities toolkit from PyPI:
pip install channelintensitiesIf you encounter missing dependencies or want to install optional packages for development, use the requirements.txt file if provided:
pip install -r requirements.txtWhen you're done, deactivate the virtual environment to return to your system Python:
deactivateBy following these steps, you ensure that your project dependencies are managed cleanly and do not interfere with other Python projects on your system.
- activate your venv
- simply type
channelintensities- steps can be skipped, and every step which produces output is saved, so feel free to try out different things
- Loading data from TIFF files. 4D, 2x3D (one for each channel), 1x3D (all in one folder with one for each time point), 2x2D (two folders with all imgs for one channel in one folder) is supported
- Rotate the image so that the primary channel is at the bottom using the GUI elements provided.
- Use the GUI to select and remove unwanted frames from the dataset.
- Open the GUI to manually define bounding boxes (bbox) for each channel. This step allows for precise region targeting.
- The toolkit automatically generates equidistant lines within each defined bbox.
- How It Works:
- Results are saved in a tabular format for further analysis and reproducibility.
- Visualize results using predefined plot templates.
- Fit diffusion coefficients (D) directly using the integrated fitting tools.

When saving plots, always use the matplotlib GUI elements for consistent file management and output quality.
Feel free to contribute to this project by submitting pull requests or reporting issues. For questions, contact the repository maintainer.
Happy analyzing! 🎉