Skip to content

swu4bnl/SciView

Repository files navigation

SciView

SciView is a PyQt5 application for interactive 2D X-ray scattering data inspection and analysis. It is designed for beamline workflows where users need fast image loading, calibration, mask editing, and data reduction protocol preview (under development) in one desktop interface.

Core capabilities

  • Image browsing from local files and Tiled data services.
  • Tiled Browser workflow for proposal/cycle search, detector selection, image preview, metadata display, and series playback.
  • Calibration editing for beam center, detector distance, wavelength, and related parameters.
  • Layered mask creation and editing with interactive drawing tools.
  • Protocol preview workflows for SciAnalysis-driven processing (under development).

Application structure

Core dependencies

The application depends on a scientific Python stack and the following key project dependencies:

Dependency definitions are managed in pixi.toml and pyproject.toml.

Quick start

Recommended (pixi)

Run once from the repository root:

./scripts/bootstrap_env.sh

Then launch by platform:

  • Linux: ./Launch-SciView-linux.sh
  • macOS: ./Launch-SciView-macOS.command
  • Windows: Launch-SciView-win64.cmd

The platform launchers configure the environment and start the application using the standard pixi task.

Alternative (local venv)

If pixi is unavailable, use the fallback bootstrap mode:

./scripts/bootstrap_env.sh --mode venv

Then start manually:

PYTHONPATH=src ./.venv/bin/python main.py

User workflow overview

Image Browser

  • Load single images and folders.
  • Navigate image sessions and sync selected images to other tabs by clicking "Use This Image".

Tiled Browser

  • Log in to a configured Tiled service and choose a catalog profile.
  • Search by cycle and proposal ID using profile-configured metadata mappings.
  • Apply optional filters such as measure_type, sample_savename, and experiment alias directory.
  • Select a detector, load image plus metadata on demand, and preview stacked image frames with the frame slider.
  • Use "Use This Image" to sync the selected Tiled frame to the rest of the application.

Calibration

  • Edit geometry and wavelength parameters.
  • Use ring-center tools and profile overlays for validation.

Mask Editing

  • Build masks with multiple layers and drawing tools.
  • Import, combine, and export mask artifacts.

Protocol Preview (under development)

  • Configure and run protocol previews using SciAnalysis-compatible data flow.

Configuration

Beamline-specific behavior is centralized in src/sciview/profiles/ and application runtime settings under src/sciview/settings/. This includes detector defaults, calibration defaults, file pattern handling, Tiled profile integration, metadata field mappings, and Tiled timeout settings.

Troubleshooting

Development notes

For additional implementation details, see docs/.

About

A PyQt5 application that integrates CFN/SciAnalysis with a GUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages