channelintensities


Namechannelintensities JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryPackage for analyzing microscopy data of channels. Outputs intensities averaged over the width of the channel.
upload_time2024-12-13 01:26:00
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords microscopy intensities diffusion
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Measuring the Intensity of Fluorescence Signal in Microfluidic Setup 

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.

## Features

1. **Channel Alignment and Preprocessing**  
   - Rotate the image so the main channel is at the bottom.
   - Cut unwanted frames to focus on the relevant data.

2. **GUI-Based Region Definition**  
   - Use an interactive GUI to define bounding boxes (bbox) for each channel.

3. **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)*

4. **Data Storage**  
   - Results are saved in a structured table for further analysis.

5. **Visualization and Analysis**  
   - Predefined plots for visualizing results.
   - Out-of-the-box fitting for diffusion coefficient (D).

## Installation Guide

### 1. **Installing Python**
   
#### **For Windows**
1. Download the latest Python installer from the [official Python website](https://www.python.org/).
2. Run the installer and make sure to check the option **"Add Python to PATH"** during the installation process.
3. Verify the installation by running the following command in the Command Prompt:
   ```bash
   python --version
   ```
   
#### **For macOS**
1. Install Python using **Homebrew** (recommended). First, install Homebrew if you haven't already:
   ```bash
   /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
   ```
2. Install Python:
   ```bash
   brew install python
   ```
3. Verify the installation:
   ```bash
   python3 --version
   ```

#### **For Linux**
1. Use your package manager to install Python (if not already installed). For example:
   ```bash
   sudo apt update
   sudo apt install python3 python3-pip
   ```
2. Verify the installation:
   ```bash
   python3 --version
   ```

---

### 2. **Creating a Virtual Environment**

1. Open a terminal (Command Prompt, PowerShell, or your OS-specific terminal).
2. Navigate to your project folder:
   ```bash
   cd /path/to/your/project
   ```
3. Create a virtual environment:
   ```bash
   python -m venv <your_venv_name>
   ```
   This will create a folder named `your_venv_name` in your project directory containing the isolated environment.

   Replace <your_venv_name> with the deisred name, for example:

   ```bash
   python -m venv venv
   ```
4. Activate the virtual environment:
   - **Windows**:
     ```bash
     <your_venv_name>\Scripts\activate
     ```
   - **macOS/Linux**:
     ```bash
     source <your_venv_name>/bin/activate
     ```

5. 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:
     ```bash
     python --version
     ```

---

### 3. **Installing the Toolkit**

With the virtual environment active, install the `channelintensities` toolkit from PyPI:

```bash
pip install channelintensities
```

---

### 4. **Installing Additional Dependencies**

If you encounter missing dependencies or want to install optional packages for development, use the `requirements.txt` file if provided:

```bash
pip install -r requirements.txt
```

---

### 5. **Deactivating the Virtual Environment**

When you're done, deactivate the virtual environment to return to your system Python:

```bash
deactivate
```

---

By following these steps, you ensure that your project dependencies are managed cleanly and do not interfere with other Python projects on your system. 

## Workflow Instructions
### Starting the programme
- activate your venv
- simply type
```bash
channelintensities
```
### 0. Select steps from the main menu
- steps can be skipped, and every step which produces output is saved, so feel free to try out different things

### 1. Load Data
- 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

### 2. Rotate the Main Channel
- Rotate the image so that the primary channel is at the bottom using the GUI elements provided.

### 3. Trim Frames
- Use the GUI to select and remove unwanted frames from the dataset.

### 4. Define Bounding Boxes
- Open the GUI to manually define bounding boxes (bbox) for each channel. This step allows for precise region targeting.

### 5. Generate Weight Maps
- The toolkit automatically generates equidistant lines within each defined bbox.  
- **How It Works**: 
  - Each line is spaced equidistantly within the bbox.  
  - The value assigned to each pixel corresponds to the traversal length of its associated line. (see pictures below)
![Weight map exam](https://github.com/Teranis/channelintensities/blob/011662aa5e312d5bd46486b3b614adc40b65501a/imgs/image.svg)
![Weight map exam](https://github.com/Teranis/channelintensities/blob/011662aa5e312d5bd46486b3b614adc40b65501a/imgs/image2.svg)


### 6. Save Results
- Results are saved in a tabular format for further analysis and reproducibility.

### 7. Visualization and Analysis
- Visualize results using predefined plot templates.
- Fit diffusion coefficients (D) directly using the integrated fitting tools.
![example plot](https://github.com/Teranis/channelintensities/blob/cee94c5464c6590303a13e8711a69f987bcb6598/imgs/exampleplot.jpg)

## Tips for Saving Plots

When saving plots, always use the **matplotlib GUI** elements for consistent file management and output quality.

## Contribution

Feel free to contribute to this project by submitting pull requests or reporting issues. For questions, contact the repository maintainer.

---

Happy analyzing! 🎉

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "channelintensities",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "microscopy, intensities, diffusion",
    "author": null,
    "author_email": "Timon Stegmaier <timon@rapid-systems.de>",
    "download_url": "https://files.pythonhosted.org/packages/6d/8a/0813bfe3a49b1c981e955504f7d8d1cd8b71fb96e75575627ae72d02fc4f/channelintensities-1.0.0.tar.gz",
    "platform": null,
    "description": "# Measuring the Intensity of Fluorescence Signal in Microfluidic Setup \r\n\r\nThis 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.\r\n\r\n## Features\r\n\r\n1. **Channel Alignment and Preprocessing**  \r\n   - Rotate the image so the main channel is at the bottom.\r\n   - Cut unwanted frames to focus on the relevant data.\r\n\r\n2. **GUI-Based Region Definition**  \r\n   - Use an interactive GUI to define bounding boxes (bbox) for each channel.\r\n\r\n3. **Weight Map Calculation**  \r\n   - Generate equidistant lines throughout the bbox. \r\n   - Each pixel is assigned a value based on the length of its line of traversal within the bbox.  \r\n   *(See illustration below)*\r\n\r\n4. **Data Storage**  \r\n   - Results are saved in a structured table for further analysis.\r\n\r\n5. **Visualization and Analysis**  \r\n   - Predefined plots for visualizing results.\r\n   - Out-of-the-box fitting for diffusion coefficient (D).\r\n\r\n## Installation Guide\r\n\r\n### 1. **Installing Python**\r\n   \r\n#### **For Windows**\r\n1. Download the latest Python installer from the [official Python website](https://www.python.org/).\r\n2. Run the installer and make sure to check the option **\"Add Python to PATH\"** during the installation process.\r\n3. Verify the installation by running the following command in the Command Prompt:\r\n   ```bash\r\n   python --version\r\n   ```\r\n   \r\n#### **For macOS**\r\n1. Install Python using **Homebrew** (recommended). First, install Homebrew if you haven't already:\r\n   ```bash\r\n   /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\r\n   ```\r\n2. Install Python:\r\n   ```bash\r\n   brew install python\r\n   ```\r\n3. Verify the installation:\r\n   ```bash\r\n   python3 --version\r\n   ```\r\n\r\n#### **For Linux**\r\n1. Use your package manager to install Python (if not already installed). For example:\r\n   ```bash\r\n   sudo apt update\r\n   sudo apt install python3 python3-pip\r\n   ```\r\n2. Verify the installation:\r\n   ```bash\r\n   python3 --version\r\n   ```\r\n\r\n---\r\n\r\n### 2. **Creating a Virtual Environment**\r\n\r\n1. Open a terminal (Command Prompt, PowerShell, or your OS-specific terminal).\r\n2. Navigate to your project folder:\r\n   ```bash\r\n   cd /path/to/your/project\r\n   ```\r\n3. Create a virtual environment:\r\n   ```bash\r\n   python -m venv <your_venv_name>\r\n   ```\r\n   This will create a folder named `your_venv_name` in your project directory containing the isolated environment.\r\n\r\n   Replace <your_venv_name> with the deisred name, for example:\r\n\r\n   ```bash\r\n   python -m venv venv\r\n   ```\r\n4. Activate the virtual environment:\r\n   - **Windows**:\r\n     ```bash\r\n     <your_venv_name>\\Scripts\\activate\r\n     ```\r\n   - **macOS/Linux**:\r\n     ```bash\r\n     source <your_venv_name>/bin/activate\r\n     ```\r\n\r\n5. Verify that the virtual environment is active:\r\n   - Your terminal prompt should now show `<your_venv_name>` at the beginning.\r\n   - Check the Python version in the environment:\r\n     ```bash\r\n     python --version\r\n     ```\r\n\r\n---\r\n\r\n### 3. **Installing the Toolkit**\r\n\r\nWith the virtual environment active, install the `channelintensities` toolkit from PyPI:\r\n\r\n```bash\r\npip install channelintensities\r\n```\r\n\r\n---\r\n\r\n### 4. **Installing Additional Dependencies**\r\n\r\nIf you encounter missing dependencies or want to install optional packages for development, use the `requirements.txt` file if provided:\r\n\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n---\r\n\r\n### 5. **Deactivating the Virtual Environment**\r\n\r\nWhen you're done, deactivate the virtual environment to return to your system Python:\r\n\r\n```bash\r\ndeactivate\r\n```\r\n\r\n---\r\n\r\nBy following these steps, you ensure that your project dependencies are managed cleanly and do not interfere with other Python projects on your system. \r\n\r\n## Workflow Instructions\r\n### Starting the programme\r\n- activate your venv\r\n- simply type\r\n```bash\r\nchannelintensities\r\n```\r\n### 0. Select steps from the main menu\r\n- steps can be skipped, and every step which produces output is saved, so feel free to try out different things\r\n\r\n### 1. Load Data\r\n- 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\r\n\r\n### 2. Rotate the Main Channel\r\n- Rotate the image so that the primary channel is at the bottom using the GUI elements provided.\r\n\r\n### 3. Trim Frames\r\n- Use the GUI to select and remove unwanted frames from the dataset.\r\n\r\n### 4. Define Bounding Boxes\r\n- Open the GUI to manually define bounding boxes (bbox) for each channel. This step allows for precise region targeting.\r\n\r\n### 5. Generate Weight Maps\r\n- The toolkit automatically generates equidistant lines within each defined bbox.  \r\n- **How It Works**: \r\n  - Each line is spaced equidistantly within the bbox.  \r\n  - The value assigned to each pixel corresponds to the traversal length of its associated line. (see pictures below)\r\n![Weight map exam](https://github.com/Teranis/channelintensities/blob/011662aa5e312d5bd46486b3b614adc40b65501a/imgs/image.svg)\r\n![Weight map exam](https://github.com/Teranis/channelintensities/blob/011662aa5e312d5bd46486b3b614adc40b65501a/imgs/image2.svg)\r\n\r\n\r\n### 6. Save Results\r\n- Results are saved in a tabular format for further analysis and reproducibility.\r\n\r\n### 7. Visualization and Analysis\r\n- Visualize results using predefined plot templates.\r\n- Fit diffusion coefficients (D) directly using the integrated fitting tools.\r\n![example plot](https://github.com/Teranis/channelintensities/blob/cee94c5464c6590303a13e8711a69f987bcb6598/imgs/exampleplot.jpg)\r\n\r\n## Tips for Saving Plots\r\n\r\nWhen saving plots, always use the **matplotlib GUI** elements for consistent file management and output quality.\r\n\r\n## Contribution\r\n\r\nFeel free to contribute to this project by submitting pull requests or reporting issues. For questions, contact the repository maintainer.\r\n\r\n---\r\n\r\nHappy analyzing! \ud83c\udf89\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Package for analyzing microscopy data of channels. Outputs intensities averaged over the width of the channel.",
    "version": "1.0.0",
    "project_urls": {
        "Source": "https://github.com/Teranis/channelintensities",
        "Tracker": "https://github.com/Teranis/channelintensities/issues",
        "homepage": "https://github.com/Teranis/channelintensities"
    },
    "split_keywords": [
        "microscopy",
        " intensities",
        " diffusion"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7ce00f88026376c7077c2deb2c63c5471bc53a54bcd2a3a6e359f34af948d42",
                "md5": "417c74a7bc5de6c97f0749da30c0c961",
                "sha256": "1852cde681c1a3a37dbd264ee899a66e5ff9d8084c2e1a0ccf8e710d9524f618"
            },
            "downloads": -1,
            "filename": "channelintensities-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "417c74a7bc5de6c97f0749da30c0c961",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 26893,
            "upload_time": "2024-12-13T01:25:57",
            "upload_time_iso_8601": "2024-12-13T01:25:57.660009Z",
            "url": "https://files.pythonhosted.org/packages/f7/ce/00f88026376c7077c2deb2c63c5471bc53a54bcd2a3a6e359f34af948d42/channelintensities-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d8a0813bfe3a49b1c981e955504f7d8d1cd8b71fb96e75575627ae72d02fc4f",
                "md5": "2f9d96c2aba0e3f225a575f50f99a702",
                "sha256": "13eab6ea3f8852c667a29970c8593f5adf69cb9bdcb6ce157eb6a8eee6102e62"
            },
            "downloads": -1,
            "filename": "channelintensities-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2f9d96c2aba0e3f225a575f50f99a702",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27430,
            "upload_time": "2024-12-13T01:26:00",
            "upload_time_iso_8601": "2024-12-13T01:26:00.412621Z",
            "url": "https://files.pythonhosted.org/packages/6d/8a/0813bfe3a49b1c981e955504f7d8d1cd8b71fb96e75575627ae72d02fc4f/channelintensities-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-13 01:26:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Teranis",
    "github_project": "channelintensities",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "channelintensities"
}
        
Elapsed time: 1.32131s