leonarski_fandClaude Opus 5 c619d25c96
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
feat(gui): rework the smart rotation dose strategy
Take the DAQ inputs at face value and solve the collection per beamline
instead of applying stacked fudge factors.

- Resolution is used as reported: the DAQ estimate is no longer biased, so
  the -0.2 A shift and the 1/(1/d + 0.1) reciprocal-space push are gone.
  d_tar now drives both the dose budget and the detector distance.
- The crystal is assumed to fill the beam, so the sqrt(xtal_y * xtal_z)
  dilution of the dose rate is dropped. Under that assumption the beam dose
  rate is the diffraction-weighted rate, which is the damage-relevant one;
  averaging over unilluminated volume was under-reporting it. The redundant
  "Calculated Dose (xtal size)" row goes with it -- it was also being fed a
  rate under an MGy label.
- Flux comes from DAQStatus at 100% transmission, replacing the hardcoded
  2.5e11 that disagreed with the flux the panel displayed.
- Beamline split: X10SA pins the detector at 100 Hz and solves for
  transmission; X06DA holds transmission at 100% and solves for exposure
  time, falling back to transmission at the exposure floor. When the budget
  cannot be spent at full beam we cap at 100% and flag the under-dose rather
  than stretching the frame.
- Respect bl.dtz_min / bl.dtz_max (replacing the hardcoded 108 mm) and the
  per-beamline exposure floor, with 2 ms stated explicitly for X06DA.
- Move the cryo/room-temperature switch from 250 K to the protein-solvent
  glass transition at 200 K. Warkentin & Thorne fit two Arrhenius regimes
  either side of ~200 K; applying the cryo budget in the 200-250 K band
  overdosed there by close to an order of magnitude.
- Snap detector distance to 10 mm, transmission to two significant digits
  and exposure to 1 ms. Every snap rounds in the direction that under-spends
  the dose budget; dtz floors because calc_dtz_mm returns the largest
  distance that still puts d_tar on the detector edge.

Dose constants are now named and carry their citations (Holton 2009 for
kdose, Howells for the 10 MGy/A half-dose, Owen for the room-temperature
limit) instead of appearing as bare literals.

Fixed while in here:
- "Total angle" was wired to the resolution field's newValue, so editing it
  never recalculated.
- self.transmission was only assigned inside update_calculated_labels, which
  early-returns without a DAQ status, so "Run rotation" could raise
  AttributeError before the first status arrived.
- "Total measurement time" reported the beam-on budget, not wall-clock;
  those differ whenever transmission is below 100%.
- run_measurement re-read the widgets instead of sending the last calculated
  solution, so dtz, exposure and transmission could be mixed across edits.
- Dropped a dead wavelength_angstrom None branch: it is a computed property
  on DiffractionGeometry and cannot be None.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018JVrLMLGNUXhfJjWxUcTBj
2026-09-10 16:18:44 +02:00
2026-08-25 14:47:04 +02:00
2026-07-06 16:27:08 +02:00
2026-07-27 14:44:33 +02:00
2026-08-04 15:41:29 +02:00
2026-09-10 08:42:09 +02:00
2026-09-10 14:16:39 +00:00
2026-09-10 14:16:39 +00:00
2026-08-04 14:13:47 +02:00
2026-08-04 14:13:47 +02:00

AareDAQ

AareDAQ is the Data Acquisition system for MX beamlines at PSI.

S
Description
No description provided
Readme
34 MiB
v1.4.0
Latest
2026-10-06 15:53:19 +02:00
Languages
Python 100%