Skip to main content


PyPI DOI License: GPL v3 Python 3.9+ Documentation Status

📚 Full documentation: scope-xr.readthedocs.io

Table of Contents


Introduction

SCOPE-XR (Single-image Characterization Of PErformance in X-Ray systems) is a specialized Python framework for the automated characterization of X-ray systems. By analyzing a single acquisition of a circular aperture or disk test object, the software reconstructs 2D source distributions and detector responses.

Key capabilities:

  • Focal Spot: Automated reconstruction of 2D focal spot distribution and dimensions based on the methodology by Di Domenico et al., which is available in the form of an ImageJ plugin.
  • PSF: Automated reconstruction of 2D PSF distribution of the detector, based on the methodology by Forster et al., with optional sub-pixel oversampling controlled by a single gaussian_sigma parameter (0/None = direct binning, >0 = fine-grid blur).

Quick Start

Get started in 4 steps:

# 1. Install from PyPI
pip install scopexr

# 2. Get the default configuration
scopexr-confex

# 3. Run GUI
scopexr-gui

# 4. Or use CLI
scopexr-fs --f "path/to/image.tif"

If you need images, use our simulated ones!

📘 New to SCOPE-XR? Check out the Quickstart Guide with step-by-step instructions.

Installation

SCOPE-XR is installed as a standard Python package directly from PyPi. It is recommended to use a virtual environment (venv or conda) to keep your system clean.

Prerequisites

  • Python 3.9 or higher
  • Git

Windows:

python -m venv venv
.\venv\Scripts\activate

Linux/macOS:

python3 -m venv venv
source venv/bin/activate

1. Quick Install (For regular users)

If you just want to use the software without modifying the code, install directly from PyPI:

pip install scopexr

⚠️ Important: Configuration files (.yaml) are required for execution. Export the bundled defaults to your working directory with:

scopexr-confex

Use scopexr-confex --output-dir path/to/configs to export them to a different directory.

2. Manual Install (From source)

Recommended if you wish to modify the code or contribute:

  1. Clone the repository:

    git clone https://github.com/jacopoaltieri/scope-xr
    cd scope-xr
    
  2. Install the package:

    Install in editable mode (recommended for development) to ensure all dependencies are handled automatically:

    pip install -e .
    

    If you want also to be able to run the tests or build the docs, run:

    pip install -e .[all]
    

Usage

SCOPE-XR provides two main interfaces designed for different user workflows.

The program supports configurable execution via YAML configuration files. You can find an example of these files in the examples folder, along with some simulated images to test the package.

Supported Image Formats

The supported input image formats are:

  • .png
  • .tif / .tiff
  • .raw (must be accompanied by a corresponding .xml metadata file)
  • .dcm (DICOM)

GUI Execution

The recommended way for routine analysis. It features live image previews and interactive parameter tuning. To run the GUI, simply type:

scopexr-gui

GUI Features:

  • Easy Mode Selection: Separate tabs for "Focal Spot (FS)" and "PSF" analysis.
  • Automatic Configuration: The GUI automatically loads all default parameters from fs_args.yaml or psf_args.yaml on startup.
  • Image Preview: Load .png, .tif/.tiff, or .dcm images to see a preview directly in the app.
  • Full Parameter Control: All CLI flags are editable via interactive widgets.
  • Edit Config Files: A button allows you to directly open and edit the default .yaml config file for the active tab.
  • Live Output: All console output from the analysis script is printed directly to a text box within the GUI.

CLI Execution

Ideal for batch processing and integration into automated research pipelines. To run the program with the default settings (as defined in fs_args.yaml or psf_args.yaml), use the following commands:

  • Focal Spot:

    scopexr-fs --f "path/to/img.png"
    
  • PSF:

    scopexr-psf --f "path/to/img.png"
    

Use the --help flag with any command to see all available parameters.

Overriding Configuration Parameters

You can override any configuration value directly from the command line by adding the corresponding flag. For example:

scopexr-fs --f "path/to/img.png" --p 0.2

In this case, the pixel size will be set to 0.2 mm instead of the default value specified in the YAML file.

The full list of CLI flags is available in the documentation

Exporting Default Configurations

The scopexr-confex command exports the bundled fs_args.yaml and psf_args.yaml configuration files. By default, files are written to the current working directory:

scopexr-confex

To choose another destination, pass --output-dir (or -o):

scopexr-confex --output-dir path/to/configs

Processing Pipeline

SCOPE-XR Processing Pipeline

Documentation

Comprehensive documentation is available at scope-xr.readthedocs.io:

Contributing

We welcome contributions! Whether you're fixing bugs, adding features, improving documentation, or reporting issues, your help is appreciated.

Quick Start:

# Fork and clone
git clone https://github.com/YOUR_USERNAME/scope-xr.git
cd scope-xr

# Install dev dependencies
pip install -e .[dev,test]

# Create feature branch
git checkout -b feature/my-feature

# Make changes, run tests
ruff check
pytest

# Push and create PR
git push origin feature/my-feature

📋 Full guidelines: See CONTRIBUTING.md for detailed instructions on:

  • Development setup
  • Code style guide (using ruff)
  • Testing requirements
  • Pull request process
  • Reporting bugs and requesting features

Citation

If you use SCOPE-XR in your research, please cite our published paper as the primary reference:

Altieri, J., Cardarelli, P., Di Domenico, G., & Taibi, A. (2026). A python framework for single-image characterization of X-ray focal spot distribution and detector point spread function. Medical Physics, 53, e70513. https://doi.org/10.1002/mp.70513

BibTeX

Primary Paper:

@article{altieri2026scopexr,
  author  = {Altieri, Jacopo and Cardarelli, Paolo and Di Domenico, Giovanni and Taibi, Angelo},
  title   = {A python framework for single-image characterization of X-ray focal spot distribution and detector point spread function},
  journal = {Medical Physics},
  volume  = {53},
  pages   = {e70513},
  year    = {2026},
  doi     = {10.1002/mp.70513}
}

Software Package (PyPI / Version Specific):

@software{scopexr2026software,
  author    = {Altieri, Jacopo},
  title     = {SCOPE-XR: Single-image Characterization Of PErformance in X-Ray systems},
  year      = {2026},
  version   = {1.3.6},
  url       = {[https://pypi.org/project/scopexr/](https://pypi.org/project/scopexr/)},
  publisher = {PyPI}
}

Methodology Citations

If your work relies specifically on the underlying algorithmic methods, please also consider citing:

Changelog

See CHANGELOG.md for version history and release notes.


⚖️ License

Distributed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE for the full text.

Metadata

Release files for scopexr 1.4.1

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

Source distribution (sdist)

Source distribution for scopexr 1.4.1
File Size Uploaded Provenance Actions
scopexr-1.4.1.tar.gz 3.5 MB With provenance Details for scopexr-1.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scopexr 1.4.1
File Interpreter ABI Platform Actions
scopexr-1.4.1-py3-none-any.whl Python 3 none any Details for scopexr-1.4.1-py3-none-any.whl

Total release size: 7.1 MB

Release files / scopexr-1.4.1.tar.gz

Download URL scopexr-1.4.1.tar.gz
Size 3.5 MB
Tags Source
SHA-256 checksum
How to use checksums
060c4ca6447466867bdb7e9975b12d9b958661a661730dd3eb8bf986f64dd199
BLAKE2b-256 checksum
How to use checksums
b2c1aec2ca6fa1fad6d7462ebf72e30e2d7ec90a475807f7e22d0db35b489253
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Release files / scopexr-1.4.1-py3-none-any.whl

Download URL scopexr-1.4.1-py3-none-any.whl
Size 3.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
59813f1791e583b0aa00808e1cffd4d7d2919c874190e9411a3d08af21ab3cc3
BLAKE2b-256 checksum
How to use checksums
9d8b34902af705c89637d6cbea0ccf99159691b5e1e4ff0bbca7628b6dadd4fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 29, 2026.

Transparency log

Security for scopexr 1.4.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for scopexr-1.4.1.tar.gz

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 Oct 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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