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.xmlmetadata 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.yamlorpsf_args.yamlon 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
Available CLI Flags
Focal Spot CLI
Flag |
Description |
|---|---|
|
Path to the YAML configuration file. |
|
Required. Path to the input image file ( |
|
Output directory to store results. |
|
Pixel size in mm. |
|
Physical diameter of the circular object in mm. |
|
Skip Hough Transform for automatic circle detection. |
|
Image magnification. If not provided, estimated automatically. |
|
Minimum number of pixels required to achieve a reasonable focal spot size. |
|
Number of angular projections for profile extraction. |
|
Half length of the extracted radial profiles. |
|
Step size used for numerical derivative calculations. |
|
Number of steps to shift the sinogram axis. |
|
Filter used. Options: |
|
Number of profiles to average (must be odd). Only used if |
|
Symmetrize the sinogram before reconstruction. |
|
Enable automatic sinogram shifting. |
|
Disable automatic sinogram shifting. (Mutually exclusive with |
|
Average neighboring sinogram profiles to improve FWHM estimation. |
|
Do not average neighboring profiles. (Mutually exclusive with |
|
Display plots during processing (matplotlib windows). |
PSF CLI
Flag |
Description |
|---|---|
|
Path to the YAML configuration file. |
|
Required. Path to the input image file ( |
|
Output directory to store results. |
|
Pixel size in mm. |
|
Physical diameter of the circular object in mm. |
|
Skip Hough Transform for automatic circle detection. |
|
Number of angular projections for profile extraction. |
|
Half length of the extracted radial profiles. |
|
Step size used for numerical derivative calculations. |
|
Number of steps to shift the sinogram axis. |
|
Filter used. Options: |
|
Number of profiles to average (must be odd). Only used if |
|
Symmetrize the sinogram before reconstruction. |
|
Angle of the circular sector for oversampling (in degrees). |
|
Radial sampling density for the coarse grid when oversampling is enabled. |
|
Controls oversampling mode: |
|
Enable automatic sinogram shifting. |
|
Disable automatic sinogram shifting. (Mutually exclusive with |
|
Average neighboring sinogram profiles to improve FWHM estimation. |
|
Do not average neighboring profiles. (Mutually exclusive with |
|
Perform oversampling. |
|
Disable oversampling. (Mutually exclusive with |
|
Display plots during processing (matplotlib windows). |