Skip to main content

neutron-geomcorr (Neutron Geometry Correction)

Documentation Status

Formerly known as CylindricalGeometryCorrection, this library performs geometric corrections for neutron transmission imaging of cylindrical samples (both solid and hollow).

Principle

Any homogeneous cylindrical sample placed in a beam (neutron for example) will show a much higher transmission signal near the edge seen by the beam, compare to the center. This is simply due to the fact that the beam has to go through more material at the center compare to the side.

ATTENTION: This library only works with cylinder placed in the vertical position!

The following figure illustrate this.

image

In order to correctly analyze data for those samples, one must cancel this cylindrical effect by "making" the sample flat related to the direction of the beam. The user needs to specify the position of the center as well as the radius of the cylinder. The program will then produce an image corresponding to the same rectangular sample. Such samples are called homogeneous because they are made of only one uniform and homogeneous material. But program also work with inhomogeneous sample for which the cylinder is hollow such as shown here.

image

Program works the same way, user needs to specify center and inner and outer radius of material sample.

Installation

Using Pixi (Recommended for Development)

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

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

# Install dependencies and setup environment
pixi install

# Run Python with the package
pixi run python

Using pip

pip install neutron-geomcorr

After package is published to PyPI.

Using conda

conda install -c neutronimaging neutron-geomcorr

After package is published to conda.

Usage

from neutron_geomcorr.geometry_correction import GeometryCorrection

# Initialize with your image files
o_cgc = GeometryCorrection(list_files=['image1.tif', 'image2.tif'])
o_cgc.load_files()

# Define cylinder parameters
o_cgc.define_parameters(pixel_center=256, outer_radius=200)

# Run correction
o_cgc.correct()

# Access corrected data
corrected_images = o_cgc.list_data_corrected

Development

Running Tests

pixi run test

Building Documentation

pixi run build-docs

Building Package

# For PyPI
pixi run pypi-build

# For conda
pixi run conda-build

Tutorial

It's recommended to follow the notebook tutorials in the notebooks/ directory to learn how to use the library

Metadata

Release files for neutron-geomcorr 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for neutron-geomcorr 2.0.0
File Size Uploaded
neutron_geomcorr-2.0.0.tar.gz 21.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for neutron-geomcorr 2.0.0
File Interpreter ABI Platform
neutron_geomcorr-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.6 MB

Release files / neutron_geomcorr-2.0.0.tar.gz

Download URL neutron_geomcorr-2.0.0.tar.gz
Size 21.6 MB
Tags Source
SHA-256 checksum
How to use checksums
6aa03645ce64754819bf9009d28d72816dc6f93a711f2152e33907d753cc9a72
BLAKE2b-256 checksum
How to use checksums
c9adb01b0fe8da122ba720a120be8689c46ab53228ca3d1ef32b61637a11cf92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.

Transparency log

Release files / neutron_geomcorr-2.0.0-py3-none-any.whl

Download URL neutron_geomcorr-2.0.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30dd6bf83b0bf399c1a0fae5b7551b53662168d3cb40effd16577bb8a144d68e
BLAKE2b-256 checksum
How to use checksums
f6d2c5976e89c48d29186f1818f42524c033ad77d5b26046561e2601270f2787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page