Skip to main content

HyperCTui User Interface to run svmbir code with AI

Project description

pre-commit.ci status [codecov]

HyperCTui

A user interface to run supervised machine learning-based iterative reconstruction (SVMBIR) code with AI assistance for CT image reconstruction and analysis.

Quick Start

Installation

Using Pip

pip install hyperctui

The package requires tomopy to function, which can be installed either with conda or directly from source Github. Make sure you install tomopy before running the application if installed with pip.

Using Pixi (Recommended)

# Install pixi if you don't have it already
curl -fsSL https://pixi.sh/install.sh | bash

# Create a new environment with hyperctui
pixi init --name my-hyperctui-project
cd my-hyperctui-project
pixi add hyperctui

# Start the application
pixi run hyperctui

Using Conda

conda install -c neutronimaging hyperctui

Development Guide

Setting Up Development Environment

# Clone the repository
git clone https://github.com/ornlneutronimaging/HyperCTui.git
cd HyperCTui

# Set up development environment with pixi
pixi install

# Start the application
pixi run hyperctui

# Activate the environment
pixi shell

Development Workflow

# Run tests
pixi run test

# Run linting checks
pixi run ruff check .

# Format code
pixi run ruff format .

# Build the package
pixi run build-pypi

# Build documentation
pixi run build-docs

Adding Dependencies

To add new dependencies:

  1. Add Python dependencies to [project.dependencies] in pyproject.toml, or use pixi add --pypi <package-name>.

    • For example, to add numpy, run:

      pixi add --pypi numpy
      
  2. Add pixi/conda dependencies to [tool.pixi.dependencies] in pyproject.toml, or use pixi add <package-name>.

    • For example, to add scipy, run:

      pixi add scipy
      
  3. Run pixi install to update your environment.

Contribution Guidelines

For Neutron Data Project Developers at ORNL

  • Contact the project maintainer for developer access to the repository
  • Always create feature branches based off the next branch
  • All tests must pass before merging your changes
  • Submit a pull request for review, linking any related issues

For External Developers

  • Please fork the repository and make your suggested edits there
  • Submit a pull request from your fork to our next branch
  • Ensure all tests pass before submitting your PR

Coding Style

  • Run pixi run pre-commit install at least once in your checkout repository to ensure pre-commit hooks are installed locally
  • These hooks will automatically check and fix many common style issues
  • We follow PEP 8 guidelines with certain exceptions defined in our configuration files

Type Hinting and Documentation

  • We prefer using type hinting for all function parameters and return values:

    def process_image(image_data: np.ndarray, factor: float = 1.0) -> np.ndarray:
        """Process the given image data.
    
        Parameters
        ----------
        image_data : np.ndarray
            The input image as a numpy array
        factor : float, optional
            Scaling factor to apply, by default 1.0
    
        Returns
        -------
        np.ndarray
            The processed image
        """
    
  • Use NumPy style docstrings for all public methods and functions

Testing

  • New features should have corresponding unit tests
  • We do not force Test-Driven Development (TDD), but we highly recommend it
  • Aim for high test coverage, especially for critical functionality
  • Tests are automatically run on PR submission

How to Use

The application can be started with hyperctui in the Python environment it is installed, for development environment managed by pixi, use:

pixi run hyperctui

Known Issues

  1. When using pixi install for the first time, you might see the following error messages. The solution is to increase your file limit with ulimit -n 65535 and then run pixi install again.
Too many open files (os error 24) at path

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperctui-0.2.1.tar.gz (749.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperctui-0.2.1-py3-none-any.whl (780.8 kB view details)

Uploaded Python 3

File details

Details for the file hyperctui-0.2.1.tar.gz.

File metadata

  • Download URL: hyperctui-0.2.1.tar.gz
  • Upload date:
  • Size: 749.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for hyperctui-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0f21d2ca68c4f7b0f2317cc47f5fbffea73c48f16058fd617266519a470e94bd
MD5 b7c18208a3f28466f1e4cae5028effc8
BLAKE2b-256 22a85fc41c0392dc99952af738d0ad1427024aca406c148926dea754cf151347

See more details on using hashes here.

File details

Details for the file hyperctui-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: hyperctui-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 780.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for hyperctui-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 64b88a5cfd3fb2e014346d36ff8f85892198d2eea73b291d75136873ce60879a
MD5 3913dceb7e6454001f521e64f86b12de
BLAKE2b-256 4a3dd6f77efee884ea801fa1ab296b6744e45465c0aab4a90d70a37d9c76288c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page