jungfrauandClaude Opus 5 4a537dbfc2 Bin the error model's samples without sorting them
The (a, b) fit wants sixteen equal-count bins in I^2 and takes three medians out of each. It was
getting them by sorting the whole pool - millions of 32-byte samples - and it did that fourteen
times a run: the fit runs once per merge and twice where the resolution cutoff refits, the outlier
refit doubles it again, and there are five merges. Each call also took its pool BY VALUE, so every
one of those began by copying tens of megabytes, and each bin then built three more vectors by
push_back to hand to a median.

A bin only has to be the right SET. Put each boundary in place with nth_element instead, splitting
the boundaries down the middle so every level halves the range it works on - four levels of linear
work against n log n - and take the three medians straight off the bin's own span with the field
wanted, which is what median_of was doing anyway: it returns the lower median, exactly the element
nth_element leaves at that index. No copy is made at all, and the sixteen bins are disjoint so they
divide over the cores.

The comparator is now total. The sort it replaces was not stable, so which of two samples of equal
I^2 landed in which bin was decided by the order the pool happened to arrive in - and the refit is
handed a different order from the first fit. Ordering on the remaining fields, which are in the same
cache line, makes the bin a property of the samples instead. This is why the merged intensities are
not byte-identical to the previous release on about half a percent of reflections, at a median
difference of zero and a worst case of 1.2e-2: those are the ties, whose old resolution was
arbitrary. Every fitted (a, b, ISa, chi2) in the run agrees to four significant figures.

The per-group outlier median goes the same way. It was building a vector per ASU group to hold a
handful of floats - over a million allocations, their growth and their frees, five times a run -
where the counts were already to hand from the pass above. One flat array with a per-group span
gives the identical median, since a median does not care how the multiset was laid out.

Measured together with the previous commit on a high-multiplicity rotation set: 38.3 s -> 35.1 s.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011n8riB6X59oRjkrSHzNPAU
2026-08-23 11:52:54 -04:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-07-19 09:39:28 +02:00
2025-12-04 11:56:14 +01:00
2026-08-22 18:35:47 +02:00
2026-07-13 13:54:03 +02:00
2026-07-12 19:42:29 +02:00
2026-08-13 17:03:10 +02:00
2026-03-26 20:50:33 +01:00
2026-06-23 20:29:49 +02:00
2026-08-13 17:03:10 +02:00
2026-07-19 09:39:28 +02:00
2026-08-13 17:03:10 +02:00
2026-08-23 13:05:31 +02:00
2026-06-13 21:27:41 +02:00
2026-06-23 20:29:49 +02:00
2024-11-22 21:25:20 +01:00
2024-12-02 21:17:14 +01:00
2026-08-13 17:03:10 +02:00
2025-10-25 22:05:47 +02:00
2026-07-03 19:18:56 +02:00
2026-06-23 20:29:49 +02:00
2026-08-13 17:03:10 +02:00
2024-12-02 21:17:14 +01:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-13 17:03:10 +02:00
2026-08-22 18:35:47 +02:00

Jungfraujoch

Application to receive data from the PSI JUNGFRAU and EIGER detectors.

All documentation is now placed in docs/ subdirectory and for the current version hosted on Jungfraujoch Read The Docs page.

S
Description
Jungfraujoch Data Acquisition System
Readme GPL-3.0
3 GiB
Languages
C++ 75%
HTML 7.8%
C 6.2%
TypeScript 4.3%
Cuda 2.3%
Other 4.3%