renderTomoQueue auto-opened the running job whenever the open-state snapshot
was empty, so collapsing the only open job (the running one) made the snapshot
empty and re-opened it on the next refresh. Open-state was also keyed by
positional index, which mis-assigns the flag when jobs are added/removed/
reordered.
- Snapshot open jobs by stable key (added_at|label) via a data-key attribute
instead of positional index.
- Auto-open a running job only once, on first appearance, tracked in
window.__tqAutoOpened; afterwards honor the DOM snapshot so a manual collapse
sticks. Prune the set when jobs disappear.
A block interrupts the running scan, clearing active_request_block, so
the old _derive_status() (which only returned 'blocked' inside the
queue_has_active_scan branch) fell through to 'idle' with the blocked
LED off, despite watched beamline states being out of spec.
- _derive_status: return 'blocked' on beamline_blocking OR queue_locks,
independent of active scan; only fresh-heartbeat 'scanning' outranks it.
- _cycle: beamline_blocking = enabled is True AND any(state mismatched).
Gated on enabled so a disabled/unknown interlock with an out-of-spec
state does not raise BLOCKED. Also counted as activity so the idle
clock restarts once cleared.
- beamline-states card summary updated in lock-step: mismatched states are
only called "currently blocking" when enabled, else "out of spec
(interlock disabled/unknown, not blocking)", so pill and card can't
disagree.
- status-detail JS: describe blocking beamline states when no explicit
queue lock is present. Update help text.
webpage_generator: report blocked on interlock even when scan is interrupted
- Add HAS_TOMO_QUEUE and TOMO_TYPES capability flags to
WebpageGeneratorBase, defaulting to flomni's current behavior
(type1 grid-8, type2/3 golden-capped) so this is a no-op for flomni.
- Gate the tomo_queue global-var read in _cycle() behind
HAS_TOMO_QUEUE; unaffected: queue_status/queue_locks/beamline_states,
which come from BEC's own primary scan queue and stay common to
all setups.
- _render_html() now conditionally emits the 'Tomo queue' card and
its DEFAULT_ORDER slot, and drives the projection-count formula
from a TOMO_TYPES JSON blob (generic calcProjections()) instead of
a hardcoded per-instrument JS branch.
- LamniWebpageGenerator: HAS_TOMO_QUEUE=False, TOMO_TYPES with
2-subtomo and 8-subtomo equally_spaced_grid entries (placeholder
keys pending real tomo_type values from the LamNI producer side).
A block interrupts the running scan, clearing active_request_block, so
the old _derive_status() (which only returned 'blocked' inside the
queue_has_active_scan branch) fell through to 'idle' with the blocked
LED off, despite watched beamline states being out of spec.
- _derive_status: return 'blocked' on beamline_blocking OR queue_locks,
independent of active scan; only fresh-heartbeat 'scanning' outranks it.
- _cycle: compute beamline_blocking = any(state mismatched), defined
identically to the beamline-states card so pill and card can't disagree;
also count it as activity so the idle clock restarts once cleared.
- status-detail JS: describe blocking beamline states when no explicit
queue lock is present. Update help text."
fosaz_info previously only reported remaining collision clearance for the
live fosaz position, giving no indication of clearance once OSA is moved
back to its defined IN position if foptz has shifted while OSA was OUT.
Now compares live fosaz against fosaz_in (10 um tolerance):
- if live fosaz is further IN than nominal (closer to collision), warn and
show current remaining space (the number that matters right now)
- if OSA is OUT/away from IN, no warning, but also report remaining space
at the IN position using current foptz, as a heads-up before moving OSA in
- Add HAS_TOMO_QUEUE and TOMO_TYPES capability flags to
WebpageGeneratorBase, defaulting to flomni's current behavior
(type1 grid-8, type2/3 golden-capped) so this is a no-op for flomni.
- Gate the tomo_queue global-var read in _cycle() behind
HAS_TOMO_QUEUE; unaffected: queue_status/queue_locks/beamline_states,
which come from BEC's own primary scan queue and stay common to
all setups.
- _render_html() now conditionally emits the 'Tomo queue' card and
its DEFAULT_ORDER slot, and drives the projection-count formula
from a TOMO_TYPES JSON blob (generic calcProjections()) instead of
a hardcoded per-instrument JS branch.
- LamniWebpageGenerator: HAS_TOMO_QUEUE=False, TOMO_TYPES with
2-subtomo and 8-subtomo equally_spaced_grid entries (placeholder
keys pending real tomo_type values from the LamNI producer side).
Add JSONL timing logs under ~/data/raw/logs/timing_statistics/ for
building a scan-time prediction model. Times each projection in
_tomo_scan_at_angle (final successful attempt only, retries excluded)
and each tomogram in tomo_scan, capturing raw scan parameters plus
elapsed/idle/active durations.
tomo_scan_projection always runs a fermat scan; warn and confirm when
called directly with single_point_instead_of_fermat_scan set, pointing
to tomo_acquire_at_angle instead. Internal callers pass _internal=True
to skip the prompt.
Replace the 4-parameter (quadratic) constants with the 3-parameter
pure-exponential fit from plot_intensity_map.py (operating-locus
calibration, gap-residual RMS ~14 um). c2 was insignificant (0.2 sigma)
and left E_inf degenerate (+/-11 keV).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Add tomo_scan_resume() as the primary recommended way to continue an
interrupted scan, in both the user guide and the setup reference
(manual subtomo_start/start_angle/projection_number kept as fallback)
- Add a new "Queueing multiple scans" section (short walkthrough in the
user guide, full command reference + status semantics in the setup
reference, cross-linked via a new anchor)
- Document the live progress report's ETA, automatic gap detection, and
the total-time-lost-to-gaps summary
- Document the zero_deg_reference_at_each_subtomo tomo_parameters() option
- Fix stale SPEC_ptycho_align.m references -> BEC_ptycho_align.m
- Tomo scan queue: queue multiple parameter sets and run them sequentially,
unattended, on the same sample (tomo_queue_add/show/execute/delete/clear);
resumes a partially-completed job automatically rather than restarting it
- tomo_scan_resume(): resume a crashed/interrupted tomo scan from the exact
subtomo/angle it stopped at, instead of restarting from the beginning
- Idle-time-aware ETA: detects gaps (crashes, beamline-down pauses) and
excludes them from the remaining-time estimate; reports total time lost
to gaps at the end of a scan
- Fixed non-uniform angular spacing in the interlaced 8-sub-tomogram
tomogram (sub_tomo_scan): phase offsets and per-projection step now
derive from the same corrected value, independent of requested total
- Fixed corr_pos_y/corr_angle_y/corr_pos_y_2/corr_angle_y_2/
tomo_alignment_fit being silently wiped on every client restart
(XrayEyeAlign.__init__); tomo_alignment_fit now also resets at sample
change, where it was previously missed
- Tracked, stepped fsamy moves (umvr_fsamy_tracked/umv_fsamy_tracked) to
keep the laser tracker locked during large moves, used in sample
transfer and manual x-ray-eye alignment jogs
- Added zero_deg_reference_at_each_subtomo for radiation-damage tracking
- tomo_parameters(): fixed several display/rounding inconsistencies and
added a notification when the requested projection count gets adjusted
- Add show/hide/positionable target crosshair (RPC), separate from bec_widgets' mouse crosshair
- Add zoom in/out/fit buttons; fix manual zoom/pan being wiped on every live-view re-enable
- Add reset_zoom() RPC method, called at start of x_ray_eye_align.py
- Style ROI outline blue/thinner (was near-white via compact_color default)
- Append the current BEC scan number to the Projection info-item,
e.g. "120 / 400 (S06650→S06770)", for direct comparison against
ptycho reconstruction filenames (which use the same S##### scan
number convention). Read from
primary.info[0].active_request_block.scan_number — already
available on the queue object, no new global var needed.
- Add tomo_start_scan_number to the progress payload, mirroring the
existing tomo_start_time pattern: a new tomo_progress key to be
written once by the scan loop when a tomogram begins. Producer side
(flomni.py) not yet implemented — falls back to showing only the
current scan number until then.
- New "Beamline states" draggable card (positioned just above
Contacts): lists every beamline state currently registered with
BEC, its live status (valid/invalid/warning/unknown), and whether
the scan interlock is watching it. Cross-references
bec.builtin_actors.scan_interlock.states_watched/.enabled against
each state's live status to flag which watched states are
currently mismatched (i.e. actually contributing to a queue lock),
vs. states that are invalid but not watched and therefore not
blocking anything (e.g. a simulated/test shutter).
This is a display-only diagnostic; the "blocked" experiment_status
itself is unchanged and still derived from the queue's own locks
(_read_queue_locks), not from beamline states directly.
- Add fmtScan() JS helper (S##### zero-padded formatting, matching
the existing ptycho filename convention) and renderBeamlineStates().
- Help panel updated to explain both additions.