xray.ooguy — XRD and synchrotron X-ray calculators for lattice d-spacing, Bragg angle, Q-space, beam footprint, BCDI oversampling and XRR segment stitching

Scan Time & Shift Budget T = N1N2(td + to)
Total time
-
Per repeat
-
Points
-
Dwell that just fits
-
Against the beamtime left: -
Absorbed Dose & Exposure Limit D = FtE(1 − T) / ρAd
Dose rate
-
Dose this exposure
-
Time to the limit
-
Absorbed fraction
-
Absorber Stack T = Π e−μidi
Foil Thickness (μm) Transmission
-
-
-
-
Stack transmission
-
Attenuation factor
-
For the attenuation wanted, in the first foil: -
Beamline Photon Flux Delivered Flux
Delivered Photon Flux
-
Total Optical Efficiency
-
Slit Opening & Beam Acceptance Beam Acceptance
Beam Size at Slit (FWHM)
-
Recommended Slit Opening
-
Energy - Wavelength - Frequency Conversion E = hc/λ = hν
Equivalent Physical Quantities
10.0000 keV ⟷ 0.12398 nm ⟷ 2.418 × 1018 Hz
Refractive Index & X-ray Transmittance (n = 1 - δ + iβ) Beer-Lambert Attenuation
Beam Transmittance
-
Attenuation Length (1/e)
-
Critical Angle θc
-
Refractive decrement δ = -, Absorption term β = -
Total External Reflection θc = √(2δ)
Critical Angle θc (°)
-
Critical Angle θc (mrad)
-
Critical Momentum Qc
-
δ = -
Diffraction Grating mλ = d(sin α + sin β)
Diffracted Angle β
-
Angular Dispersion (dβ/dλ)
-
Wavelength λ
-
Energy Resolution (ΔE/E) Monochromator Intrinsic
Total Bandwidth (ΔE)
-
Energy Resolution (ΔE/E)
-
Bragg Angle
-
Crystal Thermal Drift (Angle & Energy Shift) Δθ = -α ΔT tan θ
Bragg Angle Drift (Δθ)
-
Effective Energy Shift (ΔE)
-
Monochromator Energy Calibration E = hc / 2d sinθ
Energy actually delivered
-
Offset from the setting
-
Relative offset
-
Angle offset that explains it
-
Bragg's Law (3-Way Suite) λ = 2d sin θ ⇔ E = hc / (2d sin θ)
Common Crystal Reflection Presets
1 d-spacing d — given 2θ, E
Calculated d-spacing (d)
3.1356 Å
θ = 11.403° | Q = 2.0038 Å⁻¹
2 Diffraction angle 2θ — given d, E
Calculated Angle 2θ
2θ = 22.806°
θ = 11.403° | Q = 2.0038 Å⁻¹
3 Energy E — given d, 2θ
Calculated Energy (E)
10.000 keV
θ = 11.403° | λ = 0.12398 nm
Lattice Constants & Miller Indices → d-spacing 1/d² = h·G*·h
Plane spacing d
-
Scattering vector |Q| = 2π/d
-
Bragg angle θ (2θ)
-
Unit cell volume V
-
Reciprocal Space (Q-Space) Conversion Q = (4π/λ) sin θ = 2π/d
Energy Scaling & Angle Calculator Eref sin θref = Etarget sin θtarget ⇔ Q = const
Reference Beam & Angle
Target Beam Energy Selection
Quick Target Energy Presets
Target Angle 2θ
18.962°
Target Angle θ
9.481°
Scattering Vector Q
2.0038 Å-1
Δθ = -1.922° | Δ(2θ) = -3.844° (-6919.2")
d = 3.1356 Å | λref: 0.12398 nm ➔ λtarget: 0.10332 nm
Beam Footprint on Sample L = V / sin θ
Footprint Length on Sample
-
Horizontal Width
-
Shallowest Angle That Still Fits
-
Status: -
Detector Angular Resolution Δθ = Pixel / Distance
Angular Resolution (mrad)
-
Angular Resolution (°)
-
Chi-Phi Eulerian Cradle Correction 4-Circle Diffractometer
Phi Axis Correction (Δφ)
-
Lattice Strain from a Peak Shift ε = Δd / d0
Strain ε
-
Microstrain
-
Measured d
-
Peak shift Δ2θ
-
Detector Pixel to Q Q = 4π sinθ / λ
Scattering vector Q
-
Scattering angle 2θ
-
Plane spacing d
-
Azimuth on the detector
-
Coherence Lengths at the Sample ξt = λR/2S, ξl = λ/2(ΔE/E)
Transverse ξt, horizontal
-
Transverse ξt, vertical
-
Longitudinal ξl
-
Max path difference
-
Sample against the transverse coherence: -
CDI / BCDI Coherent Oversampling σ = (λ·D) / (p·S) ≥ 2
Oversampling Ratio (σ)
-
Detector Speckle Size
-
Criterion Verdict: -
Reachable Real-Space Resolution Δr = λD / Np
Real-space resolution Δr
-
Half-width Q at the edge
-
Angular half-span
-
Detector extent used
-

What do you need to do?

Calculators and utilities for recurring beamline work, grouped by the job rather than by the physics. The Index lists all of them by suite.

Browse every tool in the Index
SYNCHROTRON X-RAY OPTICS & BEAMLINE MONOGRAPH

INDEX

Comprehensive Index of Synchrotron Optics, Beamline Physics & Experimental Suites

DOC NO: BL-TK-2026 TOTAL SUITES: VIII MODULES: 30 Calculators & Tools CALIBRATION: CODATA 2022 STATUS: Client Offline-Native
Appendix · Reference data

Fundamental physical constants and crystal lattice data

CODATA 2022 recommended values. Lattice spacings are quoted at 298.15 K; values marked (exact) are fixed by the SI definitions.

Symbol Quantity Value Unit
hc Photon energy-wavelength product 12398.41984 eV·Å = 1.239842 keV·nm
h Planck constant 6.626070 × 10-34 J·s (exact)
ħ Reduced Planck constant 1.054572 × 10-34 J·s
c Speed of light in vacuum 299,792,458 m·s-1 (exact)
e Elementary charge 1.602177 × 10-19 C (exact)
re Classical electron radius 2.817940 × 10-15 m
me Electron rest mass 9.109384 × 10-31 kg = 0.5110 MeV/c2
α Fine-structure constant 1 / 137.035999 dimensionless
NA Avogadro constant 6.022141 × 1023 mol-1 (exact)
kB Boltzmann constant 1.380649 × 10-23 J·K-1 (exact)
Crystal d-spacing (298.15 K)
dSi(111) Silicon Si(111) 3.13560 Å a = 5.43102 Å
dGe(111) Germanium Ge(111) 3.26636 Å a = 5.65750 Å
dC(111) Diamond C(111) 2.05930 Å a = 3.56683 Å
Beamtime Logbook Header Presets Plain Text Format


                    
                    

                    
In-Situ Beamtime Event Snippets One-Click Timestamped Copy
BEAM DUMP CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] BEAM DUMP: Storage ring beam lost (0 mA). Beamline standby.
BEAM RESTORED CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] BEAM RESTORED: Top-up injection nominal (300 mA). Hutch shutter opened.
SAMPLE MOUNT CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] SAMPLE MOUNT: Sample [ ] mounted on stage.
ALIGNMENT CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] ALIGNMENT: Direct beam, pinhole, and slits centered. Counts: [ ] ph/s.
CALIBRATION CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] CALIBRATION: Standard (LaB6 / AgBh / CeO2) calibration measured.
SCAN START CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] SCAN START: Run #[ ] started (Exp: [ ] s, Attn: [ ] dB).
SCAN FINISH CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] SCAN FINISH: Run #[ ] completed. 2D frames saved.
INTERLOCK CLICK TO COPY
[YYYY-MM-DD HH:mm:ss] INTERLOCK: Hutch search / Interlock / Motor error / Alarm triggered.
Load Scan Files Delimiter & header auto-detect
Drop files here, or
TXT · CSV · DAT · XY — tab / comma / semicolon / whitespace, # % ! ; comments
Generic XY Plot Linear / Log · Normalize · Crop
–
XRR Segment Stitching Scale from the overlap

XRR segments measured through different absorbers are the same reflectivity times an unknown constant each. Where two segments overlap in angle they measure the same thing, so the point-by-point ratio across the overlap is that constant; its median is used. Each segment is matched against the whole curve assembled so far, so an error does not simply repeat down the chain.

Typing a value into the scale column of the loaded-file table overrides the automatic one; clearing the box hands it back to auto. A segment with no overlap is left at scale 1 and flagged, so a known absorber factor can be entered directly.

Kiessig Fringes → Film Thickness t = (λ/2) / (√(θ22−θc2) − √(θ12−θc2))

Two adjacent minima of the reflectivity curve. Entering the critical angle applies the refraction correction; leaving it at zero gives the plain λ/2Δθ estimate, which reads thick at low angle.

Film thickness
-
Without the refraction correction
-
Fringe spacing Δθ
-
Next minimum expected at
-
Language Selection
Switch the interface language. Each language has its own address, so the page reloads.
Display Theme Configuration
Pick one of seven themes. Layout and print specification stay identical across all themes.
Keyboard Shortcuts
[Alt + 1] Jump to RADIOMETRY
[Alt + 2] Jump to OPTICS
[Alt + 3] Jump to GEOMETRY
[Alt + 4] Jump to COHERENCE
[Alt + 5] Jump to DATA
[Alt + 6] Jump to RECORD
[Alt + 7] Jump to SETTINGS
[Alt + 8] Jump to ABOUT
[Alt + 9] Jump to DASHBOARD
[Alt + 0] Jump to CONTENTS

xray.ooguy

A lightweight toolkit for X-ray experiments.

Version 1.5 · Offline-ready · No account, no server

Handles the calculations an X-ray diffraction experiment needs over and over — Bragg angle, wavelength conversion, lattice spacing, scattering vector — on a single screen, and keeps a light record of session context and logs. It does not replace your lab notebook; it removes the work of redoing the same calculation and retyping the same header every time.

What is inside

RADIOMETRY
Photon flux and slit acceptance, absorber stacks, absorbed dose and the exposure-time budget.
OPTICS
Energy-wavelength conversion, complex refractive index and transmittance, gratings, energy resolution and thermal drift.
GEOMETRY
Bragg angles, lattice d-spacing, reciprocal-space Q, beam footprint, detector geometry and Eulerian cradle correction.
COHERENCE
Coherence lengths at the sample, CDI / BCDI oversampling and the real-space resolution the geometry can reach.
DATA
Two-column scan files read automatically, XY plotting with a log axis, normalisation, range crop and XRR segment stitching.
RECORD
One-click experiment logs with session context, plus a formatted session header ready to paste into an external logbook.

Design principles

  • No account, no server, no upload. Everything lives in this browser's localStorage and can be exported or imported as JSON.
  • Works without a network. No external libraries, web fonts, or tracking scripts.
  • Built for the machines labs actually run — it behaves identically on Firefox 60 ESR under CentOS 7.
  • Shows only what you need. Nothing forces you to fill in metadata, and empty fields are a valid state.

Who made it

Isaac Yong (용이삭)
MSc candidate, Dept. of Physics, Sogang University · Synchrotron X-ray optics & coherent diffraction imaging

Started after repeating the same calculations one beamtime too many, to put the tools that were actually needed in one place.

Sources

Physical constants use CODATA recommended values; lattice parameters and scattering factors come from published crystallographic data. Results are meant to support experiment planning and on-site decisions — verify them yourself before using them in a presentation or publication.