RasCal

Precision optical alignment software for Rasnik and Rasdif measurement systems. Sub-nanometre accuracy. Real-time analysis. GPU-accelerated.

<25ms
Per-frame analysis time
sub-nm
Rasnik position accuracy
sub-nm
Rasdif shift accuracy
CPU+GPU
Dual compute backends

Why RasCal

Next-generation alignment software, purpose-built for demanding physics and engineering environments.

Real-Time Performance

Analyses a full camera frame in under 25 milliseconds. Optimised for high-throughput data acquisition where every millisecond counts.

📈

GPU Accelerated

Optional GPU acceleration for even faster throughput on large images. Falls back to CPU automatically when no GPU is available — no configuration needed.

🔒

Built for 24/7 Operation

Designed for continuous unattended operation in live experiments. Automatic logging, crash-safe output, and multi-threaded processing keep your data flowing reliably.

🛠

Python Integration

Full Python API for seamless integration into your existing data acquisition and control systems. Feed camera images in, get calibrated results out.

🎯

Rasnik & Rasdif

Two measurement modes in one package. Absolute positioning with Rasnik coded masks or relative shift measurement with Rasdif diffraction patterns.

🚀

Cross-Platform

Runs on Linux and macOS. Pre-built binaries and Python packages for both platforms. Deploy anywhere your experiment runs.

Measurement Modes

Two complementary techniques for different alignment needs.

Rasnik

Absolute Position Measurement

Determines the exact position, magnification, and rotation of a coded chessboard mask as seen through a lens and camera system. The binary code embedded in the pattern gives an absolute coordinate on the mask — no reference frame needed.

Accuracy: sub-nanometre

Rasdif

Relative Shift Measurement

Measures tiny displacements between successive frames of a diffraction pattern. A reference image is captured once, and all subsequent frames are compared against it to detect horizontal and vertical shifts with extreme precision.

Accuracy: sub-nanometre

How It Works

From camera image to calibrated measurement in milliseconds.

Capture

A camera captures an image of the Rasnik mask or Rasdif diffraction pattern.

Analyse

RasCal processes the image using FFT-based pattern recognition to extract position, orientation, and quality metrics.

Decode

For Rasnik, the binary code embedded in the chessboard pattern is decoded to determine the absolute coordinate on the mask.

Output

Calibrated results are delivered as CSV, JSON, or directly to your application via the Python API.

Easy to Integrate

Use as a command-line tool for batch processing, or embed in your application via Python.

Command Line

Process single images or entire datasets from the terminal with CSV, JSON, or timestamped output.

Terminal
$ rascal image.pgm --config rascal.ini --header
Date,Time,X,Y,Z,Rotation,Mag,...
25/03/2026,10:17:47,-4839.43,3244.60,...

Python API

Integrate directly into your data acquisition pipeline.

  • Real-time and batch processing modes
  • Standard NumPy array input
  • Multi-camera support
  • Built-in CSV logging
  • Non-blocking for high frame rates
Python
import rascal

# Rasnik absolute positioning
analyzer = rascal.RasnikAnalyzer(
    config="rascal.ini",
    daemon=True,
    threads=4,
)

# Submit frames from camera
analyzer.submit(image_array, timestamp=t)

# Collect results
for r in analyzer.get_results():
    print(r.x, r.y, r.magnification)


# Rasdif shift measurement
shift = rascal.RasdifAnalyzer(
    config="doap.ini"
)
shift.analyze(reference_frame)
result = shift.analyze(next_frame)
print(result.x, result.y)

Applications

Trusted in high-energy physics experiments and precision engineering.

Particle Detector Alignment

Continuous monitoring of detector module positions in accelerator experiments. Tracks thermal and mechanical drift with sub-nanometre sensitivity over months of operation.

Optical System Calibration

Precision alignment of mirrors, lenses, and sensors on optical benches. Real-time feedback during assembly and commissioning of complex optical systems.

Structural Monitoring

Long-term displacement monitoring of civil and mechanical structures. Detect sub-nanometre shifts between measurement points caused by thermal expansion, settling, or seismic activity.

Get a License

RasCal requires a license to operate. Contact us to request a license for your institution or research project.