Compare commits

...
Author SHA1 Message Date
leonarski_fandClaude Fable 5 3c03028fd8 fix(cpack): package viewer-only TGZ by component, build its CLI tools in CI
Build Packages / build:viewer-tgz:cpu (push) Successful in 7m24s
Build Packages / build:viewer-tgz:cuda (push) Successful in 8m6s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m0s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m24s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m33s
Build Packages / build:windows:nocuda (push) Successful in 15m28s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m22s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 9m45s
Build Packages / build:windows:cuda (push) Successful in 17m58s
Build Packages / build:rpm (rocky8) (push) Successful in 9m59s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m44s
Build Packages / build:rpm (rocky9) (push) Successful in 11m0s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m8s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m18s
Build Packages / Generate python client (push) Successful in 23s
Build Packages / Build documentation (push) Successful in 42s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (durin plugin) (push) Successful in 7m36s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m12s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m27s
Build Packages / DIALS test (push) Successful in 13m8s
Build Packages / Unit tests (push) Successful in 1h15m57s
Build Packages / Unit tests (pull_request) Successful in 1h1m7s
Build Packages / build:windows:cuda (pull_request) Successful in 12m25s
Build Packages / build:viewer-tgz:cpu (pull_request) Successful in 6m46s
Build Packages / build:viewer-tgz:cuda (pull_request) Successful in 6m55s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 9m24s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 9m58s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 9m3s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 8m29s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 10m20s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 11m43s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 10m53s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 13m4s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 11m34s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m35s
Build Packages / DIALS test (pull_request) Successful in 13m28s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 7m32s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m35s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 6m2s
Build Packages / Generate python client (pull_request) Successful in 22s
Build Packages / Build documentation (pull_request) Successful in 48s
Build Packages / Create release (pull_request) Skipped
Build Packages / build:windows:nocuda (pull_request) Successful in 10m11s
The build-viewer-tgz job failed at the CPack step: the archive (TGZ)
generator defaults to a monolithic install, so it walked every install()
rule in the tree -- the fetched HDF5 command-line tools, abseil's
EXCLUDE_FROM_ALL sub-libraries, Findlibaec.cmake and the non-viewer
components -- none of which a viewer-only build produces, so cpack aborted
with "cannot find <artifact>".

Scope the archive to CPACK_COMPONENTS_ALL (viewer) via
CPACK_ARCHIVE_COMPONENT_INSTALL, mirroring the DEB/RPM branches;
ALL_COMPONENTS_IN_ONE keeps the output a single tarball named
CPACK_PACKAGE_FILE_NAME so the CI upload glob still matches.

The viewer component also contains the portable CLI tools
(jfjoch_process/scale/azint/recompress/extract_hkl), so build the whole
viewer-only tree (ninja -j16) instead of just jfjoch_viewer, otherwise
those binaries are missing when cpack installs the component.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 17:18:04 +02:00
leonarski_fandClaude Fable 5 2f91af7352 test: gate DisconnectMidWrite test on writer connection to fix race
TCPImageCommTest_DisconnectMidWrite_NoHang launched the sender before the
puller's connection was accepted by the pusher's background accept thread.
When StartDataCollection ran first it threw "No writers connected", which
escaped the sender lambda (re-thrown by sender.get()) and starved the
receiver thread's PollImage, whose REQUIRE failure aborted with SIGABRT.

Wait for GetConnectedWriters()==1 before starting, matching every other
test in the file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 17:11:46 +02:00
leonarski_fandClaude Opus 4.8 db27b63ccc merge: floor merged sigma at the systematic error so ISa is the I/sigma ceiling
The error model splits a reflection's variance into a statistical part (a*sigma^2,
which averages down with multiplicity) and a systematic part ((b*I)^2 - absorption,
beam flicker, partiality, detector non-uniformity - correlated across a reflection's
repeats). Inverse-variance merging (sigma = 1/sqrt(sum_w)) divided BOTH by the
multiplicity, so high-multiplicity reflections got an unphysically small merged sigma:
on lysoC the merged I/sigma reached 300 with a third of reflections above the ISa of
11.1, whereas XDS's tops out exactly at its ISa (23.2 vs 23.3). The too-small sigmas
also faked screw-axis violations (the missed monoclinic 2_1) and mis-weight refinement.

Floor the merged sigma at b*|I| (= I/sigma capped at ISa = 1/b), applied in the shared
export loops of both merge paths: Merge.cpp (stills) and RotationScaleMerge.cpp (the
rotation path, whose export loop is shared by the CPU and GPU merges, so parity is
preserved). Intensities, weights, CC1/2 and R_meas are unchanged - only sigma changes.

Validated on the 18-crystal rotation battery: merged I/sigma now caps at each crystal's
ISa (was up to 300), overall <I/sigma> becomes honest (lysoC 11.6 -> 5.4), and no space
group or indexing rate regresses. The one crystal still uncapped (EP_cs_01-24, ISa 0.0)
is the known ice-ring failure where the error model does not fit, so there is no b*I
floor - a separate issue. This is the root cause the SearchSpaceGroup E^2 gate patched
downstream; the two now reinforce each other. It does not close the per-observation ISa
gap vs XDS (integration quality), only makes the merged sigmas honest.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:54:04 +02:00
leonarski_fandClaude Opus 4.8 b846e60e0d docs: record rc.156 changes since the last changelog update
Build Packages / build:windows:nocuda (push) Failing after 1m12s
Build Packages / build:windows:cuda (push) Failing after 39s
Build Packages / build:viewer-tgz:cpu (push) Failing after 6m39s
Build Packages / build:viewer-tgz:cuda (push) Failing after 7m26s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m22s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m42s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m20s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m44s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m29s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 12m0s
Build Packages / build:rpm (rocky8) (push) Successful in 11m14s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m34s
Build Packages / build:rpm (rocky9) (push) Successful in 12m45s
Build Packages / Generate python client (push) Successful in 15s
Build Packages / Build documentation (push) Successful in 52s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m22s
Build Packages / XDS test (durin plugin) (push) Successful in 6m49s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m37s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m13s
Build Packages / DIALS test (push) Successful in 13m45s
Build Packages / build:windows:nocuda (pull_request) Successful in 15m18s
Build Packages / build:windows:cuda (pull_request) Successful in 17m17s
Build Packages / build:viewer-tgz:cpu (pull_request) Failing after 5m51s
Build Packages / build:viewer-tgz:cuda (pull_request) Failing after 7m19s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 10m49s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 11m55s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 12m6s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 12m33s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 10m41s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 11m32s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 11m0s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m31s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 11m41s
Build Packages / Generate python client (pull_request) Successful in 18s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 12m50s
Build Packages / Create release (pull_request) Skipped
Build Packages / Build documentation (pull_request) Successful in 46s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 7m30s
Build Packages / DIALS test (pull_request) Successful in 12m13s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 6m47s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 5m51s
Build Packages / Unit tests (push) Successful in 1h42m14s
Build Packages / Unit tests (pull_request) Failing after 1h12m49s
Add the user-facing changes committed since the rc.156 entry was written: GPU
Bragg integration in the offline workflow (old integrators removed), deterministic
Ewald-ranked prediction, intensity-based systematic-absence test (recovers missed
screw axes), GPU-accelerated RotationScaleMerge, the --force-still / auto-rotation
/ mmCIF-default processing changes, the integration-model REST/frontend setting,
and the writer, viewer and CI fixes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:13:50 +02:00
leonarski_fandClaude Opus 4.8 6df657fe62 SG search: gate the systematic-absence test on intensity, not just I/sigma
The monoclinic 2_1 screw was missed on EP_cs_02-10 and EP_cs_01-17 (adopted P2
instead of P2_1). The 0k0-odd reflections are correctly measured as weak (~0.1-1%
of 0k0-even, matching XDS), but their merged sigmas are ~2x too small, so their
I/sigma clears the present_i_over_sigma cut and they count as screw-axis
violations - the search then falls back to the symmorphic group.

Add a resolution-normalised intensity E^2 = I / <I>(shell), computed from
equal-count resolution shells, and require a reflection to reach present_e_squared
(0.3) as well as present_i_over_sigma before it counts as violating a predicted
absence. This only tightens "present", so it cannot manufacture a screw whose
predicted-absent class carries real intensity (a symmorphic crystal's axial
reflections sit at E^2 ~ 1 and still register as violations).

On the 18-crystal rotation battery this recovers the screw on EP_cs_02-10 and
EP_cs_01-17 (-> P2_1) and, as a side effect, on MyoB (-> P2_1), pding4_001
(-> P4_122/P4_322) and pding4_003 (-> P2_2_2_1) - all confirmed by genuine absences
in the reference intensities (absent class at 0.02-0.76% of the allowed class),
which the old sigma-only test also missed. The other 13 crystals, indexing rate
and ISa are unchanged; the screw-free control (Ins_I -> I23/I2_13) is unaffected.

Add a regression test that reproduces the under-estimated-sigma screw and checks
the gate recovers it (and that disabling the gate reproduces the miss).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 15:18:27 +02:00
leonarski_f 2853cba3f0 Fix detector settings widget 2026-07-03 15:10:09 +02:00
leonarski_fandClaude Fable 5 bff5c99cda Writer: don't write empty grid-scan position arrays when max_image_number == 0
Build Packages / build:viewer-tgz:cpu (push) Failing after 7m52s
Build Packages / build:viewer-tgz:cuda (push) Failing after 8m34s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m40s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m15s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m24s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m34s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m43s
Build Packages / build:windows:nocuda (push) Successful in 15m11s
Build Packages / build:windows:cuda (push) Successful in 17m27s
Build Packages / build:rpm (rocky8) (push) Successful in 11m30s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 12m45s
Build Packages / build:windows:nocuda (pull_request) Failing after 4m22s
Build Packages / build:windows:cuda (pull_request) Failing after 2m26s
Build Packages / XDS test (durin plugin) (push) Successful in 7m31s
Build Packages / Generate python client (push) Successful in 30s
Build Packages / Build documentation (push) Successful in 1m7s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (rocky9) (push) Successful in 12m32s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m8s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m25s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m53s
Build Packages / DIALS test (push) Successful in 14m31s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m1s
Build Packages / build:viewer-tgz:cpu (pull_request) Failing after 5m58s
Build Packages / build:viewer-tgz:cuda (pull_request) Failing after 6m0s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 9m58s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 9m15s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 10m17s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 11m13s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 10m35s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 12m10s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 10m4s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 10m45s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m8s
Build Packages / Generate python client (pull_request) Successful in 22s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 11m53s
Build Packages / Create release (pull_request) Skipped
Build Packages / Build documentation (pull_request) Successful in 55s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 7m47s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m3s
Build Packages / DIALS test (pull_request) Successful in 12m27s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 5m28s
Build Packages / Unit tests (push) Failing after 1h18m30s
Build Packages / Unit tests (pull_request) Successful in 1h20m19s
The grid-scan branch of NXmx::Sample wrote grid_scan_x/grid_scan_y from
GetXContainer_m/GetYContainer_m, which return max_image_number entries.
When a scan stops at the first image (max_image_number == 0) these are
empty and SaveVector throws "Cannot write empty vector", surfacing as
"Writer 0: HDF5 error". Guard the two per-image writes on
max_image_number > 0, mirroring the goniometer branch; the grid-scan
scalar metadata and smargon transformation are still written.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 15:03:36 +02:00
leonarski_fandClaude Opus 4.8 4cda46c6b0 Wire BraggIntegrationEngine into the pipeline; deterministic prediction; integration_model API
Replace the free functions BraggIntegrate2D/ProfileIntegrate2D with the
BraggIntegrationEngine (CPU/GPU) as the live integrator.

- IndexAndRefine no longer holds the integrator: ProcessImage takes a
  per-worker BraggIntegrateFn callback (ProcessImage is called concurrently by
  the shared IndexAndRefine, so the stateful engine must not be a member).
- WithoutFPGA/jfjoch_process: owns a GPU engine when a GPU is present, else CPU,
  and passes the GPU-resident preprocessed buffer so integration runs on-device.
- AfterFPGA: forces CPU and integrates straight off the assembled CompressedImage
  via a templated per-pixel sampler - only the reflection-disk pixels are read,
  no whole-image copy (the FPGA host runs up to 36 GB/s). Sampler maps type
  min/max to INT32_MIN/INT32_MAX on read; special/saturation only, no +/-1 band.
- Remove BraggIntegrate2D/ProfileIntegrate2D and their test; keep IntegratorMode.

Prediction: buffer up to 20000 candidates but return the 10000 closest to the
Ewald sphere (deterministic partial_sort on |dist_ewald|, hkl tiebreak) instead
of the GPU atomic-fill order. Serialized output stays <=10000, so the frame
transport headroom and its CBOR guard are unchanged.

integration_model exposed via OpenAPI (bragg_integration_settings schema,
/config/bragg_integration PUT/GET, added to jfjoch_settings and jfjoch_statistics)
and the frontend (BraggIntegrationSettings dropdown). Regenerated C++/TS clients
and redoc.

Validated old-vs-new on all 18 /data/rotation_test crystals: indexing rate and
space group bit-identical; ISa/CC identical on 16/18 (one improved, EcwtAL500
ISa 0.0->6.7); new CompressedImage-vs-buffer and GPU-vs-CPU parity tests pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 14:35:20 +02:00
leonarski_fandClaude Fable 5 b8e0f3dbd9 Frontend: use a wind-power icon for the Streaming nav entry
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 13:56:44 +02:00
leonarski_fandClaude Fable 5 1d328f40c7 Frontend: use a switch-camera icon for the Detector selection nav entry
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 13:52:50 +02:00
leonarski_fandClaude Fable 5 5d913d1d59 Frontend: use a camera icon for the Detector nav entry
The Memory (CPU) icon didn't read as a detector; switch to PhotoCamera.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 13:51:09 +02:00
leonarski_fandClaude Fable 5 32c9e18950 Frontend: fix panels/preview overflow and Count time alignment
Dashboard: the Measurement statistics and Spot finding panels pinned
their Paper to an exact height matching the neighbouring plots, but
their content is taller, so rows spilled past the border. Use minHeight
so the box still aligns as a floor but grows to contain its content.

Live preview: the image Paper had minWidth 1200 (wider than its column
inside the 1300px main area), so it overflowed and overlapped the
settings panel; its fixed height 1250 also left a large empty area
below the image. Fill the column instead and centre the image.

Detector settings: the Count time row sat in an xs=8 column inside a
left-packed ListItem, shifting the field off-centre relative to the
other rows. Match the xs=1/10/1 layout and centre the switch + field.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 13:44:45 +02:00
leonarski_fandClaude Fable 5 03b5d906e8 CI: ship jfjoch_viewer to release as a Linux-agnostic .tgz
Add a build-viewer-tgz job on the oldest runner (RHEL 8) that builds
JFJOCH_VIEWER_ONLY with cuda12.9 and nocuda and uploads a self-contained
jfjoch_viewer-<version>-linux-{cuda<major>|cpu}.tgz to the release, mirroring
the Windows installer naming. CMake gains a Linux viewer-only CPack path that
emits a single TGZ instead of an RPM/DEB. Drop the per-distro viewer RPM/DEB
from the release uploads (writer + XDS plugin still go there); the viewer
packages continue to publish to the package repositories unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 13:10:42 +02:00
leonarski_fandClaude Opus 4.8 7d5fb15413 Unify still processing on one --force-still flag; scaling follows rotation indexing
Fold the two overlapping knobs into one. Rotation-vs-stills is now a single decision
(IsRotationIndexing() = goniometer && rotation-indexing) that drives BOTH indexing and
scaling/merging - there is no independent scaling-model switch:

- ScalingSettings: drop combine_3d and force_still_processing (and Combine3D/GetCombine3D,
  ForceStillProcessing/GetForceStillProcessing). The scaling stage reads
  experiment.IsRotationIndexing() instead - rotation indexing implies RotationScaleMerge,
  no rotation indexing implies per-image ScaleOnTheFly.
- jfjoch_process: merge --process-as-stills and --force-still-processing into one
  --force-still (turns rotation processing off entirely: still indexing + still scaling).
  The rotation-specific scaling defaults (scale-fulls, smooth-G, capture uncertainty,
  outlier rejection) now key on rotation_indexing.
- jfjoch_scale: replace -P fixed|rot3d with --force-still; rotation is auto-detected from the
  goniometer (RotationIndexing set accordingly) so it matches jfjoch_process.
- jfjoch_viewer: the "process as stills" toggle already sets RotationIndexing; drop the now
  redundant Combine3D/ForceStillProcessing calls.

Rotation path unchanged (lyso 16.4/99.6%/87.3%); --force-still routes to ScaleOnTheFly; the
-R + --force-still conflict still errors. CUDA + non-CUDA + viewer all build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 12:20:45 +02:00
leonarski_fandClaude Opus 4.8 b4d3d40cd8 Replace the dead PartialityModel with a force_still_processing flag
With ScaleOnTheFly now fixed-only and rotation routed through RotationScaleMerge, the
PartialityModel enum carried no information (it was always Rotation for rotation processing,
Fixed otherwise, and mirrored combine_3d). Drop it:

- ScalingSettings: `partiality_mode` (PartialityModel) -> `force_still_processing` (bool);
  SetPartialityModel/GetPartialityModel -> ForceStillProcessing/GetForceStillProcessing.
  Remove the enum.
- DiffractionExperiment: drop GetPartialityModel(); the rotation-vs-stills decision is now
  just GetCombine3D() (set by the tool = rotation && !force_still). The wedge getters no longer
  key off the model (dead since wedge refinement was removed).
- jfjoch_process: `-P/--partiality fixed|rot3d` -> `--force-still-processing` (a rotation
  dataset scaled as independent stills). Auto-detect sets combine_3d for rotation data unless
  the flag is given.
- jfjoch_scale: `-P fixed|rot3d` now toggles combine_3d directly (no PartialityModel).
- jfjoch_viewer: the "process as stills" toggle sets ForceStillProcessing(!rotation_mode) -
  UI unchanged, just wired to the new field.

PartialityModel was never in the OpenAPI, so no generated clients change. Rotation path
behaviour is unchanged (lyso 16.4/99.6%/87.3%); --force-still-processing correctly routes to
ScaleOnTheFly. CUDA + non-CUDA + viewer all build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:58:34 +02:00
leonarski_fandClaude Opus 4.8 9f45935fd3 Scale/merge: rotation -> RotationScaleMerge, stills -> ScaleOnTheFly (fixed)
Consolidate the offline scaling/merging on two engines and delete the old classic
rotation chain:

- ScaleOnTheFly now implements ONLY the fixed-partiality model: it uses each reflection's
  stored partiality as-is (1 for stills, the zeta/erf rocking-curve value already set at
  prediction for rotation). Dropped the Rotation partiality recompute, the unity override,
  the ceres rotation residual, and all wedge/mosaicity refinement.
- Remove Combine3D (CombineRotationObservations): its 3D-combine lives in RotationScaleMerge.
- JFJochProcess / jfjoch_scale: rotation (-P rot3d) goes through RotationScaleMerge for the
  whole self-scale -> 3D combine -> scale-fulls -> merge; stills self-scale with ScaleOnTheFly
  + MergeOnTheFly. RotationScaleMerge does not support external-reference scaling, B-factor
  refinement, an absorption surface or wedge refinement, so those combinations now throw
  instead of silently falling back. Deleted the classic ScaleFulls / AbsorptionSurface /
  SmoothImageScaleG helpers.
- CLI cleanup: drop -w/--wedge (wedge refinement) and --absorption (both tools), and the now
  dead -P values rot and unity (keep fixed | rot3d). Fix the -P round-trip in the reproduced
  command line.

Behaviour on the rotation path is unchanged: the full 18-crystal battery matches the
pre-cleanup metrics (SG/ISa/CC1.2/completeness) exactly on all 15 deterministic crystals.
Non-CUDA build unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:41:49 +02:00
leonarski_fandClaude Opus 4.8 fccf9b83e7 RotationScaleMerge: drop profiling + env gates, honour forced mosaicity
Remove the [rsm] per-stage lap timing and the JFJOCH_RSM_NO_GPU / JFJOCH_RSM_CPU_COMBINE
env gates now that the GPU-resident path is the validated default (it runs whenever a GPU
is present, with the CPU loops as the bit-parity fallback; the diagnostic-dump path still
uses the CPU combine).

Honour a fixed (forced) mosaicity: SmoothMosaicityAndPartiality now overrides every frame
with GetForcedMosaicity() when set, instead of always reading the per-frame integration
value - so the caller can route the --mosaicity case through RotationScaleMerge (its
partiality recompute makes it a natural fit) rather than a separate path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 11:41:31 +02:00
leonarski_fandClaude Opus 4.8 34b3c3c4e7 RotationScaleMerge: GPU merge + error-model reductions over the resident fulls
Port the four fulls-walking reductions of MergeAndStats to the GPU, over the fulls
group-CSR already resident from scale-fulls: the per-group inv-var mean + leverage-
corrected error-model samples, the merge accumulate (inv-var sums + deterministic
half-sets, error-model-corrected sigma, with outlier rejection), and R_meas + the
per-shell usable count. The host keeps the parts that don't parallelise cleanly or are
tiny: the I2-sort + 16-bin (a,b) median fit, the per-group reject median (a per-group
median is awkward on the GPU - cheap on the host from the GPU cnt), the merged export,
the shells and the gemmi completeness. Only per-group arrays (~55k) + the samples
(~n_fulls, for the fit) come back - the fulls are not re-walked on the host.

Device HalfForImage (splitmix64) + IceRingIndex mirror the host; the corrected-sigma
uses (b*I_for_b)^2 (not b^2*I^2) to match the host rounding; the R_meas usable count
requires finite d (the host counts only fulls with a valid shell, and a group's fulls
share d, so the shell is assigned per group). Gated on fulls_resident (GPU
combine+scale-fulls active); reject is fully supported so it runs for the default
rot3d command.

merge+stats ~0.49 -> ~0.37s, taking RSM on lyso to ~0.78s (was ~0.91). Validated across
the battery: 15/15 deterministic crystals bit-identical to the CPU path (SG / ISa /
CC1.2 / completeness / total-obs, and the exact outlier-reject count), only EP_cs_01-24
noise wobbles. The em-sort + a,b fit are the remaining host floor. Non-CUDA build
unaffected (use_gpu_merge is always false there).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 10:38:36 +02:00
leonarski_fandClaude Opus 4.8 786edf9929 RotationScaleMerge: GPU smooth-G, corr kept resident across the pass
Apply smooth-G's corr adjustment on the device (a small kernel: corr[i] *=
ratio[frame[i]] for flagged frames, double-then-float, matching host SmoothG) so the
per-image corr never leaves the GPU: it now stays resident through scaling ->
smooth-G -> per-frame CC -> combine, and across the two space-group passes exactly as
the old host round-trip did. The host only builds the tiny per-frame ratio (g/g_smooth
via the extracted ComputeSmoothGWindow) and refreshes host partials[].corr solely for
the CPU-combine path (JFJOCH_RSM_CPU_COMBINE or the diagnostic dump).

This drops the post-scale GetCorr and the two SetCorr re-uploads (~3x25MB/pass) plus the
6.3M host corr-adjust loop: scale-partials ~0.21->~0.10s and the smooth+combine region
shrinks, taking RSM on lyso to ~0.91s (was ~1.47s with phase-1-only, ~1.71s full-CPU) -
under the 1s target for this crystal; merge+stats (~0.49s) is now the dominant chunk.

Bit-identical (GPU smooth-G == host SmoothG on the resident corr); validated across the
battery (15/15 deterministic crystals bit-identical to CPU across default / CPU-combine /
NO_GPU, only EP_cs_01-24 noise wobbles). Non-CUDA build unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 09:49:31 +02:00
leonarski_fandClaude Opus 4.8 87c70195f8 RotationScaleMerge: faster group-hkl via flat group ids + skip Obs stamp
Profiling showed the per-space-group "group hkl" step (~0.30s/2-pass on lyso) is not
gemmi-bound (the ASU keying is ~6ms) but memory-bandwidth-bound: stamping the group id
onto, and reading it back from, the `group` field scattered across the 56-byte Obs
struct touches the whole ~350MB partials array twice per pass.

Precompute the per-obs AcceptReflection finiteness once (immutable) into a flat 1-byte
array, then stamp the ASU-group id from rawrun_group + that flat array into a flat
group_ids vector for the GPU, and build the group CSR (a stable counting sort, now
parallel) from group_ids - all sequential/flat reads. The Obs.group field is written
only when a CPU stage will read it (no GPU: scaling/CC/combine otherwise use
group_ids / rawrun_group, never partials.group), so the default path skips the strided
Obs pass entirely. group hkl ~0.31 -> ~0.20 s/2-pass on lyso.

Output is bit-identical (group_ids values and the obs-index-ordered gperm are unchanged),
so the merged results are unchanged; validated across the battery (15/15 deterministic
crystals bit-identical to the CPU path, only EP_cs_01-24 noise keeps its benign wobble).
Non-CUDA build unaffected (need_obs_group is always true there).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 09:25:31 +02:00
leonarski_fandClaude Opus 4.8 7d804eb799 RotationScaleMerge: GPU post-smooth group means + per-frame CC
The single-threaded ReduceGroupMeans over the 6.3M partials (~0.07s/2-pass) and the
per-frame diagnostic CC now run on the resident partials on the GPU: after SmoothG,
the smoothed corr is uploaded once (and left resident for the combine, dropping the
combine's redundant re-upload), then the post-smooth group means (reusing the scaling
reduce) and the per-frame Pearson CC (a new one-block-per-frame kernel) run there and
only the tiny per-frame cc/cc_n come back. FinalizePerFrameScale is split into
ComputePerFrameCC (host reference) + the writeback; the GPU path uses ComputePartialCC.

The per-frame CC is diagnostic only (the per-image scaling table), so the tree
reduction's ~ulp difference from the CPU is immaterial and it does not touch merged
intensities. smooth+CC region ~0.10s GPU vs ~0.15s CPU on lyso. Validated across the
battery: 15/15 deterministic crystals run-to-run deterministic and merged output
bit-identical to the CPU path (only EP_cs_01-24, unindexable noise, keeps its benign
error-model-b wobble). CPU fallbacks (JFJOCH_RSM_CPU_COMBINE / _NO_GPU) unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 08:58:26 +02:00
leonarski_fandClaude Opus 4.8 617184041f RotationScaleMerge: enable GPU combine + scale-fulls by default
Steps 1-2 (GPU 3D-combine + resident scale-fulls) are validated bit-parity and
run-to-run deterministic against the CPU path across the rotation battery, and cut
the combine+scale-fulls region from ~0.46s to ~0.32s on lyso, so make them the
default when a GPU is present (consistent with phase-1 partial scaling already being
default-on). JFJOCH_RSM_CPU_COMBINE forces the CPU combine/scale-fulls for A/B or
debugging; JFJOCH_RSM_NO_GPU still disables the whole GPU path.

The only battery crystal whose reported metrics move is EP_cs_01-24 (CC1/2 2%,
unindexable noise) whose upstream integration is itself nondeterministic; its merged
intensities/CC/completeness are unchanged, only the ill-conditioned error-model b.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 08:35:23 +02:00
leonarski_fandClaude Opus 4.8 ced85bcd9d RotationScaleMerge: GPU scale-fulls, fulls kept resident (phase 2 step 2)
Scale the combined fulls (Unity model) on the device so they no longer round-trip
between the combine and the merge: after the GPU combine, build the fulls' per-frame
and per-ASU-group CSRs on the host from just the small key arrays (f_frame/f_group)
with a deterministic counting sort - no GPU stable-sort - then scale in place and
download once.

The four scaling kernels are reused unchanged except FitPerFrameGKernel, which gains
an optional `perm` argument (null for the partials, whose arrays are already
frame-contiguous; a frame-grouping permutation for the emit-ordered fulls) so the
fulls are scaled without a physical reorder. The Unity model falls out of giving the
fulls all-ones partiality/rlp/zeta (coeff = mean), so no other kernel changes and the
committed phase-1 partial-scaling path is bit-identical (perm == null -> idx == i).

Validated across the rotation battery (JFJOCH_RSM_GPU_COMBINE=1): all 15 deterministic
crystals stay run-to-run deterministic and their merged output is bit-identical to the
CPU path (SG/ISa/CC1.2/completeness). The lone exception is EP_cs_01-24 (CC1/2 2%,
R_meas 379% - unindexable noise): merged intensities/CC/completeness match exactly, but
the ill-conditioned 16-bin error-model b fit amplifies the ~1e-7 scale-fulls rounding
to ISa 10.6 vs 10.8 - benign, same class as the accepted phase-1 GPU rounding. The 3
upstream-nondeterministic crystals vary as before (GPU-prediction overflow, not this).

Scale-fulls drops from ~0.09s to ~0 across the two passes; combine+scale-fulls region
~0.32s GPU vs ~0.46s CPU on lyso. Still opt-in (fulls are downloaded for the host merge;
the win grows once the merge/error-model also stay resident).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 07:51:29 +02:00
leonarski_fandClaude Opus 4.8 2c928b27cd RotationScaleMerge: GPU 3D-combine (CUDA port, phase 2 step 1)
Port Combine() (partials->fulls) to CUDA, mirroring process_rawrun bit-for-bit:
one thread per raw-hkl run splits its usable partials into rocking events (frame
gap <= 2), pools background, seeds F, runs 3 de-biased Poisson reweights and the
capture-uncertainty term. Emission is deterministic - a count pass, a host
exclusive prefix sum for per-run offsets, then an emit pass at those offsets - so
fulls come out in raw-run-major/event order, identical to the CPU path; both pass
instantiations share the same arithmetic so count == emit exactly. Dmax/Dmin/Fmax
reproduce std::max/min NaN semantics (not fmax) for parity.

Validated across the 18-crystal rotation battery: all 15 deterministic crystals
(P1/P2/C2/H3/I23/P41212/P222/P422) match the CPU combine exactly on SG/ISa/CC1.2/
completeness and run-to-run (fulls count bit-identical); the 3 upstream-nondet
crystals vary from GPU-prediction overflow, not the combine.

Gated opt-in behind JFJOCH_RSM_GPU_COMBINE (default = CPU combine): combine alone
is timing-neutral because the shared 1.2M SortFullsByFrame std::sort dominates and
the fulls round-trip adds a copy - it only pays off once the fulls stay resident
for scale-fulls + merge. Also add JFJOCH_RSM_NO_GPU master switch to force the CPU
fallback (incl. phase-1 scaling) from one binary for A/B parity. SortFullsByFrame
extracted from the Combine tail and shared by both paths.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 07:27:33 +02:00
leonarski_fandClaude Opus 4.8 dd25de461d RotationScaleMerge: GPU partial-scaling loop (CUDA port, phase 1)
First stage of moving the rotation scale/merge onto the GPU. The per-frame partial-scaling loop
(inverse-variance group-mean reduction -> robust per-frame IRLS G -> corr update, x scaling_iter)
now runs in RotationScaleMergeGPU (.cu) when a GPU is present; the CPU loops remain the fallback.

The host keeps the one-time raw-hkl sort and the per-space-group gemmi ASU keying, and hands the
GPU a group-ordered permutation + CSR so the per-group reduction is a DETERMINISTIC segmented
reduction (one thread per group, fixed order, no atomics) - preserving the run-to-run determinism
just won on the CPU path (a float atomicAdd reduction would have re-introduced jitter). Reduction is
one-thread-per-group (groups average tens of obs, so a block-per-group wastes threads); the IRLS is
one block per frame with a deterministic shared-memory reduction.

Validated: bit-identical to the CPU path and deterministic run-to-run on lyso/cytC/Ins_H/pding
(P41212 ISa 7.8 CC1/2 99.7%, etc.). The scaling kernels are ~7x faster than the CPU compute
(~36 ms for 3 iters vs ~0.28 s); end-to-end scale/merge ~2.0 -> ~1.5 s. The remaining gap to the
<1 s target is the per-pass host round-trip (corr down/upload for the CPU combine + per-SG group-CSR
rebuild); phase 2 keeps the data resident by moving the 3D combine and the merge/error-model onto
the GPU too, so nothing round-trips.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 22:26:29 +02:00
leonarski_fandClaude Opus 4.8 29c8ba6112 rotation: deterministic frame-order mosaicity smoothing + partiality recompute
Prediction applied a mosaicity/profile-radius moving average (RotationParameters) over the
last N *processed* frames. Under the parallel per-image loop that window is thread-arrival
order, so the smoothed value - and hence which reflections are predicted/integrated - was
non-deterministic run-to-run, swinging CC1/2 (and even the space group) on marginal crystals.
`-N 1` was deterministic; `-N 32` was not.

Fix (as designed with FL): prediction now uses each frame's OWN mosaicity/profile-radius
(image-local, deterministic membership - a reflection on the cutoff contributes ~nothing).
The smoothing that actually matters is moved into RotationScaleMerge and done in FRAME order
(deterministic): per-frame mosaicity is smoothed with the same window as smooth-G, then every
partial's partiality is recomputed from it BEFORE the 3D combine. This is the mosaicity analogue
of smooth-G: combining a reflection's per-frame partials only tiles the rocking curve correctly
(captured fractions summing toward 1) if neighbouring frames share a consistent mosaicity.

Battery (18 crystals, /data/rotation_test, 2 runs each): 15/18 now bit-identical run-to-run
(the good crystals unchanged - lyso P41212 ISa 7.8 CC1/2 99.7%). The 3 residual crystals
(EcwtAL500, EcwtCQ066S, pding4_003 - all large/triclinic cells) still jitter ~0.002%, traced
to a SEPARATE, benign cause: the GPU prediction buffer overflow (BraggPredictionRotGPU
max_reflections=10000 with a racy atomicAdd/atomicSub) on dense frames - cell/space group stay
stable; to be addressed in the GPU prediction/integration rework (naively raising the cap also
changes prediction quality, so it is not a one-line bump). Minor label refinements from the
recomputed partiality: cytC_2 P321 -> P3121 (now consistent with cytC_3), Ins_I_2/3 report the
honest I23/I213 screw-axis ambiguity.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 21:58:10 +02:00
leonarski_fandClaude Opus 4.8 b5d9167bf4 RotationScaleMerge: chunked parallelism -> scale/merge phase ~2s
The per-observation corr update (7.6M items) ran through a work-stealing ParallelFor that
does one atomic fetch_add PER item - pure contention for trivial work (measured: update 0.60s
vs reduce 0.15s / fit 0.13s in the scale-partials loop). Add ParallelChunks (one contiguous
range per worker, no per-item sync) and use it for UpdateCorr, and parallelise the ASU keying
(gemmi reduction per distinct raw hkl - HKLKeyGenerator is const, safe to read concurrently)
and the group-stamping over disjoint raw-hkl runs.

scale-partials 0.90 -> 0.28s, group-hkl 0.20 -> 0.09s, per-pass warm 0.83s, whole scale/merge
phase ~3.3 -> ~2.0s. Bit-identical output (same space group, ISa, CC1/2). ParallelChunks is
the CPU stand-in for a flat CUDA grid-stride kernel; ParallelFor stays for the heavy, uneven
per-frame fits where the atomic amortises and work-stealing balances the load.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 21:31:41 +02:00
leonarski_fandClaude Opus 4.8 29c5410328 rotation scaling: dedicated allocate-once RotationScaleMerge, ~3.4x faster scale/merge
The rot3d post-pass (scale -> smooth-G -> 3D combine -> scale-fulls -> merge ->
error model -> stats) dominated offline wall clock because ScaleOnTheFly + MergeAll
+ CombineRotationObservations + MergeOnTheFly rebuild a std::map keyed by hkl on every
scaling iteration and every merge (7-14 map rebuilds per space-group pass), each re-walking
and re-keying millions of per-frame partials.

RotationScaleMerge ingests the per-frame partials ONCE into flat vectors and reuses them
across both space-group passes: the raw-hkl ordering is sorted a single time at ingest, so
the per-pass 3D combine only re-splits events (no sort) and the ASU grouping is one gemmi
reduction per distinct raw hkl (~10x fewer) rather than per observation, reusing that order.
Every hot step is a flat loop (segmented reduction + per-frame robust IRLS + parallel
per-run combine) that also maps directly onto CUDA kernels. CC1/2 and the per-image CC are
computed once at the end, not every iteration.

It is a distinct path from ScaleOnTheFly, used only for the self-scaling rotation case
(Rotation partiality + combine3d, per-image G, no B refinement, no external reference, no
absorption surface, no wedge/mosaicity override). Stills, B-factor refinement, reference
scaling and the absorption surface stay on the classic path.

Numerically equivalent to the classic path (same robust per-frame G, same 3D combine, same
XDS-order scale-fulls, same global error model, same merge statistics), validated on the
18-crystal /data/rotation_test battery: 16/18 bit-identical in space group / ISa / CC1/2;
the 2 differing crystals are ice-heavy / marginal ones on which the classic path is equally
non-deterministic run-to-run (a pre-existing upstream integration race). Scale/merge wall
time drops ~3.4x (median 9.8 -> 4.1 s), making higher --scaling-iterations cheap.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 21:00:12 +02:00
leonarski_fandClaude Opus 4.8 711216e116 scan_result: short "ice" field + global Bravais lattice type
Two per-object scan_result API tweaks (C++ internal names unchanged):

- Rename the per-image scan_result field ice_ring_score -> ice (it is
  serialized once per image, so keep it short). Only the OpenAPI property and
  its regenerated C++/TS clients change; the DataMessage/EndMessage/CBOR/HDF5
  field stays ice_ring_score, and the ice_ring_score plot_type enum is untouched.

- Add a global rotation_bravais string (crystal-system letter + centering, e.g.
  "tP", "cF", "hR") to scan_result, alongside rotation_unit_cell /
  rotation_crystal_lattice. It comes from the RotationIndexer result
  (LatticeSearchResult system+centering) via the receiver, formatted by a new
  BravaisSymbol() helper in ScanResult.h.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 21:00:12 +02:00
leonarski_fandClaude Opus 4.8 ddddfb6ffc bragg_integration: GPU box + profile-fit integrator (standalone engine)
Build Packages / build:windows:nocuda (pull_request) Successful in 14m41s
Build Packages / build:windows:cuda (pull_request) Successful in 16m48s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 11m15s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 12m46s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 12m38s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 13m11s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 12m20s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 12m22s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 11m7s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 11m55s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 12m56s
Build Packages / Generate python client (pull_request) Successful in 14s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 13m15s
Build Packages / Create release (pull_request) Skipped
Build Packages / Build documentation (pull_request) Successful in 41s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 10m3s
Build Packages / DIALS test (pull_request) Successful in 13m6s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 6m58s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m30s
Build Packages / Unit tests (pull_request) Successful in 58m5s
Build Packages / Unit tests (push) Successful in 1h12m36s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m52s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m35s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m29s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m35s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m25s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 16m5s
Build Packages / build:rpm (rocky8) (push) Successful in 15m11s
Build Packages / build:rpm (rocky9) (push) Successful in 13m35s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m59s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m14s
Build Packages / DIALS test (push) Successful in 14m29s
Build Packages / XDS test (durin plugin) (push) Successful in 9m56s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 10m23s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m3s
Build Packages / Generate python client (push) Successful in 20s
Build Packages / Build documentation (push) Successful in 1m10s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 16m39s
Build Packages / build:windows:cuda (push) Successful in 18m40s
Reimplement BraggIntegrate2D (box sum) and ProfileIntegrate2D (Kabsch
profile fit) under one roof as a base + CPU + GPU engine, mirroring the
AzIntEngine / ROIIntegration pattern. Reads the preprocessed int32
ImagePreprocessorBuffer (masked=INT32_MIN, saturated=INT32_MAX), the same
buffer AzIntEngineGPU/ROIIntegrationGPU consume.

The CUDA engine runs one block per reflection with shared-memory
reductions across six kernels (reset, mask, box-sum, profile learning,
profile build, Kabsch fit); the resolution shell is computed inline. The
learning/fit hot path is single precision (FP64 is throttled on consumer
GPUs; reproduces the double CPU path to ~1e-4). Collapsing the per-frame
CUDA API calls into one reset kernel keeps launch-latency overhead low.

Standalone for now: NOT wired into IndexAndRefine. See
BRAGG_INTEGRATION_ENGINE.md for the design and the binding steps.
BraggIntegrationEngineGPUTest checks GPU == CPU across all three modes
(box/gaussian/empirical) within numeric tolerance, plus a [bragg_bench]
perf sweep.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 20:59:45 +02:00
leonarski_fandClaude Fable 5 347228d008 jfjoch_process: azimuthal-integration CLI + default 0.01 1/A q-spacing
Build Packages / build:windows:nocuda (pull_request) Successful in 14m25s
Build Packages / build:windows:cuda (pull_request) Successful in 16m48s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 12m0s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 11m27s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 12m24s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 11m13s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 12m9s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 12m25s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 11m8s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 10m48s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 8m44s
Build Packages / Generate python client (pull_request) Successful in 13s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 11m57s
Build Packages / Create release (pull_request) Skipped
Build Packages / Build documentation (pull_request) Successful in 43s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 11m54s
Build Packages / DIALS test (pull_request) Successful in 13m47s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 6m15s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 6m51s
Build Packages / Unit tests (pull_request) Successful in 59m10s
Build Packages / Unit tests (push) Successful in 1h13m8s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m54s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m28s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m20s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m11s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 16m0s
Build Packages / build:rpm (rocky8) (push) Successful in 15m14s
Build Packages / build:rpm (rocky9) (push) Successful in 13m20s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m37s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m1s
Build Packages / DIALS test (push) Successful in 12m23s
Build Packages / XDS test (durin plugin) (push) Successful in 8m1s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m16s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m57s
Build Packages / Generate python client (push) Successful in 27s
Build Packages / Build documentation (push) Successful in 1m36s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 15m25s
Build Packages / build:windows:cuda (push) Successful in 17m38s
Add -q/--azim-q-spacing, --azim-min-q, --azim-max-q, --azim-phi-bins (mirroring
jfjoch_azint) so offline processing can set the radial binning, applied before
the azint mapping is built. Set the AzimuthalIntegrationSettings default spacing
to 0.01 1/A (was 0.05): the coarse default barely resolved the narrow ice rings,
diluting the ice-ring score. Finer binning sharpens it a lot with no effect on
processing - EP_cs_01-17 ice score 4.6->7.3 (max 11->23), clean cytC stays ~1.0,
and space group / cell / ISa / completeness are unchanged (cytC, InsI3, MyoB,
pding4_001 verified full-image). Documented in JFJOCH_PROCESS.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 17:24:05 +02:00
leonarski_fandClaude Fable 5 5737d2e1d0 ice score: measure against a smooth whole-profile background, not shoulders
The score's baseline was two adjacent shoulder bins with a bin-overlap bug - the
ring's edge bins were counted in both the ring and the shoulder, since
GetMeanValueOfBins is inclusive. At the typical (coarse) azint binning (dq ~ 0.05
in q, wider than the 0.03 ring half-width) a shoulder is only ~1 bin, so the ratio
was noisy and poorly separated. Replace it with the ring intensity over a smooth
whole-profile background: a running median of the non-ice bins, interpolated under
each ring.

Clean crystals now sit at ~1.0 and ice separates far more cleanly on
/data/rotation_test: cytC 1.06->1.03, lysoC 1.23->2.77, EP_cs_01-17 1.67->4.51
(max 11.4). A z-score / abnormality probability was tried but is uninformative
here - with many photons any real ice ring is highly significant, so the useful
discriminator is the ice magnitude (this ratio), noted in CPU_DATA_ANALYSIS.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 17:05:39 +02:00
leonarski_fandClaude Fable 5 65c7eb6366 docs: complete the per-image-quantity recipe with the HDF5 read-back path
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:43:02 +02:00
leonarski_fandClaude Fable 5 0399d1799d ice score: read back from stored HDF5 (viewer) + write to the NXmx master
The per-image ice_ring_score was written to the data files (HDF5DataFilePluginMX)
but the master-file write and the stored-file read path were missing, so opening a
processed HDF5 (e.g. in jfjoch_viewer) would not surface it. Mirror bkg_estimate:
write /entry/MX/iceRingScore in the NXmx master (HDF5NXmx, from EndMessage), and
read it back in HDF5MetadataSource into the dataset (master + data-file reads) and
per image into the message. Verified the write; the read is a byte-for-byte mirror
of the working bkgEstimate round-trip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:42:17 +02:00
leonarski_fandClaude Fable 5 f422988cd2 ice score: per-image ice-ring indicator plumbed through all layers
A single per-image ice_ring_score - the strongest hexagonal-ice ring band/shoulder
intensity ratio from the azimuthal profile (1 = no ice) - computed in the CPU and
FPGA analysis paths and the offline azint worker, then plumbed through every layer:
DataMessage/EndMessage, CBOR (frame_serialize), HDF5 (/entry/MX/iceRingScore),
ScanResult, receiver plots (PlotType::IceRingScore), the OpenAPI spec (plot_type +
scan_result schema, with regenerated broker/gen and frontend client) and
OpenAPIConvert, the reader + Qt viewer, and the React frontend plot. Documented in
docs/CBOR.md, docs/HDF5.md and docs/CPU_DATA_ANALYSIS.md, with the general
"add a per-image quantity" recipe added to CLAUDE.md.

Verified in HDF5: lysoC (weak ice) mean 1.23, EP_cs_01-17 (heavy ice) mean 1.67 /
max 2.23. This is a monitoring quantity - it does not gate scaling (which already
excludes all ice rings) or merging (handled by the CC1/2 ring mask).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:37:12 +02:00
leonarski_fandClaude Fable 5 6ffb16f142 merge: mask ice rings whose CC1/2 collapses below their resolution neighbours
An ice-contaminated ring decorrelates its reflections, so its merged half-set
CC1/2 falls well below the Bragg trend of its resolution shoulders (e.g.
EP_cs_01-17 2.25A ring CC1/2 0.12 vs shoulders 0.89). After the final merge,
compute per-hexagonal-ice-ring CC1/2 in the ring band (+/- ice width in q=2pi/d)
against the shoulders either side, mask any ring more than 0.05 below its
shoulders (reliable shoulder CC1/2 > 0.5, >=20 reflections each) and re-merge
without them. Weak/absent rings track their neighbours and stay, so clean
crystals are untouched.

Data-driven and robust on /data/rotation_test: 16/18 crystals mask nothing and
are unchanged (every clean crystal, plus icy-but-fine EP_cs_02-10); EP_cs_01-17
masks 6 rings, CC1/2 6.9% -> 28%; CQ066/pding4_003 mask one marginal ring each.
A well-scaled CC1/2 test, replacing the fragile per-image azimuthal cutoffs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:06:39 +02:00
leonarski_fandClaude Fable 5 cdbd0bed5d partiality: fix the rotation-prediction wedge, use the stored value in scaling
BraggPredictionRot halves settings.wedge_deg to the +/- half-wedge of the
partiality erf pair, but IndexAndRefine already passed GetWedge_deg()/2, so the
two /2 compounded to a half-wedge of increment/4 - half the correct Kabsch value
(increment/2, which ScaleOnTheFly's RotationPartiality already used). Pass the
full increment so prediction's partiality matches scaling.

With prediction correct, ScaleOnTheFly now uses the stored r.partiality directly
(the value the reflection was integrated with) rather than recomputing the erf
pair per reflection - recomputing only when scaling overrides the geometry
(-w wedge refinement, --mosaicity, or a scaling wedge override). Output-neutral
on the /data/rotation_test battery (SG/cell/completeness identical, ISa/CC1/2
within run noise on the stable crystals).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 14:57:16 +02:00
leonarski_fandClaude Fable 5 8c084021e6 ice rings: exclude from scaling, keep in the final merge (recover completeness)
--detect-ice-rings previously dropped ice-ring reflections outright before
scaling, which also removed them from the merge and gutted low/mid-resolution
completeness on crystals that merge them fine (e.g. lysoC 80% -> the ice bands
show as jagged shell completeness). Instead flag them (new Reflection.on_ice_ring,
set in JFJochProcess, carried through the 3D combine) and exclude the flag only
where a model is fit: the per-image scale (ScaleOnTheFly::Accept + the per-image
CC), and - for the de-novo P1 pass - the space-group search and error model
(MergeOnTheFly::ExcludeIceRings, on for for_search). The final in-symmetry merge
and its statistics keep them, so completeness is preserved.

/data/rotation_test battery vs the previous drop-from-merge behaviour: space
group correct on all 18; completeness recovered broadly with CC1/2 and ISa held
(cytC_2 82->99.7%, cytC_3 73->99.7%, InsI3 76->99.5%, lysoC 80->99.7%, MyoB
80->99.7%, InsH3 78->99%). Excluding ice from the P1 search merge is what keeps
the space group correct: without it InsI3 flipped I23->P1 and EP_cs_01-17 P2->P1.

Known limitation: on heavy-ice crystals (EP_cs_01-17) the strong ice is garbage
and keeping it in the final merge collapses CC1/2 in the ice shells (91.7->6.9%).
Distinguishing strong vs weak/absent rings per crystal needs data-driven,
per-ring ice detection (azimuthal radial profile) - the planned next step.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 14:29:37 +02:00
leonarski_fandClaude Fable 5 1ca5a69054 ScaleOnTheFly: solve the per-image scale by IRLS instead of Ceres
In the default rotation (rot3d) path only G is refined - B is fixed, mosaicity
is pinned and the wedge is not refined - so the predicted intensity G*coeff is
linear in G and the robust (Cauchy) per-image scale is a 1-D M-estimate. Solve
it directly by iteratively reweighted least squares (a few closed-form weighted
ratios) instead of building a Ceres problem per image. Ceres is kept for the
cases that are genuinely nonlinear: refining the B-factor or the rotation wedge.

Same Cauchy objective as the Ceres path, but ~4x faster at scaling and ~30%
faster overall on the /data/rotation_test battery, with space group, cell, ISa,
completeness and CC1/2 matching across all 18 crystals (the two that look
different, EP_cs_01-17 and EcwtAL500, are run-to-run unstable for both solvers).
lyso_ref scaling 25.2->4.3s, cytC_2 15.2->2.6s, battery total 468->316s.

Also drop the per-image G/B regularizers (gated by GetScalingRegularize, which
nothing enables) and the now-unused RegularizationResidual.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:55:04 +02:00
leonarski_fandClaude Fable 5 5c9175688a jfjoch_process: let --detect-ice-rings=on|off override the dataset
The master file's detectorSpecific/detect_ice_rings key is read back by
HDF5MetadataSource onto the experiment, so a dataset collected with ice-ring
detection on was reprocessed with exclusion forced on (dropping ~9% of
reflections, gutting low/mid-res completeness on clean crystals) and
jfjoch_process had no way to turn it off. Make --detect-ice-rings an
optional<bool> taking =on|off (bare = on, back-compatible) and apply it
after the dataset value is copied in, so an explicit CLI choice wins.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:18:09 +02:00
leonarski_fandClaude Opus 4.8 ed9f6ac9eb integration: remove --reciprocal-profile (proven per-frame dead-end)
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m21s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 15m0s
Build Packages / build:rpm (rocky8) (push) Successful in 14m56s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m9s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m19s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m28s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m58s
Build Packages / build:windows:nocuda (push) Successful in 16m12s
Build Packages / build:windows:cuda (push) Successful in 18m22s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m52s
Build Packages / XDS test (durin plugin) (push) Successful in 8m8s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m10s
Build Packages / Build documentation (push) Successful in 1m3s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m42s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m25s
Build Packages / build:rpm (rocky9) (push) Successful in 13m12s
Build Packages / DIALS test (push) Successful in 13m48s
Build Packages / Unit tests (push) Successful in 1h16m3s
Build Packages / Unit tests (pull_request) Successful in 56m24s
Build Packages / build:windows:cuda (pull_request) Successful in 11m16s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 9m55s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 10m45s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 11m17s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 10m15s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 11m5s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 11m57s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 10m48s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 12m13s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 11m22s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m34s
Build Packages / DIALS test (pull_request) Successful in 12m24s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 8m45s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m23s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 6m1s
Build Packages / Generate python client (pull_request) Successful in 13s
Build Packages / Build documentation (pull_request) Successful in 47s
Build Packages / Create release (pull_request) Skipped
Build Packages / build:windows:nocuda (pull_request) Successful in 10m4s
An 11-crystal mosaicity-stratified re-test (/data/rotation_test, off vs on
vs a de-contaminated variant, plus a per-frame dump of the fitted widths)
showed the dial is net-negative and cannot work in the per-frame paradigm:

- The C|q|^2 mosaicity term - the whole point - is unfittable per-frame: the
  fitted curvature a2 comes out ~0 (often negative) on every crystal, with zero
  correlation to the XDS mosaicity (0.09..0.42 deg). Strong spots sit at low q
  where eta^2 q^2 is invisible; the curvature only appears at high q where there
  are ~0 strong spots. The law degenerates to a straight line.
- With a2~0 the high-res width becomes a blind 1/cos^2(2theta) extrapolation,
  2-4x wider than per-shell. The per-shell path's high-res "starvation" (flat
  narrow fallback) is accidentally correct: weak, crowded high-res spots want a
  narrow aperture, not the true wide spot shape.
- The over-wide profile pulls background into weak spots -> R-meas rises, CC1/2
  drops in reliable high-multiplicity shells (pding4_001, pding4_003, MyoB,
  EcwtCQ066). A cap at the widest well-sampled per-shell width recovers the
  regression, confirming over-widening is the harm. No crystal reliably wins;
  the apparent overall-CC gains were all in noise shells (mult 2-3, CC<20%).

Delete the CLI flag, the BraggIntegrationSettings::reciprocal_profile setting,
and the per-frame fit block. Default (per-shell) integration is byte-identical.
NEXTGEN_INTEGRATOR.md records the finding as a dead-end for posterity.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-02 11:39:09 +02:00
leonarski_fandClaude Fable 5 7e3ad84a5b jfjoch_process/scale: default to mmCIF, auto-detect rotation, rot3d partiality
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m31s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 15m1s
Build Packages / build:rpm (rocky8) (push) Successful in 14m56s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m10s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m16s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m14s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m49s
Build Packages / build:windows:nocuda (push) Successful in 15m5s
Build Packages / build:windows:cuda (push) Successful in 17m15s
Build Packages / XDS test (durin plugin) (push) Successful in 8m51s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m12s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m14s
Build Packages / Build documentation (push) Successful in 1m5s
Build Packages / build:windows:nocuda (pull_request) Successful in 9m29s
Build Packages / build:rpm (rocky9) (push) Successful in 13m8s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m44s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m56s
Build Packages / DIALS test (push) Successful in 13m57s
Build Packages / build:windows:cuda (pull_request) Successful in 16m22s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 10m19s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 10m45s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 13m23s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 11m55s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 11m55s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 12m40s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 10m46s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 11m3s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 11m48s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 12m57s
Build Packages / Generate python client (pull_request) Successful in 17s
Build Packages / Create release (pull_request) Skipped
Build Packages / XDS test (durin plugin) (pull_request) Successful in 9m11s
Build Packages / Build documentation (pull_request) Successful in 46s
Build Packages / DIALS test (pull_request) Successful in 12m41s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 7m36s
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 5m42s
Build Packages / Unit tests (push) Successful in 1h11m43s
Build Packages / Unit tests (pull_request) Successful in 57m54s
- Default reflection format is now mmCIF (ScalingSettings.h, the single source of
  truth). jfjoch_process and jfjoch_scale no longer hard-code a local MTZ default;
  they override only when --scaling-output is given. jfjoch_viewer inherits this.
- A dataset with a rotation goniometer axis is processed as rotation data (two-pass
  indexing) by default; add --process-as-stills to force per-frame stills. -R still
  tunes the first-pass image count.
- rot3d is the default partiality model for rotation processing (fixed for stills)
  when no explicit -P is given.
- Update docs/JFJOCH_PROCESS.md: new de-novo rotation/stills examples, corrected
  -R/-P/--scaling-output defaults, --process-as-stills, and a real Integration table.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 08:34:50 +02:00
leonarski_fandClaude Opus 4.8 4b393082d4 ci: drop requests dependency and use PowerShell for the Windows release upload
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m29s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m26s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m39s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m48s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m6s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m8s
Build Packages / build:windows:nocuda (push) Successful in 14m26s
Build Packages / build:windows:cuda (push) Successful in 17m26s
Build Packages / XDS test (durin plugin) (push) Successful in 7m20s
Build Packages / build:rpm (rocky8) (push) Successful in 11m40s
Build Packages / build:windows:nocuda (pull_request) Successful in 9m34s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m18s
Build Packages / Generate python client (push) Successful in 17s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m58s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 1m8s
Build Packages / build:rpm (rocky9) (push) Successful in 13m19s
Build Packages / DIALS test (push) Successful in 13m23s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m32s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m16s
Build Packages / build:windows:cuda (pull_request) Successful in 16m40s
Build Packages / build:rpm (ubuntu2204_nocuda) (pull_request) Successful in 9m55s
Build Packages / build:rpm (rocky8_nocuda) (pull_request) Successful in 10m55s
Build Packages / build:rpm (rocky9_nocuda) (pull_request) Successful in 11m12s
Build Packages / build:rpm (ubuntu2404_nocuda) (pull_request) Successful in 9m35s
Build Packages / build:rpm (rocky8_sls9) (pull_request) Successful in 10m36s
Build Packages / build:rpm (ubuntu2204) (pull_request) Successful in 9m58s
Build Packages / build:rpm (rocky8) (pull_request) Successful in 11m15s
Build Packages / build:rpm (rocky9_sls9) (pull_request) Successful in 12m7s
Build Packages / build:rpm (rocky9) (pull_request) Successful in 11m42s
Build Packages / build:rpm (ubuntu2404) (pull_request) Successful in 10m21s
Build Packages / Generate python client (pull_request) Successful in 25s
Build Packages / Build documentation (pull_request) Successful in 57s
Build Packages / Create release (pull_request) Skipped
Build Packages / XDS test (neggia plugin) (pull_request) Successful in 6m12s
Build Packages / XDS test (durin plugin) (pull_request) Successful in 7m24s
Build Packages / XDS test (JFJoch plugin) (pull_request) Successful in 6m58s
Build Packages / DIALS test (pull_request) Successful in 10m41s
Build Packages / Unit tests (push) Successful in 1h11m21s
Build Packages / Unit tests (pull_request) Successful in 58m33s
The Windows viewer runner has Python but not the 'requests' package, and does
not necessarily have bash. So:
- rewrite gitea_upload_file.py to use only the Python stdlib (urllib), which
  works with a bare interpreter on both the Linux package runners and Windows;
  also drop the file's unused create_release() (gitea_create_release.py owns that);
- run the Windows 'Upload installer to release' step in PowerShell (always present)
  instead of bash, globbing the NSIS .exe with Get-ChildItem.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:51:54 +02:00
leonarski_fandClaude Opus 4.8 ae1ea41151 ci: matrix the Windows build and upload installers to the release on tag
The two Windows jobs (build-windows / build-windows-nocuda) differed only in
-DJFJOCH_USE_CUDA=ON/OFF, so collapse them into one matrixed job (variant
cuda/nocuda), mirroring the build-rpm matrix.

On a tag, upload the NSIS installer (jfjoch-<version>-win64-{cuda<major>|cpu}.exe,
named in CMakeLists.txt) to the release via gitea_upload_file.py, the same helper
the RPM/DEB nocuda variants use to attach viewer/writer artifacts.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:47:01 +02:00
leonarski_fandClaude Opus 4.8 48a7a67283 docs: publish third-party notices as a documentation page
The THIRD_PARTY_NOTICES.md manifest lived only at the repo root and was
referenced from docs/SOFTWARE.md via a ../ link that escapes the Sphinx
source tree, so it never rendered in the published docs and was absent
from the navigation.

Add docs/THIRD_PARTY_NOTICES.md to the General toctree and fix the
SOFTWARE.md link. The docs page is generated from the canonical root file
by update_version.sh (like the python-client docs): licenses/*.txt links
point at the repository, and the project-license links point at the
in-docs LICENSE / FPGA_LICENSE pages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:42:22 +02:00
leonarski_f ec904bc21d Remove Gitlab remains 2026-07-01 21:36:36 +02:00
leonarski_f 91cae946a9 VERSION: 1.0.0-rc.156 2026-07-01 21:33:37 +02:00
leonarski_fandClaude Opus 4.8 0f327e4550 docs: add rc.156 changelog entry
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:32:51 +02:00
leonarski_fandClaude Opus 4.8 fa121f0079 jfjoch_viewer: show "Multiple lattices detected" in image statistics
Add a row after the Indexing solution that flags images with more than
one indexed lattice (indexing_lattice_count > 1).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:30:10 +02:00
leonarski_fandClaude Opus 4.8 00821e32ef rotation indexer: refine candidate cells and pick the best after refinement
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m24s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m32s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m40s
Build Packages / build:rpm (rocky8) (push) Successful in 15m8s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m12s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m25s
Build Packages / build:windows:nocuda (push) Successful in 15m47s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m50s
Build Packages / build:windows:cuda (push) Successful in 17m29s
Build Packages / XDS test (durin plugin) (push) Successful in 8m31s
Build Packages / Generate python client (push) Successful in 32s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m3s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m31s
Build Packages / Build documentation (push) Successful in 1m6s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m23s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m16s
Build Packages / build:rpm (rocky9) (push) Successful in 12m56s
Build Packages / DIALS test (push) Successful in 12m42s
Build Packages / Unit tests (push) Successful in 1h34m10s
De-novo two-pass indexing failed on large-cell / superstructure / modulated
crystals (EcwtAL500 0%, EcwtCQ034 0%) and mis-handled a pseudo-symmetric one
(EcwtCQ066 14%). The common cause: the choice of unit cell was made too early,
on the raw pre-refinement spot fraction, which is an unreliable discriminator
(a correct hexagonal cell indexes only ~13% of the un-refined accumulated
spots, while a wrong larger cell can index more).

Move the decision to after geometry refinement, where it is reliable:

- FFTIndexer now OFFERS widened candidate cells instead of deciding. ReduceResults
  gains a `widen` flag: the standard path (9 shortest vectors) is unchanged; the
  widened path anchors the two short axes and lets the third range over all
  filtered vectors (+dedup) to reach the long axis of an elongated cell.
  FilterFFTResults takes the peak count as a parameter (30 standard, 60 widened).
  RunInternal appends widened candidates only when its standard best indexes
  poorly, so compact crystals are untouched.

- RotationIndexer fully refines the top few candidates and keeps the one that
  indexes the most spots under its own refined geometry (IndexedFraction). Each
  refine is length-bounded (1.2x the found cell) so a free triclinic refine cannot
  drift onto a pseudo-translation / modulation supercell (CQ034's satellites). The
  earlier (primary) candidate is preferred: a later one is adopted only if it
  indexes clearly more and reasonably well in absolute terms, so a twin's noisy
  near-tie cannot displace it. Extra/twin lattices are only searched when the
  chosen cell is the FFT primary (lattice[0]), since MultiLatticeSearch's
  rotations are derived from that primary.

- The pseudo-symmetry guard (de-novo only - a user-fixed space group is always
  honored) is a ratio of refined fractions: refine the primitive as triclinic and
  drop to P only if the constrained cell indexes less than half of it. A false
  promotion indexes badly under its constraint (CQ066 ratio ~0.1) while genuine
  higher symmetry, including R-centred, indexes comparably (Ins_H R3 ratio ~0.7)
  and is kept.

Validated on the full /data/rotation_test battery: AL500 0->89% (C2), CQ034
0->99%, CQ066 14->93% (ISa 7.2->13.7); the other 15 crystals keep their exact
cell, space group, indexing rate and ISa (no regressions).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 21:17:53 +02:00
leonarski_fandClaude Opus 4.8 dfc6703f4a jfjoch_process: don't double-smooth per-frame G on the reference path
SmoothImageScaleG rewrites the partials in place (image_scale_corr and
image_scale_g). On the no-reference path that is harmless: each scaling
pass recomputes G from scratch via ScaleAllImages, so smoothing always
runs on freshly-refined G. On the reference path the scaling loop is
skipped, so G is computed once and stays; running scale_and_merge twice
(P1 then the adopted space group) smoothed the already-smoothed G a
second time, compounding into a ~2x wider effective kernel than the
configured --smooth-g and biasing the merged intensities.

Smooth only on the first pass of the reference path (G is unchanged
afterwards, and the smoothed partials persist into the second pass's
combine3D). The no-reference path is unchanged.

Verified on lyso (600 frames, -P rot3d -z ref.mtz -M): the reference run
now logs the smoothing once instead of twice, and the merged MTZ changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 14:24:05 +02:00
leonarski_f ab2176960f OpenAPI: Fix smargon descriptions 2026-07-01 14:12:09 +02:00
leonarski_fandClaude Opus 4.8 c67ea2fa42 receiver: guard size_t underflow in compression buffer sizing
When per-image CBOR metadata comes within 32 bytes of the buffer slot
size, slot_size - (metadata_size + 32) wrapped around (size_t), passing a
huge output_size to CompressImage. That defeated the buffer-too-small
guard and let the compressor write the full image past the end of the
slot, corrupting adjacent memory; AppendImage then threw a plain
JFJochException that aborted the whole collection after the fact.

Detect metadata_size + 32 >= slot_size explicitly and throw
CompressionBufferTooSmallException, so the existing catch drops just this
frame gracefully - the case the change was meant to handle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 14:05:20 +02:00
leonarski_fandClaude Opus 4.8 b7613c559c smargon: write chi/phi goniometer position into NXmx transformations
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m15s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 15m13s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m9s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m11s
Build Packages / build:rpm (rocky8) (push) Successful in 15m14s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m30s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m52s
Build Packages / build:windows:nocuda (push) Successful in 15m54s
Build Packages / build:windows:cuda (push) Successful in 17m32s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m30s
Build Packages / Generate python client (push) Successful in 30s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m31s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (durin plugin) (push) Successful in 8m47s
Build Packages / Build documentation (push) Successful in 58s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m37s
Build Packages / build:rpm (rocky9) (push) Successful in 12m37s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m44s
Build Packages / DIALS test (push) Successful in 12m55s
Build Packages / Unit tests (push) Successful in 1h0m54s
Add an optional Smargon static positioner (chi/phi angles + rotation axes)
that is reconstructed into the NXmx sample transformation chain. Chi/phi are
appended at the innermost end of the chain (closest to the sample) for both
the goniometer and grid-scan branches, with axes defaulting to chi {0,0,1}
and phi = omega default {1,0,0}.

- SmargonPosition gains chi_axis/phi_axis (common/JFJochMessages.h)
- OpenAPI: optional phi_axis/chi_axis arrays; clients regenerated
- OpenAPIConvert wires Dataset_settings.smargon -> DatasetSettings
- CBOR serializer/deserializer round-trip the axes
- tests: CBORSerialize_Start_Smargon

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 11:45:08 +02:00
leonarski_fandClaude Opus 4.8 35607057d9 CC1/2 merge: assign half-sets by deterministic per-image hash
Build Packages / build:windows:cuda (push) Failing after 4m30s
Build Packages / build:windows:nocuda (push) Successful in 10m0s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m43s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m46s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m53s
Build Packages / build:rpm (rocky8) (push) Successful in 14m54s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m10s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m34s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m37s
Build Packages / XDS test (durin plugin) (push) Successful in 8m5s
Build Packages / Generate python client (push) Successful in 31s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m50s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m44s
Build Packages / Build documentation (push) Successful in 1m7s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m45s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m5s
Build Packages / build:rpm (rocky9) (push) Successful in 13m8s
Build Packages / DIALS test (push) Successful in 12m47s
Build Packages / Unit tests (push) Successful in 1h0m40s
MergeOnTheFly::AddImage picked each image's CC1/2 half from a shared
mt19937 drawn in call order (and before Mask), so the split depended on
iteration/thread order and on how many images were masked. The class is
mutex-guarded for concurrent "on-the-fly" use, so any parallel merge would
make CC1/2 non-reproducible - a latent race.

Assign the half as a splitmix64 hash of the image's stable index instead,
computed after Mask. The split is now reproducible run-to-run, independent
of AddImage order, parallel-safe, and decoupled from masking. Callers pass
the outcome's vector index as the image id.

Verified: lyso_ref two-pass -M -P rot3d gives identical CC1/2 across runs
(overall 99.6%, P41212); hash split is balanced ~50/50.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 07:25:34 +02:00
leonarski_fandClaude Opus 4.8 a773aaa6a9 WriteReflections: write merging statistics + ISa to the mmCIF output
Build Packages / build:windows:cuda (push) Failing after 2m40s
Build Packages / build:windows:nocuda (push) Failing after 2m40s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m47s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m42s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m46s
Build Packages / build:rpm (rocky8) (push) Successful in 14m52s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m10s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m5s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m47s
Build Packages / Unit tests (push) Failing after 19m1s
Build Packages / Generate python client (push) Successful in 32s
Build Packages / Build documentation (push) Successful in 1m0s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m54s
Build Packages / XDS test (durin plugin) (push) Successful in 8m7s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m24s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m5s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m4s
Build Packages / build:rpm (rocky9) (push) Successful in 12m58s
Build Packages / DIALS test (push) Successful in 12m32s
The .cif (--scaling-output cif) now carries the per-shell and overall merging
statistics in the standard _reflns / _reflns_shell categories (resolution, redundancy,
completeness, <I/sigma>, R-rim/R-meas, CC1/2) plus the Diederichs asymptotic I/sigma
(ISa) as a free-text _reflns.pdbx_diffrn_ISa item (no standard CIF tag exists). The
MergeStatistics and the ISa string are threaded through WriteReflections to the mmCIF
writer; jfjoch_process and jfjoch_scale pass them. Values match the text statistics table.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 22:29:45 +02:00
leonarski_fandClaude Opus 4.8 ff91ca5e3a jfjoch_process: default --reject-outliers 6 for rot3d (XDS-like)
Per-observation merge outlier rejection at 6 sigma is neutral-or-better across every test
crystal (CC1/2 up or flat: lysoC 99.7->99.9, MyoB 98.9->99.6, EP0210 97.6->98.8,
cytC 99.7->100.0, InsI2 99.2->99.7; R-meas slightly lower everywhere; ISa unchanged), and
it is the lever for radiation-damaged / ice data (EP0117 reaches CC1/2 ~95% with it). Make
it the rot3d default, like scale-fulls and smooth-g; --reject-outliers 0 disables it. Off
for the non-rot3d partiality models, which were not benchmarked.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 22:04:36 +02:00
leonarski_fandClaude Opus 4.8 636ed1e180 space group: use merge reduced chi^2 (not R-meas) for the consistency check
The R-meas-ratio over-symmetry guard (commit 7ade6d9) missed a near-perfect
pseudo-2-fold: InsH2 (XDS R3) has a false 2-fold at operator CC 0.85 whose merged
intensities still correlate well, so R-meas inflated only ~1.3x and R32 was accepted
(ISa collapsing to 3.9). The reduced chi^2 (within-orbit scatter / sigma^2) is the
right signal - false equivalents disagree by many sigma even when they correlate well.

Measured chi^2 ratio (candidate / best subgroup) across the test set: true point groups
<= 1.63 (a cubic merge of a noisy crystal, InsI3, is the worst real case), false >= 2.26
(InsH2) and 6.0 (InsH3); threshold 2.0 separates them. InsH2 now resolves to R3 (ISa 6.1
from the false R32's 3.9); InsH3/InsI2/InsI3/cytC/lysoC/MyoB/EP0210 unchanged and correct.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 21:54:51 +02:00
leonarski_fandClaude Opus 4.8 fea2790a41 rotation_indexer: detect hexagonal metric de-novo (fixes trigonal cytC indexing)
The hexagonal lattice metric (two equal axes at 60/120 deg, both perpendicular to the
third) is also satisfied by its ortho-hexagonal C-centred supercell, so the
geometry-keyed LatticeSearch lands a metrically-hexagonal lattice on the C-orthorhombic
setting. The -S path already re-expresses it (HexagonalConventional) keyed on the
supplied space group; do the same de-novo, keyed on the metric of the reduced PRIMITIVE
cell (rhombohedral lattices have a rhombohedral primitive cell and are unaffected).

cytC (P3121) now indexes de-novo as hexagonal 83.8/83.8/88.6 gamma=120 and merges in
P3121 (CC1/2 99.7%, ISa 13.1), for both test crystals, instead of the orthohexagonal
C2/P1. lysoC/InsI3/InsH3 unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 21:31:20 +02:00
leonarski_fandClaude Opus 4.8 52248b8f5c docs: design for auto-gated, data-driven ice-ring detection
Records the validated z-score detector (on the azint radial background profile) and
position/width estimation, for a future --detect-ice-rings=auto. Not yet implemented.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 21:22:31 +02:00
leonarski_fandClaude Opus 4.8 f3c51b0266 jfjoch_process: --min-image-cc is in percent, not a fraction (fix crash)
--min-image-cc <num> is documented in percent and the per-image CC is a fraction in
[0,1], but the value was passed straight to MinCCForImage (which requires [0,1]), so
the documented usage (e.g. --min-image-cc 30) threw an uncaught JFJochException and
aborted. Divide the percent argument by 100.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 21:09:18 +02:00
leonarski_fandClaude Opus 4.8 73d9e1de39 ice rings: widen the exclusion band to 0.03 q (measured ring FWHM)
The hexagonal-ice ring FWHM measured on JUNGFRAU data (azimuthal radial background
profile) is ~0.06 q, so the exclusion half-width should be ~0.03; the previous 0.02
under-covered the strong low-res rings. On EP0117 with --detect-ice-rings this lifts
CC1/2 37->50%, and combined with --reject-outliers 3 (which down-weights the
radiation-damaged late frames) reaches ~94% (XDS 98.5%). Only active with
--detect-ice-rings, so default behaviour is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 21:09:18 +02:00
leonarski_fandClaude Opus 4.8 a74b8767de ice rings: add --detect-ice-rings and exclude ice-ring reflections from scaling
jfjoch_process gains --detect-ice-rings, which (a) activates the existing spot-finder
ice flagging (ice spots de-prioritised in indexing) and (b) drops reflections sitting
on a hexagonal-ice powder ring from scaling/combine/merge/stats, via a new shared
IsOnIceRing() helper over ICE_RING_RES_A using the spot-finder's q half-width. Their
integrated intensity is contaminated by the strong, variable ice background, so leaving
them in mis-scales the whole frame and inflates the error model.

On EP0117 (ice-ring crystal): de-novo space-group determination recovers from P1 to P2
and CC1/2 improves (31->37%). Off by default; a no-op without the flag. This is the
first, non-controversial step - the residual gap needs ice-aware background/integration
(follow-up).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 20:40:51 +02:00
leonarski_fandClaude Opus 4.8 7ade6d9906 space group: reject over-symmetrised point groups by merge R-meas consistency
Per-operator CC alone cannot separate a real weak symmetry operator from a false
moderate one: a noisy crystal's genuine cubic 2-folds (InsI2 I23, CC ~0.51) score
BELOW a pseudo-symmetric crystal's false 2-fold (InsH3, CC 0.64), so no CC threshold
works. Add a self-consistency test: a candidate point group is accepted only if
merging the intensities under it does not inflate R-meas past max_rmeas_ratio (1.5x)
the most-consistent candidate. A false operator forces non-equivalent reflections
together and blows R-meas up; a real one leaves it flat.

Fixes InsH3: was over-called R32 (ISa collapsed to 2.2 from the forced merge), now
correctly R3/H3 (ISa 10.2, matching XDS). InsI2 stays I23, and lysoC/InsI3/MyoB/
EP0210/cytC/lyso_ref are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 20:32:03 +02:00
leonarski_fandClaude Opus 4.8 23d58b6202 integration: robust, well-conditioned per-frame --reciprocal-profile fit
Fit the reciprocal tangential-width model y(q)=a0+a1*t+a2*t^2 in a centered,
standardized variable t=(q-qbar)/qscale instead of the raw {1,q,q^2} monomials:
the raw normal matrix went near-singular when the strong spots span a narrow
q-range (small cell / sparse still), letting tiny per-frame jitter swing the
curvature into a wild over-wide profile. Adds IRLS (Huber) robustness, a ridge
on the curvature (sharp-crystal prior), and clamps the applied width to the
fitted q-range (no extrapolation). Stays strictly per-frame (no dataset pooling),
so it works online and for stills. Neutral on rotation data (cytC high-res CC1/2
win preserved 66.8 vs 65.6%).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 20:01:05 +02:00
leonarski_fandClaude Opus 4.8 0783af247c scaling: express rot3d smooth-g as a rotation range in degrees (XDS DELPHI-like)
--smooth-g now takes a rotation range in degrees (default 5) instead of a frame
count, converted to an odd frame window from the oscillation step inside
JFJochProcess. This makes the per-frame scale-G smoothing physical and
independent of the frame slicing. (Note: G-smoothing is not the cure for the
low-symmetry stochastic collapse - the per-image scale Cauchy loss is - but a
degree-based window is the correct parameterization regardless.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 20:00:53 +02:00
leonarski_fandClaude Opus 4.8 8d18c635ff scaling: robust (Cauchy) loss on the per-image scale fit
The per-image G/B/mosaicity fit used a plain L2 loss, so a few outlier
reflections occasionally dragged a frame into a bad optimum - a stochastic
(~15% of runs) per-frame mis-scaling that elevated R-meas and collapsed CC1/2
at low symmetry (the image-level CC1/2 half-split makes the damage look patchy
across shells, while the data is genuinely noisier). A Cauchy loss (3 sigma)
soft-downweights those outliers without a hard cut: MyoB 0/10 catastrophic
(was ~2/10), R-meas stable, and ISa improves on every test crystal
(EP0210 9.2->12.4, MyoB 12.5->14.6, lysoC 10.4->11.2, cytC 11.5->12.6),
most on low symmetry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 20:00:42 +02:00
leonarski_fandClaude Opus 4.8 e45a1577d6 jfjoch_process: optional absorption surface for rot3d scaling (--absorption)
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m18s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m31s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m57s
Build Packages / build:rpm (rocky8) (push) Successful in 14m6s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m15s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m23s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m34s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m55s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m17s
Build Packages / XDS test (durin plugin) (push) Successful in 9m25s
Build Packages / Create release (push) Skipped
Build Packages / Generate python client (push) Successful in 28s
Build Packages / Build documentation (push) Successful in 57s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m31s
Build Packages / build:rpm (rocky9) (push) Successful in 12m45s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m44s
Build Packages / DIALS test (push) Successful in 13m3s
Build Packages / Unit tests (push) Successful in 58m30s
Build Packages / build:windows:cuda (push) Successful in 20m21s
Build Packages / build:windows:nocuda (push) Successful in 10m30s
Adds an opt-in smooth absorption correction for rotation scaling. After the
rot3d fulls are scaled, --absorption[=num] fits a multiplicative surface
A(s1_crystal) - a degree<=4 monomial basis (real spherical harmonics up to l=4,
as XDS/DIALS) of the diffracted-beam direction in the crystal/goniometer frame,
by ridge-regularized log-linear least-squares of I_scaled/I_ref weighted by
(I/sigma)^2, over num iterations (default 3); the surface divides image_scale_corr
and the fulls are re-merged.

Off by default and a no-op without rot3d. On the test panel (~13 keV, thin
crystals) it is metric-neutral - fitted rms(log A) ~3-4%, ISa/CC1/2 unchanged -
because absorption is negligible there and the per-frame scale G(phi) already
absorbs the angular part. It is kept as a lever for low-energy data (e.g. 6 keV)
where absorption becomes significant. Stored as ScalingSettings::absorption_iter.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 15:23:01 +02:00
leonarski_fandClaude Opus 4.8 77f1ed2566 jfjoch_process: default scale-fulls for rot3d; skip _process.h5 when merging
Two offline-processing ergonomics changes.

scale-fulls is now ON by default for -P rot3d (it refits the per-frame scale on
the combined fulls and lifts ISa substantially, e.g. HEWL rot3d 7.0 -> 16.4).
--scale-fulls stays as the explicit opt-in for non-rot3d order; new
--no-scale-fulls disables it for rot3d. (scale_fulls is now an optional<bool>
defaulting to combine_3d.) Note: on low-completeness data the Unity-reference
refit can cost a little CC1/2 (endothiapepsin ~70% complete: -5% in a mid shell);
pair with --reject-outliers for the full low-symmetry benefit.

When merging (-M), the merged reflections (.mtz/.cif) are the wanted output, so
the large per-image _process.h5 is no longer written by default - it routinely
ran to hundreds of MB. Pass --write-process-h5 to also emit it. Without merging
the _process.h5 is the only output and is always written. Implemented with a
ProcessConfig.write_process_h5 flag gating the FileWriter; reflection and
image.dat writing are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 14:50:18 +02:00
leonarski_fandClaude Opus 4.8 21dd99524f rotation_indexer: map FFT primitive cell to the SG conventional setting
When a space group is supplied without a reference cell, de-novo two-pass
rotation indexing fed the FFT's Niggli-reduced primitive cell straight into
XtalOptimizer as if it were the conventional cell. For non-primitive lattices
(centered I/F/R/C, or hexagonal where the primitive pair sits at gamma=60) the
conventional-system model then refined to a wrong minimum and indexed 0% of
frames: cytC (P3121) gave 103.9/103.9/78 instead of 83.7/83.7/88.6, insulin
(I213) 66.7 instead of 77.65, insulin-R3 51/51/36 instead of 81.4/81.4/33.3.

Run LatticeSearch on the FFT primitive cell (it already yields the correct
conventional cell + reindex for I/F/R/C). For the one remaining gap - a
metrically hexagonal lattice that the geometry-keyed search lands on the
ortho-hexagonal C setting - re-express the reduced primitive cell in
conventional hexagonal axes (b -> b - a opens gamma 60 -> 120).

De-novo "-S" now indexes cytC/insu/Ins_H/lyso/MyoB/EP/lyso_ref at 100% with the
correct cell; the "-C -S" path is unchanged. The helper stays in this .cpp
(g++) rather than CrystalLattice.h to avoid recompiling CUDA units, which is
broken under the box's CUDA-13 nvcc; promote it to a method once that is fixed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-30 14:29:50 +02:00
leonarski_fandClaude Opus 4.8 3aec235f67 integration: add --reciprocal-profile dial (global reciprocal-space width)
Build Packages / Unit tests (push) Successful in 59m53s
Build Packages / build:windows:nocuda (push) Successful in 18m24s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m30s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m33s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m54s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m20s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m2s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m29s
Build Packages / build:rpm (rocky8) (push) Successful in 14m37s
Build Packages / build:rpm (rocky9) (push) Successful in 12m44s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m10s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m21s
Build Packages / DIALS test (push) Successful in 12m22s
Build Packages / XDS test (durin plugin) (push) Successful in 7m34s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m41s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m52s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / Build documentation (push) Successful in 1m0s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:cuda (push) Successful in 16m53s
The per-shell profile width is learned in pixels, so it varies ~4x with resolution
(mostly the geometric projection of a near-constant reciprocal-space relrod) and must
be binned per shell -> it starves at high resolution / on sparse data. The new
--reciprocal-profile flag instead learns ONE global width in reciprocal space,
sigma2_q,tan = A + B|q| + C|q|^2: the Jacobian g_tan=cos(2theta) removes the geometric
projection, and C|q|^2 is the crystal mosaicity relrod (variance ~(eta|q|)^2). Applied
per reflection as sigma2_tan,px = (A + B|q| + C|q|^2)/g_tan^2 (B,C clamped >=0;
quadratic->linear->constant fallback).

Off by default. On the sharp HEWL test crystal (mosaicity 0.091deg, so C fits to ~0 and
it reduces to the validated linear form) it is metric-neutral: ISa 16.2->16.3, anomalous
0.92x unchanged, CCref band 90.0->89.9, CC1/2 a touch lower (per-shell isn't starved at
23k spots/shell, and a global fit is less flexible). So: simpler + more transferable at a
small CC1/2 cost, ISa/anomalous held. Its payoff is on MOSAIC crystals (large C|q|^2),
where per-shell starves on the wide weak high-res spots and 6 shells are too coarse; both
lyso test crystals are sharp, so it ships as a dial to try on mosaic data elsewhere.
A separate radial relrod fit was tried and dropped (no gain). See NEXTGEN_INTEGRATOR.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 14:26:08 +02:00
leonarski_fandClaude Opus 4.8 5ba5fe8ad1 integration: centre the profile on the predicted sub-pixel position
Build Packages / Unit tests (push) Successful in 58m42s
Build Packages / build:windows:cuda (push) Successful in 18m14s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m7s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m4s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m30s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m44s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m26s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m25s
Build Packages / build:rpm (rocky8) (push) Successful in 21m46s
Build Packages / build:rpm (rocky9) (push) Successful in 13m20s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m15s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m20s
Build Packages / DIALS test (push) Successful in 12m40s
Build Packages / XDS test (durin plugin) (push) Successful in 8m12s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m37s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m23s
Build Packages / Generate python client (push) Successful in 30s
Build Packages / Build documentation (push) Successful in 1m11s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 9m59s
The profile was learned and applied on the integer pixel round(predicted), so a
shared profile sits up to 0.5 px off the true spot (and stacking spots with random
sub-pixel offsets broadens the learned profile). Build the Gaussian per reflection
instead, centred on the predicted sub-pixel offset -- noise-free geometry, unlike the
observed centroid, which hurt -- and elongated radially as before.

HEWL rotation @1.0A: ISa 15.7->16.2, CCref band 89.9->90.0, CCxds 94.8->95.0 (high-res
1.00A CCref 66.0->66.9); sharp serial stills 1.68A CC1/2 61.6->62.5; anomalous S peak
0.92x XDS (no accuracy traded). De-broadening the learned width by the 1/12 px^2/axis
integer-binning floor was tested and rejected (it over-narrows).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 07:34:06 +02:00
leonarski_fandClaude Opus 4.8 26901da42f integration: de-contaminate the profile width, add a radial parallax ellipse
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m30s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m44s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m45s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m46s
Build Packages / build:rpm (rocky8) (push) Successful in 15m1s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m20s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m25s
Build Packages / XDS test (durin plugin) (push) Successful in 9m46s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m25s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m44s
Build Packages / Create release (push) Skipped
Build Packages / Generate python client (push) Successful in 16s
Build Packages / build:rpm (rocky9) (push) Successful in 11m47s
Build Packages / Build documentation (push) Successful in 52s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 13m0s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 13m27s
Build Packages / DIALS test (push) Successful in 14m10s
Build Packages / Unit tests (push) Successful in 59m3s
Build Packages / build:windows:cuda (push) Successful in 16m54s
Build Packages / build:windows:nocuda (push) Successful in 15m18s
The profile-fit width came from the full 13x13 second moment, which runs 3-8x
wider than the true spot: neighbour reflections leak into the (unmasked) learning
grid -- catastrophic at low res where spots crowd the beam -- and the far corners
(lever arm dx^2+dy^2 up to 72) add rectified background noise. Splitting the spot
moment into radial vs tangential shows the tangential width is isotropic
(mosaicity/divergence) while the radial excess is pure sensor parallax ~tan^2(2th).

- Measure the width over the signal disk r1 on the monochromatic path (inherently
  excludes neighbours, caps the radial tail); keep the generous full-grid width on
  the broadband/stills path (sparse spots, the centroid-undersampling floor).
- Extend the (was bandwidth-only) radial ellipse with an analytic, material-aware
  parallax term c_par*tan^2(2theta), c_par = Var(z)/pixel^2 from sensor thickness +
  material + energy (parallax_var_px2; Si and CdTe), plus a fixed weak-spot capture
  term on the monochromatic path only.

HEWL rotation @1.0A: ISa 13.5->15.7, CC1/2 1.12A 91.3->95.9 / 1.05A 83.0->85.2,
external CCref band 88.1->89.9, CCxds 93.4->94.8, R-meas 9.4->8.7; low/mid flat.
Sharp serial stills gain slightly from parallax; broadband stills neutral.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 00:54:59 +02:00
leonarski_fandClaude Opus 4.8 b51036ad30 broker: don't clobber sensor thickness/material with the API default
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m41s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 15m32s
Build Packages / build:rpm (rocky8) (push) Successful in 15m27s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m37s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m46s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m54s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 16m1s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m38s
Build Packages / XDS test (durin plugin) (push) Successful in 8m7s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m7s
Build Packages / Create release (push) Skipped
Build Packages / Generate python client (push) Successful in 26s
Build Packages / Build documentation (push) Successful in 57s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m22s
Build Packages / build:rpm (rocky9) (push) Successful in 12m20s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m17s
Build Packages / DIALS test (push) Successful in 12m43s
Build Packages / Unit tests (push) Successful in 59m55s
Build Packages / build:windows:nocuda (push) Failing after 14m5s
Build Packages / build:windows:cuda (push) Failing after 14m5s
JFJochBrokerParser set SensorThickness_um / SensorMaterial unconditionally from
the request's Detector model, but that model defaults them to 320 um / Si with
IsSet=false. So any start request that didn't explicitly carry the sensor
overwrote the detector-reported value (DECTRIS SIMPLON read) or the
detector-specific default with 320 um -- the "PILATUS4 ends up 320 um" symptom.
Guard both with the IsSet flag, mirroring highVoltageV just above. The
receiver -> FillMessage -> CBOR -> writer chain was already correct; the value
was simply wrong at the source.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 23:00:06 +02:00
leonarski_fandClaude Opus 4.8 6b989b4213 reader: read sensor thickness/material from the HDF5 metadata
HDF5MetadataSource ignored /entry/instrument/detector/sensor_thickness and
sensor_material and left the DetectorSetup default (320 um, Si). Read them when
present (NXmx stores thickness in metres), so reprocessing honours the recorded
sensor -- which the parallax/absorption model needs. (The acquisition path still
records the 320 um default because DetDECTRIS sets no per-model thickness; that
is a separate, acquisition-side fix.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 23:00:06 +02:00
leonarski_fandClaude Opus 4.8 7a4fadf29b bragg_prediction: reciprocal Lorentz divides by |S||S0|, not S.S0
S.S0 = |S||S0| cos(2theta), so dividing the rocking rate |m2 . (S x S0)| by it
added a spurious 1/cos(2theta) factor (1.0 at low res, 1.8x at 1 A) to the
reciprocal Lorentz, hence to the absolute/Wilson scale. Divide by |S||S0| to get the correct zeta*sin(2theta) (times a constant 1/lambda^2 the overall scale
absorbs). The spurious factor depends on 2theta only, so it cancels within a
resolution shell and between symmetry mates -- CC1/2, CCref and R-meas are
metric-neutral -- but it corrupts the absolute scale and destabilises the
per-image B-factor and cross-resolution error model. CPU and GPU kernels.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 23:00:06 +02:00
leonarski_fandClaude Opus 4.8 40f650b9e7 scale_merge: pool the per-frame background across each rocking event in Combine3D
Each partial subtracted its own independently-estimated per-frame background,
so a weak full assembled from N frames accumulated one background-estimation
variance per frame. The true background is flat over the few frames of one
rocking event, so replace each partial's background by the event mean and
correct its intensity by n_bkg*(bkg - pooled), where n_bkg = (sigma^2 - I)/bkg
is the effective background-pixel count -- correct for weak AND strong
reflections (sigma^2/bkg would over-count strong ones and over-correct them).
Single-frame events are a no-op.

Measured (rotation lyso @1.0 A): 1.05 A CC1/2 81.3 -> 83.0, R-meas 81.4 ->
77.2, CCref +0.2, CCxds +0.3; overall R-meas 10.0 -> 9.4%; ISa preserved (13.5).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 22:41:37 +02:00
leonarski_fandClaude Opus 4.8 eccd10a0a7 integration: neighbour-mask the profile-fit background ring, widen r3 8->10
ProfileIntegrate2D::BoxSum now excludes every predicted reflection's r2 disk
from the r2..r3 background annulus (mirroring BraggIntegrate2D), so a neighbour
Bragg peak can no longer bias a reflection's background high and over-subtract.
With neighbours excluded the annulus can safely widen, so the default r_3 goes
8 -> 10 (more background pixels, lower-variance estimate).

Measured (rotation lyso @1.0 A, external CCref/CCxds vs XDS): 1.05 A CCref +1.3
/ CCxds +1.3, R-meas -5 pts, low-res R-meas unchanged. Serial (Jet8 @0.0002
bandwidth): 1.68 A CC1/2 +3.9 / CCref +1.1, 1.58 A +4.0 / +1.6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 22:41:14 +02:00
leonarski_fandClaude Opus 4.8 bbd888dcc3 integration: gate the background-ring sigma-clip to stills (bandwidth>0)
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m41s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 15m4s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m5s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m5s
Build Packages / build:rpm (rocky8) (push) Successful in 15m12s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m22s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m58s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m9s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m12s
Build Packages / Generate python client (push) Successful in 21s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (durin plugin) (push) Successful in 9m17s
Build Packages / Build documentation (push) Successful in 48s
Build Packages / build:rpm (rocky9) (push) Successful in 12m57s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m39s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m20s
Build Packages / DIALS test (push) Successful in 13m15s
Build Packages / build:windows:nocuda (push) Successful in 16m12s
Build Packages / Unit tests (push) Successful in 1h0m33s
Build Packages / build:windows:cuda (push) Successful in 18m12s
The 76e88b0f sigma-clip (reject ring pixels above mean+3*sqrt(mean))
de-biases bandwidth-streaked high-resolution stills, but it ran on all
data. On rotation (no streaks) it clips legitimate high background pixels
and biases the mean low, slightly inflating weak intensities and hurting
the anomalous signal. Gate it to bandwidth>0 (stills), matching how the
814dff34 radial-profile change is already gated.

Rotation lysozyme (self-scaled, smooth-g, -A): anomalous S-peak 0.84x ->
0.86x of XDS (SD_MET 11.71 -> 11.94, CL_CL 1.28x -> 1.25x), ISa unchanged.
Stills (bandwidth set) are byte-identical (clip still applies).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 19:02:47 +02:00
leonarski_fandClaude Opus 4.8 99b923e727 scaling: smooth per-frame scale G across frames before the rot3d combine
ScaleOnTheFly fits each frame's scale G independently with no neighbour
coupling, so the few partials of one rocking event are weight-summed in
combine3D on inconsistent scales - jitter that never enters the full's
counting sigma and instead surfaces as scatter between symmetry mates,
inflating the error-model b (low ISa). A centered moving average of
log(G) over a small frame window (default 9, on for rot3d) removes it,
mirroring XDS's smooth scaling. Complementary to --scale-fulls (which
rescales between fulls, after the combine): smoothing fixes within-event
scale, scale-fulls fixes between-full.

On the rotation lysozyme set (1.4A, merged, with --scale-fulls): ISa
11.7 -> 15.0, R_meas 10.0% -> 8.3%, CCref stable, chi2 ~0.97 (honest).
Anomalous (full-res): ANODE S-peak 0.61x -> 0.80x of XDS.

--smooth-g[=window] tunes/disables it (=0 off); --mosaicity <deg> is a
diagnostic that fixes the scaling mosaicity for sweeps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 19:02:47 +02:00
leonarski_fandClaude Opus 4.8 02477f1ce4 space group: determine centering from absences; jfjoch_process re-indexes from scratch
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m5s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m29s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m41s
Build Packages / build:rpm (rocky8) (push) Successful in 14m46s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m59s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m13s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m29s
Build Packages / XDS test (durin plugin) (push) Successful in 7m54s
Build Packages / Generate python client (push) Successful in 30s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m12s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m23s
Build Packages / Build documentation (push) Successful in 1m8s
Build Packages / build:windows:nocuda (push) Failing after 25m35s
Build Packages / build:windows:cuda (push) Failing after 25m35s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m12s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m2s
Build Packages / build:rpm (rocky9) (push) Successful in 12m45s
Build Packages / DIALS test (push) Successful in 12m52s
Build Packages / Unit tests (push) Successful in 59m5s
Fixes wrong space-group assignment on cubic insulin (true I2_13, a=77.6).

SearchSpaceGroup: drop the lattice-centering gate (and the now-unused
lattice_centering option). The indexer often returns the conventional cell,
whose geometry hides I/F/C centering - that information lives only in the
systematic absences. Stage B now tests every centering of the point group and
confirms it from the data, so an indexer-reported 'P' no longer excludes
I2_13/I23. (I23 and I2_13 remain indistinguishable by absences and are reported
as such.)

jfjoch_process: discard any unit cell stored in the input HDF5 by default so the
cell is re-determined from scratch. A stale/wrong stored cell otherwise resolves
the indexing algorithm to FFBIDX, which trusts that cell and locks onto the wrong
lattice (Ins_I_3 went from 2.7% -> 76% indexing). A user-supplied -C cell still
applies.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 16:39:03 +02:00
leonarski_fandClaude Opus 4.8 107bcae0f0 merge: de-bias the error-model variance fit (chi^2 was ~2.2, now ~1) and report chi^2
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m52s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m8s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m26s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m34s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m59s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m17s
Build Packages / XDS test (durin plugin) (push) Successful in 7m40s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m46s
Build Packages / build:rpm (rocky8) (push) Successful in 12m32s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m11s
Build Packages / Generate python client (push) Successful in 16s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (rocky9) (push) Successful in 13m2s
Build Packages / Build documentation (push) Successful in 42s
Build Packages / DIALS test (push) Successful in 13m38s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m9s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m44s
Build Packages / Unit tests (push) Successful in 57m53s
Build Packages / build:windows:nocuda (push) Successful in 16m26s
Build Packages / build:windows:cuda (push) Successful in 18m26s
RefineErrorModel fits the variance model a*sigma^2 + (b*<I>)^2 to the binned
*median* of the squared symmetry-mate deviations, chosen for robustness. But a
single deviation squared over its variance is chi-square(1)-distributed, whose
median is only 0.4549 of its mean, so the fit was calibrating the variances to
0.4549x their true value: the merged sigmas came out ~1.48x too small and the
achieved reduced chi^2 was 1/0.4549 = 2.2, not 1. The error model was internally
well-behaved (flat chi^2 across resolution) but globally over-confident, which
inflated ISa (=1/b) by ~1.48x and made the exported sigmas too optimistic for
downstream weighting / French-Wilson.

Divide the binned median by the chi-square(1) median (0.4549) to recover an
unbiased estimate of the mean E[dev^2]=sigma^2, keeping the robustness of the
median while targeting reduced chi^2 = 1. Also compute the achieved median
reduced chi^2 (same normalization) and report it on the "Error model" line so
mis-calibration can no longer drift silently.

Verified: HEWL rotation a 0.588->1.292, b 0.052->0.077, ISa 19.1->12.9, chi^2
2.17->1.06; serial Jet8 ISa 1.0->0.7, chi^2 0.92. Relative ISa comparisons and
all CC1/2/CCref/anomalous metrics are unchanged (sigma-independent or a common
constant); only the absolute sigma calibration is corrected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 15:57:42 +02:00
leonarski_f a0856e1042 CI: Build Windows non-CUDA installer
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m10s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m42s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m58s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m12s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m15s
Build Packages / build:rpm (rocky8) (push) Successful in 15m11s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m30s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m39s
Build Packages / Generate python client (push) Successful in 14s
Build Packages / XDS test (durin plugin) (push) Successful in 9m34s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m30s
Build Packages / Build documentation (push) Successful in 51s
Build Packages / build:rpm (rocky9) (push) Successful in 13m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m48s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m47s
Build Packages / DIALS test (push) Successful in 13m23s
Build Packages / Unit tests (push) Successful in 1h13m49s
Build Packages / build:windows:nocuda (push) Failing after 13m47s
Build Packages / build:windows:cuda (push) Failing after 13m47s
2026-06-28 15:39:34 +02:00
leonarski_fandClaude Opus 4.8 a58f1fb046 docs: note background outlier-reject and bandwidth radial profile in integration
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 12:03:10 +02:00
leonarski_fandClaude Opus 4.8 814dff34cb integration: radially-elongated profile for bandwidth-streaked high-res stills
With a finite energy bandwidth each reflection is smeared RADIALLY by
sigma_bw = bandwidth_sigma * R_px (R_px = distance from the beam centre, so large
at high resolution): high-resolution spots become radial streaks. The isotropic
per-shell Gaussian both mis-weights them and clips the streak tail on the fixed
profile grid, losing intensity (biased low, noisy).

When a bandwidth is set, fit each reflection with a per-reflection Gaussian
elongated only along its radial direction - sigma^2_radial = sigma^2_intrinsic +
sigma_bw^2, sigma^2_tangential = sigma^2_intrinsic - on a grid grown to hold the
streak. Unlike an isotropic widening this adds no tangential background. It only
engages where the smear exceeds the intrinsic spot (high resolution); low/mid
resolution and monochromatic data (bandwidth 0, e.g. rotation) are untouched.

On the HEWL serial-stills jet (with the background sigma-clip) this lifts the
overall CC-vs-reference 52 -> 55% and the high-resolution I/sig (1.7 A 0.5 -> 1.4),
recovering the 2.0-2.5 A band, with CC1/2 preserved (the per-shot noise the wider
region adds is averaged out by the high serial multiplicity). Rotation ISa 19.1
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 12:01:56 +02:00
leonarski_fandClaude Opus 4.8 76e88b0fca integration: sigma-clip the background ring to de-bias high-resolution stills
Weak high-resolution still reflections were systematically over-subtracted: a
bandwidth-streaked high-res spot (or a neighbour) leaks into the r2-r3 background
annulus and biases its mean high, so the subtracted background is too large and
the merged high-resolution intensities go negative (seen as reproducibly negative
<I/sig> at 100% completeness and high multiplicity past ~1.9 A).

Add one high-outlier sigma-clip pass to the box-sum background (reject ring pixels
above mean + 3*sqrt(mean), recompute) so the contamination no longer inflates it.
A clean Poisson background is essentially unchanged (~0.1% exceed the cut). On the
HEWL serial-stills jet this de-biases the high-res band - <I/sig> 2.03 A 0.9 -> 1.6,
1.79 A -0.1 -> +0.7 - extends the usable resolution ~2.2 -> ~2.0 A and improves
overall R-meas 130 -> 124%, with CC1/2 and CC-vs-reference neutral. The rotation
crystal is unchanged (ISa 19.1), its clean backgrounds being barely clipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 11:50:31 +02:00
leonarski_fandClaude Opus 4.8 7bb25979e6 docs: correct CPU_DATA_ANALYSIS integration section (profile-fit, not summation)
The default 2D Bragg integrator is ProfileIntegrate2D (Kabsch profile fit with a
per-resolution-shell Gaussian profile and de-biased variance), with box summation
as the seed/fallback (--integrator boxsum|gaussian|empirical). Section 9 and the
section 13 note both still claimed integration was summation-only with no profile
fitting; rewrite them to describe the profile-fit default.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 11:16:00 +02:00
leonarski_fandClaude Opus 4.8 59c474e4b0 docs: big-picture rotation 3D integration + intrinsic widths (CPU_DATA_ANALYSIS)
Document the rot3d path that was missing: a new section on combining a
reflection's per-frame partials into one full (de-biased weighted combine,
captured fraction, capture-aware systematic uncertainty, XDS-order full
re-scaling) so the merge sees counting statistics instead of rocking-curve
slicing. Recast the profile-radius and mosaicity sections as what the system
does - profile radius as the intrinsic (bandwidth-deconvolved) width, mosaicity
by ML with a search window wide enough to capture the rocking tail and held
fixed during scaling - rather than the optimisation narrative.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 10:56:49 +02:00
leonarski_fandClaude Opus 4.8 7b464e4b3c indexing: deconvolve energy bandwidth from the profile radius
The profile radius (intrinsic excitation-error width = mosaicity + divergence)
was the plain RMS of dist_ewald over indexed spots. With a finite energy
bandwidth that spread is broadened by the bandwidth's radial smear
sigma_bw = bandwidth_sigma*lambda/(2 d^2), which prediction then re-applies per
reflection - so bandwidth was counted twice and the radius was inflated (most at
high resolution, sigma_bw ~ 1/d^2). Subtract the bandwidth variance from the
measured spread so the radius is the intrinsic width. bandwidth = 0
(monochromatic / rotation) is unchanged. Small for narrow bandwidths (~6% of the
variance, ~4% radius on the 1% jet); matters for wide-bandwidth / pink beam.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-28 10:56:49 +02:00
leonarski_fandClaude Opus 4.8 043ff0e864 docs: mosaicity MLE search-window fix + capture-aware rotation precision (CPU_DATA_ANALYSIS)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 23:58:45 +02:00
leonarski_fandClaude Opus 4.8 82b8a9752c rotation: fix mosaicity underestimate + default-on capture-uncertainty (ISa 10.7->19.1)
The rotation per-image mosaicity was ~3x too small (0.045 vs the true 0.13deg),
which crippled the partiality model and capped per-observation precision: it
predicted reflections on too few frames and over-peaked the rocking partiality,
so the rot3d-combined fulls were ~1.7x noisier than XDS's, the integration
bottleneck behind the jungfraujoch-vs-XDS ISa gap.

Two root causes, both fixed:
- CalcMosaicityXDS (Kabsch-2010 MLE) searched each spot's exact-Bragg phi only
  within +-wedge (the 0.2deg oscillation). Reflections recorded at larger rocking
  offset - the tail that defines the mosaic width - fell outside and were dropped,
  truncating the tau distribution so the MLE underestimated ~2x. Widen the search
  window to wedge+0.8deg; the MLE then converges to the true 0.13deg (and is
  insensitive to widening further, since it weights by the recorded fraction).
- ScaleOnTheFly then re-refined the mosaicity from the intensity residual, which
  is degenerate with the per-image scale G and collapses it toward its floor.
  Trust the (now correct) indexing mosaicity and keep it fixed during scaling.

With the correct mosaicity, --capture-uncertainty (which down-weights the
over-extrapolated under-captured fulls) now pays off strongly, so default it ON
(1.0) for the rot3d combine; it stays off for non-rot3d. Together on the HEWL
rotation crystal: ISa 10.7 -> 19.1, and anomalous peak height vs XDS goes from
52% to ~78% (CL_CL 1.92x -> 1.29x). This reaches XDS's own published-correction
ceiling (DECAY+ABSORP+MODPIX ~= 19.6); the remaining gap to its quoted ISa 28 is
the I->inf extrapolation. No effect on the stills path (rotation-only code).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 23:57:04 +02:00
leonarski_fandClaude Opus 4.8 ed98775ba3 rot3d: capture-aware sigma for under-captured fulls + expose per-image scale
The rot3d combine over-extrapolates fulls reconstructed from only a fraction f
of their rocking curve (min_partiality admits f as low as 0.02). Against XDS on
HEWL these low-capture fulls are systematically biased HIGH (+15% at f=0.8 to
+100% at f=0.3), and the bias - not random scatter - is the strong-reflection
floor that hurts anomalous accuracy.

--capture-uncertainty <coeff> (default 0 = off, baseline bit-identical) adds a
systematic uncertainty ~coeff*(1-f)*I to each full's sigma, so the merge
down-weights the over-extrapolated fulls and the error model treats their
scatter as expected. Unlike outlier rejection (which trades accuracy for CC1/2),
this fixes a real bias, so accuracy improves: at coeff=1.0 the anomalous peak
height vs XDS rises CL_CL +16%, SD_MET/SG_CYS +5-6%, ISa 10.7->11.0. Rotation-
only (no-op for stills, which never combine).

Also expose the per-image scale offline: Combine3D now carries the first-pass
per-image scale metadata (G, B, mosaicity, wedge, CC) forward instead of
dropping it, and jfjoch_process -M writes <prefix>_image.dat from it (the
offline self-scaling result was otherwise unobservable - process.h5's per-image
arrays are only filled on the online path). This enabled the XDS DECAY
comparison (jfjoch G tracks XDS, r=0.93).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 19:41:20 +02:00
leonarski_fandClaude Opus 4.8 f261adf42a tools: add jfjoch_recompress (bitshuffle/LZ4 -> bitshuffle/zstd)
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m47s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m3s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m36s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m32s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m43s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m29s
Build Packages / XDS test (durin plugin) (push) Successful in 8m12s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m18s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m26s
Build Packages / Generate python client (push) Successful in 15s
Build Packages / build:rpm (rocky8) (push) Successful in 12m46s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 45s
Build Packages / build:rpm (rocky9) (push) Successful in 13m24s
Build Packages / DIALS test (push) Successful in 13m10s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m58s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m53s
Build Packages / Unit tests (push) Successful in 59m15s
Build Packages / build:windows (push) Successful in 18m58s
New offline tool that re-compresses /entry/data/data of a _data_NNNNNN.h5 file
from bitshuffle/LZ4 to the standard bitshuffle/Zstd HDF5 filter. Every other
object (groups, datasets, attributes, the dataset's own attributes,
dims/dtype/chunking/block size) is reproduced unchanged.

It writes a fresh file - only /entry/data/data is re-encoded, every other object
is H5Ocopy'd verbatim - which then atomically replaces the original via rename().
This needs no h5repack (the new file has no leftover space) and is crash-safe
(the original is opened read-only until the rename). Frames are streamed one at a
time through the registered bitshuffle filter (decompress LZ4, compress Zstd), so
it is dtype-agnostic and never holds the whole dataset in memory.

Output is read by the standard bitshuffle+zstd HDF5 plugin (verified against the
hdf5plugin/DIALS libh5bshuf.so, which links libzstd and supports the zstd mode).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 15:24:30 +02:00
leonarski_fandClaude Opus 4.8 809f6f92a3 Regenerate OpenAPI clients for bszstd_rlehuf compression value
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m54s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m31s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m51s
Build Packages / build:rpm (rocky8) (push) Successful in 14m49s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m5s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m5s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m48s
Build Packages / XDS test (durin plugin) (push) Successful in 7m55s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m50s
Build Packages / Generate python client (push) Successful in 34s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 1m10s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m36s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m7s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m1s
Build Packages / build:rpm (rocky9) (push) Successful in 13m7s
Build Packages / DIALS test (push) Successful in 12m45s
Build Packages / Unit tests (push) Successful in 1h14m59s
Build Packages / build:windows (push) Successful in 18m31s
update_version.sh regenerated the TypeScript client (types.gen.ts, zod.gen.ts)
and Redoc docs to include the new "bszstd_rlehuf" compression enum value added
to jfjoch_api.yaml; the package-lock version field follows VERSION. The C++
server model treats compression as a plain string, so it needed no change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 14:52:12 +02:00
leonarski_fandClaude Opus 4.8 ac75177c5a Test: prove Huffman-literals Compressed_Block with Number_of_Sequences=0 is valid
Builds a single Compressed_Block (Huffman-coded Literals_Section, empty
Sequences_Section) and checks: the block type is Compressed, its trailing
Number_of_Sequences byte is 0, and stock ZSTD_decompress reconstructs the
literals exactly. This is the format guarantee from zstd_compression_format.md
("if Number_of_Sequences == 0 ... Block's decompressed content is defined solely
by the Literals Section content"), locked into the test suite.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 14:47:16 +02:00
leonarski_fandClaude Opus 4.8 7e7a73062c Compression: add BSHUF_ZSTD_RLE_HUFF (RLE runs + Huffman literals)
New CompressionAlgorithm that emits a standard Zstandard frame: zero/0xFF runs
become RLE_Blocks (like BSHUF_ZSTD_RLE) and literal regions become
Compressed_Blocks with per-block adaptive Huffman literals and no sequences
(Number_of_Sequences=0). Short runs are absorbed into the literal stream;
incompressible literals fall back to Raw_Blocks so the worst case stays within
ZSTD_compressBound.

The Huffman tree + bitstream are produced by zstd's own HUF_compress{1,4}X_repeat
(the same calls ZSTD_compressLiterals uses); only the frame/block/literals-section
framing is hand-written, with comments citing zstd_compression_format.md so it can
be checked clause by clause. Output decodes with stock ZSTD_decompress, so no
reader changes are needed (decode routes like BSHUF_ZSTD).

On sparse diffraction this gives ~12% smaller files than bitshuffle/LZ4 at about
the same end-to-end speed, sitting between LZ4 and full ZSTD; for maximum ratio
use BSHUF_ZSTD. Robust on any input: tests round-trip pure zeros, Poisson(10),
Mersenne-Twister noise (checked against the size bound), an extreme-sparsity mask,
and a real lyso image through stock ZSTD_decompress.

API: exposed as "bszstd_rlehuf"; regenerate the Python/TS clients (update_version.sh)
to surface the new value there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 14:41:46 +02:00
leonarski_fandClaude Opus 4.8 02514bb6b7 Compressor: throw on overflow instead of returning a negative size
Compress() and FrameTransformation::CompressImage() returned int64_t with a
negative value meaning "did not fit". That is a footgun: the negative result
silently converts to a huge size_t if a caller forgets to check it. Return
size_t and instead throw a named CompressionBufferTooSmallException (deriving
from JFJochException, Compression category) when the output would not fit the
destination buffer.

The receiver catches it explicitly and drops just that frame, as before; the
offline/GetCompressedImage path uses a worst-case buffer so it never throws.
Add a test that a too-small destination throws and a worst-case buffer does not.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 08:17:21 +02:00
leonarski_fandClaude Opus 4.8 74584c23ac Compressor: scale block size to a per-algorithm byte target
Replace the fixed-element DefaultBlockSize with a byte target divided by
elem_size to get the block element count, so the per-block working set (and
thus cache behaviour) stays constant across pixel bit depths instead of halving
from 8- to 16- to 32-bit. The target is per-algorithm, following the measured
sweet spots on sparse data: LZ4 wants a small, cache-resident block for
throughput (16 kB), ZSTD/RLE want a large block for ratio (128 kB). The gap is
widest on extreme-sparsity inputs such as the uint32 pixel_mask, where
large-block ZSTD reaches 100-1800x vs ~160x for LZ4.

The block size is read back per-dataset from the bitshuffle stream header
(block_size = header_bytes / elem_size) and the HDF5 filter params, so the
decompressor and external readers (XDS/Neggia/Durin/CrystFEL) need no change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 07:56:08 +02:00
leonarski_fandClaude Opus 4.8 aadba5b343 Compressor: bump bitshuffle block size 4096 -> 16384 elements
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m4s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m42s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m52s
Build Packages / build:rpm (rocky8) (push) Successful in 14m50s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m0s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m34s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m42s
Build Packages / XDS test (durin plugin) (push) Successful in 8m25s
Build Packages / Generate python client (push) Successful in 31s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m32s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m17s
Build Packages / Build documentation (push) Successful in 59s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m12s
Build Packages / build:rpm (rocky9) (push) Successful in 12m52s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m22s
Build Packages / DIALS test (push) Successful in 13m0s
Build Packages / Unit tests (push) Successful in 59m47s
Build Packages / build:windows (push) Failing after 12m51s
On sparse lyso frames the larger block improves compression ratio across all
bshuf algorithms (16-bit data): ZSTD 8.58 -> 9.30, LZ4 7.38 -> 7.58, RLE
6.82 -> 6.90. 16384 captures most of the gain available from even larger
blocks (ZSTD tops out ~9.55 at 65536) while staying close to the cache sweet
spot: the cheap codecs (LZ4, RLE) peak in throughput once a block's working
set fits L1d (~4096 elem here), so very large blocks trade real throughput for
diminishing ratio - and that penalty is worse on the Xeon Gold/Platinum
production hosts (smaller private L2, shared-L3 contention under many parallel
compression threads).

The block size is stored per-dataset in the bitshuffle HDF5 filter params, so
existing readers (XDS/Neggia/Durin/CrystFEL) stay compatible.

Move the per-block bitshuffle scratch off the inline member array onto a
lazily-sized heap vector, like tmp_space, so the block size no longer bloats
every stack-allocated compressor (incl. the transient ones in
CBORStream2Serializer).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 20:59:55 +02:00
leonarski_fandClaude Opus 4.8 c332e45a54 Compressor: make Compress size-aware, drop frames that don't fit
JFJochBitShuffleCompressor::Compress now takes a dest_size and returns a
negative value when the compressed output would not fit, instead of writing
past the destination buffer. The check is lazy: before each block it verifies
the remaining space still covers that block's worst case (mirrored by the new
MaxCompressedBlockSize helper, consistent with MaxCompressedSize so a dest
sized to MaxCompressedSize never fails). On overflow the dest content is
undefined - no rescue.

The receiver uses this to compress directly into the writer buffer slot and
drop just the oversized frame instead of pre-reserving the full worst-case
image size next to the per-image CBOR metadata.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 20:10:52 +02:00
leonarski_f 5aad009cd7 CI: Build all on Windows (not only jfjoch_viewer target) 2026-06-26 18:27:33 +02:00
leonarski_f 62a7fb3ab6 Use vcvars64.bat for all build steps 2026-06-26 18:26:46 +02:00
leonarski_f 8e40822e5b Build viewer on Windows 2026-06-26 18:26:46 +02:00
leonarski_fandClaude Opus 4.8 2398330e52 Drop oversized-metadata frames instead of aborting the collection
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m55s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m54s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 15m1s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m11s
Build Packages / build:rpm (rocky8) (push) Successful in 15m6s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 15m16s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 15m58s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m52s
Build Packages / XDS test (durin plugin) (push) Successful in 8m9s
Build Packages / Generate python client (push) Successful in 29s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 8m8s
Build Packages / Build documentation (push) Successful in 59s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m17s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m12s
Build Packages / DIALS test (push) Successful in 12m20s
Build Packages / build:rpm (rocky9) (push) Successful in 13m38s
Build Packages / Unit tests (push) Successful in 1h0m37s
A serial-crystallography run on a detector with a large converted geometry
(JF17T16, modules tiled vertically + horizontally) aborted with
"Array out of bounds (Not enough memory to save image)". An indexed still on
such a detector predicts/integrates close to the kMaxReflections (10000) cap;
at ~170 B per serialized Reflection that is ~1.7 MB of per-image CBOR metadata,
which overflowed the fixed 1 MB the buffer slot reserved on top of the image.
The serialization guard then threw and cancelled the whole run.

- Raise the per-image metadata headroom from 1 MB to 4 MB
  (GetImageBufferLocationSize). The worst case - 10000 reflections + 2000 spots
  (API max) + 65534 azimuthal bins - serializes to 2.78 MB, leaving margin while
  staying negligible next to the multi-MB image slot.
- When metadata still does not fit, drop just that frame (log metadata/image/slot
  sizes + recycle the slot) instead of aborting, in both the FPGA and Lite
  receivers.
- Add a regression test asserting the worst-case metadata fits the headroom.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 17:11:41 +02:00
leonarski_fandClaude Opus 4.8 786af96b3b SearchSpaceGroup: POINTLESS-style rewrite, pipeline integration, twinning test
Space-group search (image_analysis/scale_merge/SearchSpaceGroup):
- Two-stage POINTLESS-style determination. Stage A scores each distinct rotation
  operator once (was once per candidate space group, ~34x faster on lysozyme:
  ~26s -> <1s) and picks the largest point group all of whose operators confirm.
  Stage B picks the maximal space group whose predicted absences are confirmed
  weak, fixing the prototype's default to the symmorphic group (it returned P422
  instead of P4(3)2(1)2). Enantiomorphic / origin-ambiguous pairs (P4(1) vs P4(3),
  I222 vs I2(1)2(1)2(1)) are reported as indistinguishable.
- Constrain candidates to subgroups of the lattice (metric) holohedry and weigh
  centering only P-vs-metric, fed from rotation indexing's LatticeSearch result.

Integration / pipeline:
- With no user-fixed space group, predict in P (IndexAndRefine) so the
  centering-absent reflections are integrated and the search can confirm/deny
  centering (catching pseudo-centering / a missed superstructure) instead of
  trusting the metric; a user-fixed group still rejects absences in integration.
- JFJochProcess: scale+merge in P1 -> determine the space group -> set it and
  re-scale+merge in it (statistics then come out in the right symmetry) -> write
  it to /entry/sample/space_group_number (new EndMessage.space_group_number,
  preferred by NXmx::Sample). jfjoch_scale no longer searches; it consumes the
  file's space group (and no longer clobbers it with an empty -S).

Twinning (new image_analysis/scale_merge/TwinningAnalysis): Padilla-Yeates L-test
(<|L|>, <L^2>; acentric-only, positive intensities so L is bounded) plus a
shell-normalised <I^2>/<I>^2 second moment and a twin-fraction estimate. Reported
after the final merge in jfjoch_process and jfjoch_scale, and surfaced in the
jfjoch_viewer merge-statistics window with a red outline when twinning is suspected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 16:11:28 +02:00
leonarski_fandClaude Opus 4.8 d2159bde92 jfjoch_viewer: Grey out "Analyze dataset" on a live HTTP connection
Dataset re-processing reads a stored HDF5 file, so it is unavailable for
the live HTTP stream. Disable the "Analyze dataset" hero button while a
source is connected (with an explanatory tooltip) instead of letting the
user click through to a "open a file first" dialog afterwards.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 11:42:44 +02:00
leonarski_f 54c667190f v1.0.0-rc.155 (#65)
Build Packages / Unit tests (push) Successful in 1h26m8s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m38s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m45s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m39s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m55s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m51s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m35s
Build Packages / build:rpm (rocky8) (push) Successful in 12m28s
Build Packages / build:rpm (rocky9) (push) Successful in 13m20s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m15s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m43s
Build Packages / DIALS test (push) Successful in 14m21s
Build Packages / XDS test (durin plugin) (push) Successful in 7m48s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m52s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m31s
Build Packages / Generate python client (push) Successful in 15s
Build Packages / Build documentation (push) Successful in 53s
Build Packages / Create release (push) Skipped
This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use.

* jfjoch_process: Remove pixelrefine option (replaced with ProfileIntegrate2D)
* jfjoch_viewer: Some graphical improvements.
* jfjoch_viewer: Simplify und unify data analysis settings.
* jfjoch_writer: Add TCP keepalive to increase robustness if jfjoch_broker "dies" in the middle of data acquisition.

Reviewed-on: #65
2026-06-25 22:01:48 +02:00
leonarski_f 6136f858af v1.0.0-rc.154 (#64)
Build Packages / Unit tests (push) Successful in 1h26m51s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m23s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m56s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m43s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 12m53s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m44s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m22s
Build Packages / build:rpm (rocky8) (push) Successful in 13m1s
Build Packages / build:rpm (rocky9) (push) Successful in 14m6s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 13m0s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m51s
Build Packages / DIALS test (push) Successful in 13m52s
Build Packages / XDS test (durin plugin) (push) Successful in 9m24s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m35s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m57s
Build Packages / Generate python client (push) Successful in 35s
Build Packages / Build documentation (push) Successful in 47s
Build Packages / Create release (push) Skipped
This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use.

* jfjoch_broker: Fix to TCP file pusher (remove kernel zero copy to improve reliability)

Reviewed-on: #64
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-06-25 18:12:00 +02:00
leonarski_f 75e401f0e5 v1.0.0-rc.153 (#63)
Build Packages / Unit tests (push) Successful in 1h31m59s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 8m43s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m5s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 9m27s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m56s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 9m24s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m27s
Build Packages / build:rpm (rocky8) (push) Successful in 9m20s
Build Packages / build:rpm (rocky9) (push) Successful in 10m50s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m54s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m38s
Build Packages / DIALS test (push) Successful in 12m13s
Build Packages / XDS test (durin plugin) (push) Successful in 7m8s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m8s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m50s
Build Packages / Generate python client (push) Successful in 16s
Build Packages / Build documentation (push) Successful in 50s
Build Packages / Create release (push) Skipped
This is an UNSTABLE release. It includes many experimental features, as well as many AI generated fixes. We recommend using rc.152 for production use.

* jfjoch_broker: Add EXPERIMENTAL pixelrefine mode for image processing
* jfjoch_broker: Allow to load user mask from 8-bit and 16-bit TIFF files
* jfjoch_broker: Add ROI calculation in non-FPGA workflow
* jfjoch_broker: Fixes to TCP image pusher
* jfjoch_broker: Remove NUMA bindings
* jfjoch_broker: Improvements to indexing
* jfjoch_broker: For PSI EIGER, trimming energies are taken from the detector configuration (now compulsory) instead of hardcoded values
* jfjoch_writer: Save ROI definitions and the per-pixel ROI bitmap in the master file; azimuthal ROIs support phi (angular) sectors
* jfjoch_viewer: Major redesign with dockable panels and saved layouts, plus on-canvas creation/move/resize of box, circle and azimuthal ROIs
* jfjoch_viewer: Run jfjoch_process reprocessing jobs from inside the GUI and overlay per-run results

Reviewed-on: #63
2026-06-23 20:29:49 +02:00
leonarski_f c49bd2ac3b v1.0.0-rc.152 (#62)
Build Packages / XDS test (neggia plugin) (push) Successful in 6m2s
Build Packages / Unit tests (push) Successful in 1h37m1s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m4s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m30s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m52s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m53s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m38s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m30s
Build Packages / build:rpm (rocky8) (push) Successful in 10m47s
Build Packages / build:rpm (rocky9) (push) Successful in 11m48s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m40s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m44s
Build Packages / DIALS test (push) Successful in 12m59s
Build Packages / XDS test (durin plugin) (push) Successful in 8m33s
Build Packages / Generate python client (push) Successful in 16s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m24s
Build Packages / Build documentation (push) Successful in 57s
Build Packages / Create release (push) Skipped
* jfjoch_broker: Fix bounds for azimuthal integration for Q spacing (allow Q of 1e-5)
* jfjoch_viewer: Adjust Q bounds for azimuthal integration
* jfjoch_azint: Add tool to do quick azimuthal integration

Reviewed-on: #62
2026-06-17 20:36:24 +02:00
leonarski_f ef52dac2ee v1.0.0-rc.151 (#61)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m34s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m52s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m54s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 9m48s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m50s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m54s
Build Packages / build:rpm (rocky8) (push) Successful in 12m46s
Build Packages / build:rpm (rocky9) (push) Successful in 11m56s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m34s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m54s
Build Packages / DIALS test (push) Successful in 13m1s
Build Packages / XDS test (durin plugin) (push) Successful in 8m32s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m44s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m3s
Build Packages / Generate python client (push) Successful in 13s
Build Packages / Build documentation (push) Successful in 47s
Build Packages / Create release (push) Skipped
Build Packages / Unit tests (push) Successful in 43m38s
* jfjoch_broker: For PSI EIGER detector allow to disable individual half-modules by putting empty hostname

Reviewed-on: #61
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-06-16 14:13:29 +02:00
leonarski_f 90e804acd7 v1.0.0-rc.150 (#60)
Build Packages / Unit tests (push) Successful in 42m49s
Build Packages / DIALS test (push) Successful in 29m45s
Build Packages / XDS test (durin plugin) (push) Successful in 19m27s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 18m52s
Build Packages / XDS test (neggia plugin) (push) Successful in 13m0s
Build Packages / Generate python client (push) Successful in 28s
Build Packages / Build documentation (push) Successful in 1m25s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m53s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m49s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m7s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 13m9s
Build Packages / build:rpm (rocky8) (push) Successful in 13m24s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m11s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m15s
Build Packages / build:rpm (rocky9) (push) Successful in 14m30s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m14s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m5s
* jfjoch_broker: When in FPGA workflow (with PSI detectors) azimuthal integration might be forced to CPU - this will require more computational power, but it enables more integration bins and reports standard deviation of each bin.
* jfjoch_broker: Raise error if one is in FPGA flow and there are too many azimuthal integration bins.

Reviewed-on: #60
2026-06-15 20:24:15 +02:00
leonarski_f ea575f790a v1.0.0-rc.149 (#59)
Build Packages / Unit tests (push) Skipped
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 24m44s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 23m45s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 26m12s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 26m53s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 28m49s
Build Packages / build:rpm (rocky8) (push) Successful in 25m28s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 29m49s
Build Packages / XDS test (durin plugin) (push) Successful in 18m59s
Build Packages / Generate python client (push) Successful in 51s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 23m42s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 1m51s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 26m30s
Build Packages / XDS test (neggia plugin) (push) Successful in 19m47s
Build Packages / build:rpm (rocky9) (push) Successful in 29m37s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 22m18s
Build Packages / DIALS test (push) Successful in 30m9s
* XDS plugin: Fix HDF5 mutex to run on multiple processors

Reviewed-on: #59
2026-06-13 21:27:41 +02:00
leonarski_f cc3eb8352c v1.0.0-rc.148 (#58)
Build Packages / Unit tests (push) Skipped
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m28s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m9s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 9m47s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m58s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m39s
Build Packages / build:rpm (rocky8) (push) Successful in 11m43s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 12m59s
Build Packages / Generate python client (push) Successful in 35s
Build Packages / Build documentation (push) Successful in 59s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m48s
Build Packages / build:rpm (rocky9) (push) Successful in 12m32s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m24s
Build Packages / XDS test (durin plugin) (push) Successful in 7m35s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m50s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m40s
Build Packages / DIALS test (push) Successful in 11m19s
This is an UNSTABLE release. The release has significant modifications for data processing - in case of troubles go back to 1.0.0-rc.144.

* jfjoch_broker: Improve azimuthal integration (add <I^2> calculation)
* jfjoch_broker: Fixes around indexing, aiming to handle multi-lattice crystals (work in progress, it is not fully integrated)
* jfjoch_writer: Save mean(I), stddev(I), and count(I) for each azimuthal bin

Reviewed-on: #58
2026-06-08 08:30:35 +02:00
leonarski_f 75de40f52b v1.0.0-rc.147 (#57)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 7m27s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 8m20s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 7m35s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 5m59s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 7m25s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 8m30s
Build Packages / build:rpm (rocky8) (push) Successful in 7m39s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 8m16s
Build Packages / build:rpm (rocky9) (push) Successful in 9m35s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m6s
Build Packages / Generate python client (push) Successful in 12s
Build Packages / Build documentation (push) Successful in 31s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (durin plugin) (push) Successful in 7m6s
Build Packages / DIALS test (push) Successful in 12m3s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m11s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 5m50s
Build Packages / Unit tests (push) Successful in 57m33s
This is an UNSTABLE release. The release has significant modifications for data processing - in case of troubles go back to 1.0.0-rc.144.

* jfjoch_viewer: Add reciprocal space viewer
* jfjoch_process: Two pass algorithm that does spot finding/indexing + integration of full dataset
* jfjoch_process: Improve logic for rotation indexer, to make execution more deterministic (still work in progress)

Reviewed-on: #57
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-06-02 11:49:24 +02:00
leonarski_f fc68a9baed v1.0.0-rc.146 (#56)
Build Packages / Unit tests (push) Skipped
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 8m34s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m0s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m23s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 10m23s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m16s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m49s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m32s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m15s
Build Packages / XDS test (durin plugin) (push) Successful in 7m16s
Build Packages / Generate python client (push) Successful in 16s
Build Packages / build:rpm (rocky9) (push) Successful in 10m12s
Build Packages / Create release (push) Skipped
Build Packages / Build documentation (push) Successful in 47s
Build Packages / DIALS test (push) Successful in 10m18s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 5m46s
Build Packages / build:rpm (rocky8) (push) Successful in 1h41m2s
Build Packages / XDS test (neggia plugin) (push) Successful in 1h59m18s
This is an UNSTABLE release. The release has significant modifications for data processing - in case of troubles go back to 1.0.0-rc.144.

jfjoch_process: Generate a dedicated file (_process.h5), which can be used as a replacement for the _master.h5 file for a reanalyzed dataset.
jfjoch_process: Improve the performance of scaling and merging, implement on the fly scaling.
jfjoch_writer: All final data analysis results are repopulated in the _master.h5 file.
jfjoch_scale: Dedicated tool for rescaling/merging existing data.
jfjoch_viewer: Fix bugs where pixel labels where displayed on a wrong pixel.

WARNING! Scaling and merging are experimental at the moment, and may not provide reasonable results for the time being.

Reviewed-on: #56
2026-05-28 18:48:35 +02:00
leonarski_f 75f1c5f954 SHIM library improvements from the HDF Group
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m40s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 15m26s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 17m15s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 17m22s
Build Packages / build:rpm (rocky8) (push) Successful in 17m28s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 17m42s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m32s
Build Packages / build:rpm (rocky9) (push) Successful in 10m0s
Build Packages / Generate python client (push) Successful in 43s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m31s
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 57s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m46s
Build Packages / XDS test (durin plugin) (push) Successful in 11m1s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 10m54s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m58s
Build Packages / DIALS test (push) Successful in 13m41s
Build Packages / Unit tests (push) Successful in 1h1m14s
2026-05-08 11:39:51 +02:00
leonarski_f caef26873e v1.0.0-rc.145 (#55)
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 16m26s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m26s
Build Packages / build:rpm (rocky8) (push) Successful in 17m23s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 17m32s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m16s
Build Packages / build:rpm (rocky9) (push) Successful in 12m45s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m58s
Build Packages / XDS test (durin plugin) (push) Successful in 11m22s
Build Packages / DIALS test (push) Successful in 14m28s
Build Packages / Generate python client (push) Successful in 1m1s
Build Packages / Build documentation (push) Successful in 2m40s
Build Packages / Create release (push) Has been skipped
Build Packages / XDS test (neggia plugin) (push) Successful in 10m52s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 15m2s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 17m25s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m49s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 11m34s
Build Packages / Unit tests (push) Successful in 44m51s
This is an UNSTABLE release. The release has significant modifications for HDF5 writing logic - in case of troubles go back to 1.0.0-rc.144.

* **Default HDF5 writing mode is with VDS, not soft-links** - this improves DIALS compatibility and makes format more future-proof, NXmx legacy format might be phased-out in the future.
* XDS plugin: Improve performance of VDS reading.
* jfjoch_writer: Significant improvement on how file systems I/O are handled through a dedicated pass-through VFD.
* jfjoch_writer: Clean-up of HDF5 routines to better handle issues.

Reviewed-on: #55
2026-05-06 21:50:02 +02:00
leonarski_f 7d34e8a049 v1.0.0-rc.144 (#54)
Build Packages / build:rpm (ubuntu2404) (push) Successful in 8m58s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 11m53s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m39s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 7m34s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 9m18s
Build Packages / build:rpm (rocky8) (push) Successful in 10m4s
Build Packages / build:rpm (rocky9) (push) Successful in 11m17s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m47s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 10m47s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 10m33s
Build Packages / Generate python client (push) Successful in 27s
Build Packages / Unit tests (push) Has been skipped
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 1m8s
Build Packages / XDS test (durin plugin) (push) Successful in 7m40s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m23s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m9s
Build Packages / DIALS test (push) Successful in 11m15s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132.

* jfjoch_broker: Improve performance of preview JPEG image generator at receiver startup (saving about 150 ms on measurement start for 16M)

Reviewed-on: #54
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-05-01 17:06:36 +02:00
leonarski_f 6e0bb971ac v1.0.0-rc.143 (#53)
Build Packages / Unit tests (push) Successful in 1h13m11s
Build Packages / Generate python client (push) Successful in 33s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 14m1s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 15m12s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m34s
Build Packages / build:rpm (rocky8) (push) Successful in 15m43s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 16m35s
Build Packages / build:rpm (rocky9) (push) Successful in 16m19s
Build Packages / XDS test (durin plugin) (push) Successful in 12m11s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 14m1s
Build Packages / DIALS test (push) Successful in 16m59s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m32s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 15m12s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 11m33s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m25s
Build Packages / Build documentation (push) Successful in 58s
Build Packages / XDS test (neggia plugin) (push) Successful in 10m33s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132.

jfjoch_broker: Avoid copying gain calibration together with DiffractionExperiment

Reviewed-on: #53
2026-04-30 22:16:50 +02:00
leonarski_f 87fde1b32e v1.0.0-rc.142 (#52)
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 16m19s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 16m29s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m51s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 9m17s
Build Packages / build:rpm (rocky8) (push) Successful in 12m7s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m34s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m44s
Build Packages / build:rpm (rocky9) (push) Successful in 16m4s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m49s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m56s
Build Packages / Generate python client (push) Successful in 1m0s
Build Packages / Unit tests (push) Has been skipped
Build Packages / Create release (push) Has been skipped
Build Packages / Build documentation (push) Successful in 1m43s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m14s
Build Packages / XDS test (durin plugin) (push) Successful in 8m58s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m44s
Build Packages / DIALS test (push) Successful in 13m4s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132.

* Support for newer CUDA architectures (notably Blackwell); minimum CUDA version 12.8
* Minor changes to jfjoch_process, jfjoch_fpga_test and jfjoch_lite_perf_test to make them more consistent

Reviewed-on: #52
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-04-30 16:47:53 +02:00
leonarski_f d760b12a18 v1.0.0-rc.141 (#51)
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m32s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m19s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m49s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m37s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m23s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m44s
Build Packages / build:rpm (rocky8) (push) Successful in 9m15s
Build Packages / build:rpm (rocky9) (push) Successful in 12m14s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m28s
Build Packages / Generate python client (push) Successful in 21s
Build Packages / XDS test (durin plugin) (push) Successful in 8m58s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 12m7s
Build Packages / Build documentation (push) Successful in 42s
Build Packages / Create release (push) Has been skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 8m24s
Build Packages / DIALS test (push) Successful in 14m1s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m26s
Build Packages / Unit tests (push) Failing after 1h20m14s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132.

* jfjoch_broker: Azimuthal integration mapping is generated with parallel computations, significantly reducing setup times
* frontend: Fix selection of FFTW in indexing settings

Reviewed-on: #51
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-04-30 13:04:54 +02:00
leonarski_f 239a441ee6 v1.0.0-rc.140 (#50)
Build Packages / Unit tests (push) Successful in 1h20m34s
Build Packages / build:rpm (rocky8) (push) Successful in 13m32s
Build Packages / Generate python client (push) Successful in 24s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 13m6s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 11m32s
Build Packages / XDS test (durin plugin) (push) Successful in 10m49s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 14m8s
Build Packages / DIALS test (push) Successful in 14m57s
Build Packages / Build documentation (push) Successful in 47s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 13m30s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 14m23s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 14m40s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 13m14s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 11m55s
Build Packages / build:rpm (rocky9) (push) Successful in 14m23s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m48s
Build Packages / XDS test (neggia plugin) (push) Successful in 7m10s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132.

* jfjoch_broker: For DECTRIS detectors, ZeroMQ link is persistent, to save time for establishing new connection
* jfjoch_broker: Minor bug fixes for rare conditions

Reviewed-on: #50
2026-04-29 21:40:22 +02:00
leonarski_f 4878318c27 v1.0.0-rc.139 (#49)
Build Packages / Unit tests (push) Successful in 1h17m4s
Build Packages / Generate python client (push) Successful in 1m24s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m34s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 12m37s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 11m11s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 12m4s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m59s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 13m4s
Build Packages / build:rpm (rocky8) (push) Successful in 13m12s
Build Packages / XDS test (durin plugin) (push) Successful in 9m57s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m52s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m30s
Build Packages / build:rpm (rocky9) (push) Successful in 13m59s
Build Packages / Build documentation (push) Successful in 1m7s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m24s
Build Packages / Create release (push) Has been skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m54s
Build Packages / DIALS test (push) Successful in 13m14s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132.

* jfjoch_broker: Further reduce startup time for DECTRIS detectors by selectively modifying SIMPLON parameters on `/start`
* jfjoch_broker: Further reduce startup time for DECTRIS detectors by not setting beam center and detector distance via SIMPLON API on '/start'
* jfjoch_broker: Add an extra message to ZeroMQ puller ready to monitor Lite worklow preparation time
* jfjoch_broker: Image buffer configuration is postponed for Lite receiver flow till start message is received
* jfjoch_broker: Use nanoseconds internally for frame/image/readout time
* jfjoch_broker: Extra messages added for receiver operation (to be removed after debugging finished)
* jfojch_broker: Improve profiling of different data analysis steps
* jfjoch_broker: Record integration reflection count
* jfjoch_broker: Fix bug where ZeroMQ preview frequency was confusing time units (micro vs. milliseconds)
* jfjoch_broker: Fix bug where '/wait_till_done' got deadlocked
* jfjoch_writer: Fix confusion between NaN and zero in floating-point datasets

**Breaking changes**: detector definition is now using nanoseconds to define minimum frame time, minimum count time and readout time.

Reviewed-on: #49
2026-04-29 09:50:50 +02:00
leonarski_fandtakaba_k 230480e390 v1.0.0-rc.138 (#48)
Build Packages / XDS test (durin plugin) (push) Successful in 8m5s
Build Packages / DIALS test (push) Successful in 12m55s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 14m41s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m13s
Build Packages / build:rpm (rocky8) (push) Successful in 18m17s
Build Packages / build:rpm (rocky9) (push) Successful in 19m14s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 9m59s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 9m17s
Build Packages / Generate python client (push) Successful in 1m15s
Build Packages / XDS test (neggia plugin) (push) Successful in 9m58s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 14m14s
Build Packages / Create release (push) Has been skipped
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 11m9s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 18m21s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m14s
Build Packages / Build documentation (push) Successful in 1m43s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 10m14s
Build Packages / Unit tests (push) Successful in 57m40s
This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132.

    jfjoch_broker: Cleanup DECTRIS start-up code to enable a shorter start time
    jfjoch_broker: Allow for asynchronous start to allow overlapping detector configuration with other beamline preparations
    jfjoch_broker: Goniometer axis name is converted to lowercase
    jfjoch_broker: Fix bug, where wrong HTTP error codes were returned
    jfjoch_broker: Improve sigma estimation during merging (K. Takaba)

---------

Co-authored-by: takaba_k <kiyofumi.takaba@psi.ch>
Reviewed-on: #48
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
Co-committed-by: Filip Leonarski <filip.leonarski@psi.ch>
2026-04-27 19:56:14 +02:00
927 changed files with 78001 additions and 19581 deletions
+3
View File
@@ -1,2 +1,5 @@
*.mcs filter=lfs diff=lfs merge=lfs -text
*.mcs.gz filter=lfs diff=lfs merge=lfs -text
# Large reference datasets for the [large] Catch tests (git-LFS; may not be pulled in CI).
tests/data/*.h5 filter=lfs diff=lfs merge=lfs -text
+160 -40
View File
@@ -1,5 +1,8 @@
name: Build Packages
env:
MARCH_CMAKE_FLAGS: '-DCMAKE_CXX_FLAGS="-march=x86-64-v3" -DCMAKE_C_FLAGS="-march=x86-64-v3"'
on:
push:
branches:
@@ -16,6 +19,146 @@ on:
default: false
jobs:
unit-tests:
name: Unit tests
runs-on: jfjoch_rocky8
if: github.ref_type != 'tag' && github.ref_type != 'workflow_dispatch'
container:
image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2511
options: --gpus all
timeout-minutes: 90
env:
CTEST_OUTPUT_ON_FAILURE: '1'
steps:
- uses: actions/checkout@v4
- name: Configure auth and fetch LFS
shell: bash
env:
GITEA_TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }}
run: |
git lfs install --local
AUTH=$(git config --local http.${{ github.server_url }}/.extraheader)
git config --local --unset http.${{ github.server_url }}/.extraheader
git config --local http.${{ github.server_url }}/${{ github.repository }}.git/info/lfs/objects/batch.extraheader "$AUTH"
git lfs pull
- name: Build tests
shell: bash
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ env.MARCH_CMAKE_FLAGS }} ..
ninja -j48 jfjoch_test jfjoch_hdf5_test jfjoch_hdf5_enospc_test enospc_shim
- name: Run unit tests
shell: bash
run: |
cd build/tests
./jfjoch_test
- name: HDF5 ENOSPC test
shell: bash
run: |
cd build/tests
LD_PRELOAD=./enospc_shim.so ./jfjoch_hdf5_enospc_test HDF5File_enospc
LD_PRELOAD=./enospc_shim.so ./jfjoch_hdf5_enospc_test FileWriter_enospc
- name: Run hdf5 test
shell: bash
run: |
cd build/tools
./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5
build-windows:
name: build:windows:${{ matrix.variant }}
runs-on: windows-11-cuda-qt
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- variant: cuda
use_cuda: 'ON'
- variant: nocuda
use_cuda: 'OFF'
steps:
- uses: actions/checkout@v4
- name: Configure viewer build
shell: cmd
run: |
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "VSPATH=%%i"
call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat"
cmake -G Ninja -B build -DJFJOCH_USE_CUDA=${{ matrix.use_cuda }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH="C:/deps;C:/Qt/6.11.1/msvc2022_64"
- name: Build viewer
shell: cmd
run: |
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "VSPATH=%%i"
call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat"
cmake --build build
- name: Build installer (NSIS)
shell: cmd
run: |
for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "VSPATH=%%i"
call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat"
cd build
cpack
- name: Upload installer to release
if: github.ref_type == 'tag'
shell: powershell
env:
TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }}
run: |
# NSIS installer named jfjoch-<version>-win64-{cuda<major>|cpu}.exe (see CMakeLists.txt).
$files = Get-ChildItem -Path build -Filter 'jfjoch-*-win64-*.exe'
if ($files.Count -eq 0) { throw 'No Windows installer found in build/' }
foreach ($file in $files) {
python gitea_upload_file.py $file.FullName
if ($LASTEXITCODE -ne 0) { throw "Upload failed for $($file.Name)" }
}
build-viewer-tgz:
name: build:viewer-tgz:${{ matrix.variant }}
runs-on: jfjoch_rocky8
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- variant: cuda
use_cuda: 'ON'
- variant: cpu
use_cuda: 'OFF'
steps:
- uses: actions/checkout@v4
- name: Configure viewer build
shell: bash
run: |
mkdir -p build
cd build
cmake -G Ninja -DJFJOCH_VIEWER_ONLY=ON -DJFJOCH_USE_CUDA=${{ matrix.use_cuda }} ${{ env.MARCH_CMAKE_FLAGS }} -DCMAKE_BUILD_TYPE=Release ..
- name: Build viewer tgz
shell: bash
run: |
cd build
# Build the whole viewer-only tree, not just the GUI: the "viewer" CPack component also
# contains the portable CLI tools (jfjoch_process/scale/azint/recompress/extract_hkl),
# which must exist on disk before cpack installs the component.
ninja -j16
cpack
- name: Upload viewer tgz to release
if: github.ref_type == 'tag'
shell: bash
env:
TOKEN: ${{ secrets.PIP_REPOSITORY_API_TOKEN }}
run: |
set -euo pipefail
shopt -s nullglob
# CMakeLists.txt names the archive jfjoch_viewer-<version>-linux-{cuda<major>|cpu}.tar.gz;
# rename to .tgz (matching the Windows installer's release naming) before upload.
files=(build/jfjoch_viewer-*.tar.gz)
if [ ${#files[@]} -eq 0 ]; then
echo "No viewer archive found in build/"
exit 1
fi
for file in "${files[@]}"; do
tgz="${file%.tar.gz}.tgz"
mv "$file" "$tgz"
python3 gitea_upload_file.py "$tgz"
done
build-rpm:
name: build:rpm (${{ matrix.distro }})
if: github.ref_type != 'workflow_dispatch'
@@ -81,7 +224,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -G Ninja -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_flags }} ..
cmake -G Ninja -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON ${{ env.MARCH_CMAKE_FLAGS }} -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake_flags }} ..
- name: Build packages
shell: bash
run: |
@@ -102,23 +245,30 @@ jobs:
echo "No package files found for pattern: ${{ matrix.pkg_glob }}"
exit 1
fi
url="${{ matrix.upload_url }}"
if [[ "$url" == *"/rpm/"* ]]; then
url="${url}?sign=true"
fi
for file in "${files[@]}"; do
echo "Uploading $file -> ${{ matrix.upload_url }}"
curl --fail --user __token__:"$TOKEN" --upload-file "$file" "${{ matrix.upload_url }}"
echo "Uploading $file -> $url"
curl --fail --user __token__:"$TOKEN" --upload-file "$file" "$url"
done
cd ..
# The viewer is shipped to the release as a Linux-version-agnostic .tgz by the
# build-viewer-tgz job; only the writer (and the XDS plugin .so on rocky8) go to the
# release as distro packages here.
if [ "${{ matrix.distro }}" = "rocky8_nocuda" ]; then
for file in build/jfjoch-viewer*.rpm build/jfjoch-writer*rpm build/xds-plugin/libjfjoch_xds_plugin.so.*; do
for file in build/jfjoch-writer*rpm build/xds-plugin/libjfjoch_xds_plugin.so.*; do
python3 gitea_upload_file.py "$file"
done
elif [ "${{ matrix.distro }}" = "rocky9_nocuda" ]; then
for file in build/jfjoch-viewer*.rpm build/jfjoch-writer*rpm; do
for file in build/jfjoch-writer*rpm; do
python3 gitea_upload_file.py "$file"
done
elif [ "${{ matrix.distro }}" = "ubuntu2204_nocuda" ]; then
for file in build/jfjoch*viewer*.deb build/jfjoch*writer*.deb; do
for file in build/jfjoch*writer*.deb; do
python3 gitea_upload_file.py "$file"
done
fi
@@ -132,7 +282,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ env.MARCH_CMAKE_FLAGS }} ..
ninja -j16 jfjoch_hdf5_test
- name: Run DIALS processing on legacy format
shell: bash
@@ -168,7 +318,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ env.MARCH_CMAKE_FLAGS }} ..
ninja -j16 jfjoch_hdf5_test
- name: Run XDS with Durin and legacy HDF5 format
shell: bash
@@ -204,7 +354,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ env.MARCH_CMAKE_FLAGS }} ..
ninja -j16 jfjoch_hdf5_test
ninja -j16 jfjoch_xds_plugin
- name: Run XDS with legacy HDF5 format
@@ -240,7 +390,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${{ env.MARCH_CMAKE_FLAGS }} ..
ninja -j16 jfjoch_hdf5_test
- name: Run XDS with Neggia and legacy HDF5 format
shell: bash
@@ -296,36 +446,6 @@ jobs:
git add .
git commit -m "Deploy site"
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
unit-tests:
name: Unit tests
runs-on: jfjoch_rocky8
if: github.ref_type != 'tag' && github.ref_type != 'workflow_dispatch'
container:
image: gitea.psi.ch/leonarski_f/jfjoch_rocky8:2511
options: --gpus all
timeout-minutes: 90
env:
CTEST_OUTPUT_ON_FAILURE: '1'
steps:
- uses: actions/checkout@v4
- name: Build tests
shell: bash
run: |
mkdir -p build
cd build
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
ninja -j48 jfjoch_test jfjoch_hdf5_test
- name: Run unit tests
shell: bash
run: |
cd build/tests
./jfjoch_test
- name: Run hdf5 test
shell: bash
run: |
cd build/tools
./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5
create-release:
name: Create release
runs-on: jfjoch_rocky8
-406
View File
@@ -1,406 +0,0 @@
stages:
- build
- test
- synthesis
- release
variables:
PKG_CONFIG_PATH: /opt/openssl-3.5.4/lib/pkgconfig:/opt/openssl-3.5.4/lib64/pkgconfig
CMAKE_PREFIX_PATH: /opt/qt-6.9.0-static:/opt/eigen-3.4
build:x86:gcc-12:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_VIEWER_BUILD=ON ..
- make -j48
build:x86:gcc-13:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-13/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_VIEWER_BUILD=ON ..
- make -j48
build:x86:gcc_writer:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_WRITER_ONLY=ON ..
- make -j48
build:x86:gcc_nocuda:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_USE_CUDA=OFF ..
- make -j48
build:x86:driver:
stage: build
variables:
CC: gcc
CXX: g++
tags:
- gcc
- x86
needs: []
script:
- cd fpga/pcie_driver
- make
build:x86:python_client:
stage: build
needs: []
tags:
- python
script:
- bash gen_python_client.sh
artifacts:
paths:
- dist/jfjoch_client-*whl
- dist/jfjoch_client-*tar.gz
expire_in: 1 week
build:x86:frontend:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- /usr/bin/cmake ..
- make frontend
- cd ../frontend/dist
- tar czf ../../jfjoch_frontend.tar.gz *
artifacts:
paths:
- jfjoch_frontend.tar.gz
expire_in: 1 week
build:x86:rpm:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON ..
- make frontend
- make -j48 package
- mv *.rpm ..
artifacts:
paths:
- "jfjoch-*.rpm"
expire_in: 1 week
build:x86:rpm_nocuda:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=ON -DJFJOCH_VIEWER_BUILD=ON -DJFJOCH_USE_CUDA=OFF ..
- make frontend
- make -j48 package
- mv *.rpm ..
artifacts:
paths:
- "jfjoch-viewer*.rpm"
expire_in: 1 week
build:x86:sls9:rpm:
stage: build
tags:
- x86
needs: []
script:
- mkdir build
- cd build
- source /opt/rh/gcc-toolset-12/enable
- cmake -DCMAKE_BUILD_TYPE=Release -DJFJOCH_INSTALL_DRIVER_SOURCE=OFF -DJFJOCH_VIEWER_BUILD=OFF -DSLS9=ON ..
- make frontend
- make -j48 package
- mv *.rpm ..
artifacts:
paths:
- "jfjoch-slsdet9*.rpm"
expire_in: 1 week
test:x86:gcc:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
- x86
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j48 jfjoch_test jfjoch_hdf5_test
- cd tests
- ./jfjoch_test -r junit -o report.xml
- cd ../tools
- ./jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5
artifacts:
expire_in: 1 week
reports:
junit: build/tests/report.xml
test:x86:crystfel:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
- x86
- crystfel
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 jfjoch_hdf5_test
- cd ../tests/crystfel
- ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 10
- indexamajig -i writing_test.lst -g jf4m.geom -o x.stream --indexing=xgandalf
test:x86:xds_durin:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 jfjoch_hdf5_test
- cd ../tests/xds_durin
- ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xds_durin_new_hdf5_format:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 jfjoch_hdf5_test
- cd ../tests/xds_durin
- HDF5MASTER_NEW_FORMAT=1 ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xds_neggia:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 jfjoch_hdf5_test
- cd ../tests/xds_neggia
- ../../build/tools/jfjoch_hdf5_test ../../tests/test_data/compression_benchmark.h5 25
- xds_par |grep -a1 ISa |tail -n1
test:x86:xia2.ssx:
stage: test
timeout: 90m
variables:
CTEST_OUTPUT_ON_FAILURE: 1
CC: gcc
CXX: g++
needs: ["build:x86:gcc-12"]
dependencies: []
tags:
- gcc
- x86
- xds
script:
- source /opt/rh/gcc-toolset-12/enable
- mkdir -p build
- mkdir -p dials_test
- cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- make -j8 jfjoch_hdf5_test
- cd ../dials_test
- ../build/tools/jfjoch_hdf5_test ../tests/test_data/compression_benchmark.h5 100
- source /usr/local/dials-v3-17-0/dials_env.sh
- xia2.ssx image=writing_test_master.h5 space_group=P43212 unit_cell=78.551,78.551,36.914,90.000,90.000,90.000
synthesis:hls:
stage: synthesis
dependencies: []
variables:
CC: gcc
CXX: g++
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^HLS/
tags:
- vivado
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make hls
needs: ["build:x86:gcc-12", "test:x86:gcc"]
synthesis:100g:
stage: synthesis
dependencies: []
retry: 2
variables:
CC: gcc
CXX: g++
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^100G/
tags:
- vivado
artifacts:
paths:
- "jfjoch_fpga_pcie_100g.mcs"
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_100g
- mv fpga/jfjoch_fpga_pcie_100g.mcs ..
needs: ["build:x86:gcc-12", "test:x86:gcc"]
synthesis:8x10g:
stage: synthesis
dependencies: []
variables:
CC: gcc
CXX: g++
retry: 2
allow_failure: true
rules:
- if: $CI_COMMIT_MESSAGE =~ /^FPGA/
- if: $CI_COMMIT_MESSAGE =~ /^8x10G/
tags:
- vivado
artifacts:
paths:
- "jfjoch_fpga_pcie_8x10g.mcs"
expire_in: 1 week
script:
- source /opt/rh/gcc-toolset-12/enable
- source /opt/Xilinx/Vivado/2022.2/settings64.sh
- mkdir -p build
- cd build
- /usr/bin/cmake ..
- make -j4 pcie_8x10g
- mv fpga/jfjoch_fpga_pcie_8x10g.mcs ..
needs: [ "build:x86:gcc-12", "test:x86:gcc" ]
release:
stage: release
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual
tags:
- x86
- python
dependencies:
- build:x86:frontend
- build:x86:rpm
- build:x86:rpm_nocuda
- build:x86:sls9:rpm
- build:x86:python_client
script:
- bash gitlab_upload_release.sh
+227
View File
@@ -0,0 +1,227 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## What this is
Jungfraujoch is the data-acquisition and analysis system for the PSI JUNGFRAU and EIGER
X-ray detectors. It receives detector data, runs it through an FPGA-accelerated pipeline
(spot finding, azimuthal/ROI integration, compression), streams images out over ZeroMQ for
writing to HDF5, and runs crystallographic analysis (indexing, integration, scaling/merging).
Most authoritative documentation lives in `docs/` and on Read The Docs
(https://jungfraujoch.readthedocs.io). When changing CLI behaviour, the program's own
usage message is the source of truth, not the docs.
## Build
Out-of-source CMake build, C++20, heavy use of `FetchContent` (spdlog, zstd, HDF5,
slsDetectorPackage, Catch2, cpp-httplib, libzmq, Ceres, fast-feedback-indexer are downloaded
and statically linked — the **first configure needs network access** and is slow).
```
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make -j$(nproc) jfjoch_broker # the main service; build other targets by name
```
Key CMake options:
- `JFJOCH_USE_CUDA` (default ON) — GPU path. Needs CUDA ≥ 12.8. Provides the `ffbidx` and `fft`
GPU indexers; without it only the CPU `fftw` indexer is available (requires FFTW at configure
time, auto-detected). CUDA absence is not a build error.
- `JFJOCH_WRITER_ONLY` (default OFF) — builds only the HDF5 writer; skips broker, FPGA,
receiver, analysis, tests, frontend.
- `JFJOCH_VIEWER_BUILD` (default OFF) — builds the Qt6 `jfjoch_viewer` desktop app.
- `SLS9` (default OFF) — build against slsDetectorPackage 9.2.0 instead of 8.0.2.
The frontend is a separate custom target: `make frontend` (runs `npm ci && npm run build` in
`frontend/`). It is not built by default unless installing.
## Test
Tests use **Catch2** and are collected into a single binary `tests/jfjoch_test`.
```
make -j$(nproc) jfjoch_test
cd tests
./jfjoch_test # all tests
./jfjoch_test "<test name>" # one test case (exact name in TEST_CASE)
./jfjoch_test "[tag]" # by tag
./jfjoch_test -r junit -o report.xml
```
`make jfjoch_hdf5_test` builds the HDF5 write-speed benchmark, also used by CI to produce files
that are validated against XDS (Durin/Neggia) and CrystFEL.
Lint config is `.clang-tidy` (broad `*` check set with many exceptions; namespaces lower_case,
classes CamelCase, global constants UPPER_CASE).
## Code style
The overriding principle is **simple, readable code** — favour the smallest, most direct
implementation that a reader can verify at a glance. Extra abstraction, speculative guards, and
clever-but-dense constructs are treated as actively harmful, not as polish. When torn between a
tidy abstraction and a flat, obvious version, pick the obvious one.
This matters most in `image_analysis/pixel_refinement/` (e.g. `PixelRefine.cpp`), which is an
experimental prototype where readability is how the physics gets verified — keep it especially
plain. **Do not add defensive/unrequested code** (extra validation, rejection heuristics, "just in
case" branches) without asking first; if a guard isn't clearly needed, leave it out.
Match the surrounding code's idiom, naming, and comment density rather than importing a different
style.
## Local end-to-end run (no detector / no FPGA)
The FPGA HLS logic can be simulated on the CPU (`HLSSimulatedDevice`), so the full software
stack runs without hardware (slowly — fixed-point math on CPU). See
`docs/JFJOCH_BROKER.md` for the canonical walkthrough.
```
cd build/broker
./jfjoch_broker ../../etc/broker_local.json 5232 # config JSON + HTTP port
# then, separately:
cd tests/test_data && python jfjoch_broker_test.py # feeds a test image, starts collection
# observe at http://localhost:5232 ; HDF5 is written under build/broker
```
`etc/broker_local.json`, `broker_eiger.json`, `broker_crmx.json` are example broker configs
(schema = `jfjoch_settings` in `broker/jfjoch_api.yaml`).
## Architecture
**Data flow (online):** detector → FPGA acquisition (`fpga/`, `acquisition_device/`) →
`receiver/` builds full images from per-module FPGA output → `image_pusher/` streams CBOR-encoded
images over ZeroMQ → `jfjoch_writer` (`writer/`) consumes the stream and writes NXmx HDF5. The
broker also emits a low-rate preview stream and a metadata stream (`preview/`).
**Writer file split:** one acquisition produces one `_master.h5` plus many `_data_NNNNNN.h5`
files. Dataset-wide metadata (geometry, detector config, ROI/azimuthal definitions — anything
fixed for the whole run) is written to the **master** file in `writer/HDF5NXmx.cpp` (the `NXmx`
class). Per-image arrays (one entry per frame) are written to the **data** files by the
`HDF5DataFilePlugin` subclasses in `writer/`. Put shared metadata in `NXmx`, not in a data-file
plugin.
The HDF5 master/data layout is one of three `FileWriterFormat`s (`common/JFJochMessages.h`),
all NXmx: **`NXmxLegacy`** (master + `_data_NNNNNN.h5` joined by external links),
**`NXmxVDS`** (master + data joined by HDF5 virtual datasets — the default), and
**`NXmxIntegrated`** (a single self-contained file, no separate data files). Per-image plugins
must work for all three; with `NXmxIntegrated` "master" and "data" are the same file.
**Two acquisition workflows:** the FPGA-accelerated path (JUNGFRAU at PSI; FPGA does masking,
summation, spot finding, ROI/azimuthal integration, compression) and the DECTRIS SIMPLON path
(EIGER), which has no FPGA — masking/ROI/azimuthal analysis then runs on CPU through the shared
`image_analysis/` library. Treat ROI and azimuthal features as available in **both** workflows,
not FPGA-only.
**`jfjoch_broker`** (`broker/`) is the central online service: HTTP/REST + OpenAPI control plane,
FPGA configuration, image building, ZeroMQ output. `JFJochStateMachine` drives acquisition state;
`JFJochServices` wires the pieces; `OpenAPIConvert`/`JFJochBrokerParser` translate between the
generated API model and internal types.
**Three analysis frontends share one analysis library** (`image_analysis/`, built as
`JFJochImageAnalysis`):
- `jfjoch_broker` — online, real-time (FPGA + GPU).
- `jfjoch_viewer` — interactive Qt desktop (`viewer/`), results not persisted.
- `jfjoch_process` (`tools/jfjoch_process.cpp`) — offline batch over a stored HDF5; writes
`_process.h5` and `.mtz`/`.cif`/`.hkl`. `jfjoch_scale` re-scales/merges already-integrated data.
**`image_analysis/` pipeline** (subdirs): `spot_finding`, `indexing` (`ffbidx`/`fft` GPU,
`fftw` CPU), `lattice_search`, `geom_refinement`, `pixel_refinement`, `bragg_prediction`,
`bragg_integration`, `rotation_indexer`, `azint`, `roi`, `scale_merge`. Least-squares refinement
uses **Ceres** (fetched, built with miniglog, no MKL, CXX_THREADS). `ffbidx` needs a known cell
(`-C`) and suits sparse serial stills; `fft`/`fftw` index de novo and suit strong rotation data.
**FPGA** (`fpga/`): `hls/` is the Vitis HLS source (image-analysis kernels), `hls_simulation/`
runs that same HLS on CPU for hardware-free testing, `host_library/` is the host-side driver,
`pcie_driver/` is the kernel module. The HLS algorithms are documented in
`docs/FPGA_DATA_ANALYSIS.md`.
**Detector control** (`detector_control/`): wrappers for SLS (JUNGFRAU) and DECTRIS SIMPLON
(EIGER). **`jungfrau/`**: JUNGFRAU ADU→energy gain/pedestal calibration.
**Other libs:** `common/` (geometry, diffraction experiment, image buffer, CUDA wrappers — the
shared core, linked nearly everywhere), `compression/` (zstd + bitshuffle + sqrt lossy),
`frame_serialize/` (CBOR stream codec), `gemmi_gph/` (vendored GEMMI for MTZ/XDS_ASCII I/O),
`xds-plugin/` (XDS HDF5 read plugin).
## Portability (jfjoch_viewer)
Cross-platform support is a goal **only for `jfjoch_viewer` and its dependency tree** — keep that
code, and any shared library it transitively links (`common/`, `image_analysis/`, `reader/`,
`gemmi_gph/`, etc.), **MSVC-compatible** so the viewer can build on Windows. The rest of the
project (broker, receiver, FPGA host, detector control, …) is Linux-only and does not need to be
portable; don't constrain it for portability's sake.
- **Windows/MSVC** is the primary portability target. The end goal is a Windows viewer built
with **MSVC *and* CUDA** (`JFJOCH_USE_CUDA=ON`): GPU processing is a wanted feature, not
optional, so the intended Windows config is the full GPU path (`ffbidx`, GPU `fft`), not a
CPU-only fallback. MSVC is required regardless, because CUDA on Windows requires it. Avoid
GCC/Clang-only extensions, POSIX-only APIs, and other non-MSVC constructs in viewer-reachable
code, and keep CUDA-reachable viewer code (`ffbidx`, GPU indexers) MSVC-buildable too.
- **macOS** is a nice-to-have for the viewer. It rules out CUDA, so anything the viewer depends on
must also have a working CPU-only / non-CUDA path (the `JFJOCH_USE_CUDA=OFF`, `fftw`-indexer
configuration). This non-CUDA path must keep working, but it is the macOS fallback — *not* the
intended Windows configuration.
A self-contained Windows build still needs a few dependencies that the Linux build picks up from
the system and that are **not** auto-provided via `FetchContent` (besides Qt, supplied
externally): **ZLIB** (pulled by hdf5/libtiff/gemmi/libzmq — a bundled zlib-ng in `ZLIB_COMPAT`
mode is the intended fix, presented as the `ZLIB::ZLIB` target so the scattered
`find_package(ZLIB)` calls resolve), **libjpeg-turbo** (used by `preview/`; upstream discourages
`add_subdirectory`, so bring it in via `ExternalProject`), and **Eigen** (header-only; needed by
Ceres, by the analysis libs directly, and by `ffbidx` under CUDA — fetch it and point Ceres'
internal `find_package(Eigen3)` at it). Wire each guarded so the Linux build, which finds these on
the system, stays unchanged.
## OpenAPI is the single source of truth
`broker/jfjoch_api.yaml` defines the entire REST API **and the shared data schemas**. From it,
`update_version.sh` regenerates three clients — **do not hand-edit generated code**:
- C++ server model → `broker/gen/` (cpp-pistache-server generator; compiled as `JFJochAPI`).
- Python client → `python-client/` (and `gen_python_client.sh`, published as PyPI `jfjoch-client`).
- TypeScript frontend client → `frontend/src/client/` (hey-api `openapi-ts`, `npm run openapi`).
When you change `jfjoch_api.yaml`, regenerate the relevant client(s); for a version bump run
`update_version.sh` (also rewrites `VERSION`, `frontend/src/version.ts`, and the Redoc html).
## Frontend
React 19 + TypeScript + MUI + Vite (`frontend/`). Data layer is generated from the OpenAPI spec
(`@hey-api/openapi-ts` → fetch client + TanStack Query hooks + zod schemas). Scripts:
`npm start` (dev server), `npm run build` (tsc + vite), `npm run openapi` (regen client),
`npm run redocly4broker` (regen `broker/redoc-static.html`).
## Adding a per-image scalar quantity
A per-image scalar (e.g. `ice_ring_score`, `bkg_estimate`, `mosaicity`) flows analysis → message → CBOR
→ HDF5 → scan-result/plot → API → viewer/frontend. To add one, mirror an existing float scalar
(`bkg_estimate` is a clean template) at every layer:
1. **Compute** where the azint profile is finalized: `image_analysis/MXAnalysisWithoutFPGA.cpp` (CPU),
`receiver/JFJochReceiverFPGA.cpp` (FPGA), and the offline azint worker in `process/JFJochProcess.cpp`.
2. **Message** (`common/JFJochMessages.h`): `std::optional<float>` in `DataMessage`, `std::vector<float>`
in `EndMessage`.
3. **CBOR**: encode in `frame_serialize/CBORStream2Serializer.cpp` (DataMessage block *and* END block),
decode in `CBORStream2Deserializer.cpp` (both). Optional fields are back-compatible — no version bump.
4. **HDF5** write: `writer/HDF5DataFilePluginMX.{h,cpp}` — an `AutoIncrVector<float>` with reserve /
per-image write / `SaveVector("/entry/MX/<name>")` (per-image arrays live in the data-file plugin);
plus the NXmx master write in `writer/HDF5NXmx.cpp` (`SaveVectorIfMissing(..., end.<name>)`). HDF5
**read-back** (so a stored file re-opens, e.g. in the viewer) is in `reader/HDF5MetadataSource.cpp`,
NOT `JFJochHDF5Reader.cpp`: mirror the three `bkgEstimate` sites — master `ReadOptVector`, data-file
`ReadVector` into the dataset, and the per-image message population.
5. **Scan result**: `common/ScanResult.h` (`ScanResultElem`) + `common/ScanResultGenerator.cpp`
(copy in `Add`, resize+fill in `FillEndMessage`).
6. **Receiver plot**: `common/Plot.h` (`PlotType`) + `common/JFJochReceiverPlots.{h,cpp}` (`StatusVector`
+ Clear / AddElement / GetPlots / GetPlotRaw cases).
7. **API**: add to the `plot_type` enum and the `scan_result` images schema in `broker/jfjoch_api.yaml`,
regenerate the C++ model (`java -jar openapi-generator-cli.jar generate -i broker/jfjoch_api.yaml -o
broker/gen -g cpp-pistache-server`) and the frontend client (`cd frontend && npm run openapi`), then
wire `broker/OpenAPIConvert.cpp` (`ConvertPlotType` string→enum and the `Convert(ScanResult)` setter).
8. **Reader/viewer**: `reader/JFJochReaderDataset.h` + `reader/JFJochHttpReader.cpp` (`GetPlot_i`) and
`viewer/JFJochViewerDatasetInfo.cpp` (combo item + `ExtractMetric`).
9. **Frontend**: `frontend/src/components/DataProcessingPlots.tsx` (`MenuItem`) + `DataProcessingPlot.tsx`
(y-axis label).
10. **Docs**: `docs/CBOR.md`, `docs/HDF5.md`, `docs/CPU_DATA_ANALYSIS.md`.
Gotcha: an existing `build/` dir needs a `cmake .` reconfigure to pick up a newly-added `broker/gen`
source file (the source list is a configure-time glob).
+279 -61
View File
@@ -8,16 +8,24 @@ SET(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
SET(CMAKE_CXX_STANDARD 20)
SET(CMAKE_CXX_STANDARD_REQUIRED True)
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -Wno-deprecated-enum-enum-conversion")
SET(CMAKE_C_FLAGS_RELEASE "-O3")
SET(JFJOCH_WRITER_ONLY OFF CACHE BOOL "Compile HDF5 writer only")
SET(JFJOCH_INSTALL_DRIVER_SOURCE OFF CACHE BOOL "Install kernel driver source (ignored if building writer only; necessary for RPM building)")
SET(JFJOCH_USE_CUDA ON CACHE BOOL "Compile Jungfraujoch with CUDA")
SET(JFJOCH_VIEWER_BUILD OFF CACHE BOOL "Compile Jungfraujoch viewer")
# Only the viewer (and its portable dependency tree) is supported on Windows and macOS -- the
# broker/receiver/FPGA/writer server stack is Linux-only. Force viewer-only on those platforms so a
# plain configure builds the right subset; on Linux it remains a user-togglable option.
IF (WIN32 OR APPLE)
SET(JFJOCH_VIEWER_ONLY ON CACHE BOOL "Compile only jfjoch_viewer and its dependencies" FORCE)
ELSE()
SET(JFJOCH_VIEWER_ONLY OFF CACHE BOOL "Compile only jfjoch_viewer and its dependencies")
ENDIF()
SET (ZLIB_USE_STATIC_LIBS TRUE)
FIND_PACKAGE(ZLIB REQUIRED)
OPTION(SLS9 "Build with sls_detector_package v9.2.0" OFF)
SET(BUILD_SHARED_LIBS OFF)
@@ -37,42 +45,53 @@ SET(BUILD_FAST_INDEXER_STATIC ON)
INCLUDE(CheckLanguage)
INCLUDE(CheckIncludeFile)
# Locate nvcc ourselves when it isn't already pinned (-DCMAKE_CUDA_COMPILER / $CUDACXX). CHECK_LANGUAGE
# below only searches PATH, which is missed routinely on Windows and intermittently on Linux; the
# standard CUDA install locations (CUDA_PATH on Windows, /usr/local/cuda on Linux) cover both, so the
# compiler need not be passed by hand. Only set it when actually found, leaving CHECK_LANGUAGE to run
# its normal detection otherwise.
IF (JFJOCH_USE_CUDA AND NOT CMAKE_CUDA_COMPILER AND NOT DEFINED ENV{CUDACXX})
FIND_PROGRAM(_jfjoch_nvcc nvcc
HINTS ENV CUDA_PATH ENV CUDA_HOME ENV CUDA_ROOT /usr/local/cuda /opt/cuda
PATH_SUFFIXES bin)
IF (_jfjoch_nvcc)
SET(CMAKE_CUDA_COMPILER "${_jfjoch_nvcc}")
ENDIF()
ENDIF()
CHECK_LANGUAGE(CUDA)
SET(CMAKE_CUDA_ARCHITECTURES 75 80 86 89) # T4, A100, RTX A4000, L4
SET(CMAKE_CUDA_STANDARD 17)
SET(CMAKE_CUDA_FLAGS_RELEASE "-O3")
SET(CMAKE_CUDA_ARCHITECTURES 75 80 86 89 90 100 120) # T4, A100, RTX A4000, L4
SET(CMAKE_CUDA_STANDARD 20)
SET(CMAKE_CUDA_STANDARD_REQUIRED True)
SET(CMAKE_CUDA_FLAGS_RELEASE "-O3 -lineinfo")
SET(CMAKE_CUDA_RUNTIME_LIBRARY Static)
SET(JFJOCH_CUDA_AVAILABLE OFF)
IF (CMAKE_CUDA_COMPILER)
IF (JFJOCH_USE_CUDA)
ENABLE_LANGUAGE(CUDA)
FIND_PACKAGE(CUDAToolkit REQUIRED)
SET(CMAKE_CUDA_RUNTIME_LIBRARY Static)
MESSAGE(STATUS "CUDA VERSION: ${CMAKE_CUDA_COMPILER_VERSION}")
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_CUDA)
FIND_LIBRARY(CUDART_LIBRARY cudart_static PATHS ${CMAKE_CUDA_IMPLICIT_LINK_DIRECTORIES} REQUIRED)
SET(JFJOCH_CUDA_AVAILABLE ON)
IF (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "12.8")
FIND_PACKAGE(CUDAToolkit REQUIRED)
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_CUDA)
SET(JFJOCH_CUDA_AVAILABLE ON)
# Blackwell GB10 (DGX Spark) is sm_121, only known to nvcc >= 12.9; add it there so the
# binary launches natively on Spark (the list above tops out at sm_120 and embeds no PTX).
IF (CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER_EQUAL "12.9")
LIST(APPEND CMAKE_CUDA_ARCHITECTURES 121)
ENDIF()
ELSE()
MESSAGE(WARNING "CUDA older than 12.8 not supported")
ENDIF()
ELSE()
MESSAGE(WARNING "CUDA Available, but disabled by user")
ENDIF()
ENDIF()
FIND_LIBRARY(FFTWF_LIBRARY NAMES libfftw3f.a libfftw3f.so fftw3f DOC "FFTW single-precision library"
PATHS /usr/lib /usr/lib64 /usr/lib/x86_64-linux-gnu/)
CHECK_INCLUDE_FILE(fftw3.h HAS_FFTW3_H)
IF(HAS_FFTW3_H AND FFTWF_LIBRARY)
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_FFTW)
ENDIF()
INCLUDE_DIRECTORIES(include)
INCLUDE(CheckIncludeFile)
FIND_LIBRARY(NUMA_LIBRARY NAMES numa DOC "NUMA Library")
CHECK_INCLUDE_FILE(numaif.h HAS_NUMAIF)
CHECK_INCLUDE_FILE(numa.h HAS_NUMA_H)
include(FetchContent)
@@ -138,43 +157,168 @@ FetchContent_Declare(
GIT_TAG v0.39.0
EXCLUDE_FROM_ALL
)
# httplib enables Brotli content-encoding whenever it finds system Brotli; we don't use it
# (gzip/zlib is enough for the broker), so disable it to avoid linking libbrotli.
SET(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(zstd sls_detector_package catch2 hdf5 spdlog httplib)
# ZeroMQ (libzmq): fetch it here, at the top level, so that THIS project - not
# slsDetectorPackage - controls the version. slsDetectorPackage bundles its own libzmq
# archive, but only populates it behind `if(NOT libzmq_POPULATED)`; by making libzmq
# available before sls below, sls reuses this copy and a single libzmq-static target is
# built (no duplicate target / double-symbol clash). A future viewer-only / Windows build
# (which does not build sls) fetches the same libzmq standalone.
SET(BUILD_SHARED OFF CACHE BOOL "" FORCE) # libzmq: static only (matches sls)
SET(BUILD_TESTS OFF CACHE BOOL "" FORCE) # libzmq: no test build
SET(WITH_PERF_TOOL OFF CACHE BOOL "" FORCE) # libzmq: no perf tools
SET(WITH_DOCS OFF CACHE BOOL "" FORCE) # libzmq: no docs
SET(ENABLE_CPACK OFF CACHE BOOL "" FORCE) # libzmq: no CPack injection
FetchContent_Declare(
libzmq
GIT_REPOSITORY https://github.com/zeromq/libzmq.git
GIT_TAG v4.3.5
EXCLUDE_FROM_ALL
)
ADD_SUBDIRECTORY(jungfrau)
ADD_SUBDIRECTORY(compression)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(writer)
ADD_SUBDIRECTORY(frame_serialize)
ADD_SUBDIRECTORY(reader)
ADD_SUBDIRECTORY(detector_control)
ADD_SUBDIRECTORY(image_puller)
ADD_SUBDIRECTORY(preview)
ADD_SUBDIRECTORY(symmetry)
ADD_SUBDIRECTORY(xds-plugin)
# CMake >= 4.0 (e.g. the 4.x bundled with Visual Studio 2026) makes any
# cmake_minimum_required(VERSION < 3.5) a fatal error. Some fetched dependencies still
# declare such old floors (libzmq: 3.0.2), so raise the policy-version floor for the
# FetchContent subprojects. Ignored (harmless) on CMake < 3.30, which lacks this variable.
SET(CMAKE_POLICY_VERSION_MINIMUM 3.5)
IF (JFJOCH_WRITER_ONLY)
MESSAGE(STATUS "Compiling HDF5 writer only")
# libzmq must be made available BEFORE sls_detector_package for the override above to take effect.
FetchContent_MakeAvailable(libzmq)
IF (JFJOCH_VIEWER_ONLY)
# A viewer-only build still needs zstd/hdf5/spdlog/httplib (JFJochReader uses httplib).
# Only sls_detector_package (detector) and catch2 (tests) are not built here -- and sls
# in particular does not configure under MSVC -- so skip just those two.
FetchContent_MakeAvailable(zstd hdf5 spdlog httplib)
ELSE()
ADD_SUBDIRECTORY(image_pusher)
ADD_SUBDIRECTORY(broker)
ADD_SUBDIRECTORY(fpga)
ADD_SUBDIRECTORY(acquisition_device)
ADD_SUBDIRECTORY(receiver)
FetchContent_MakeAvailable(zstd sls_detector_package catch2 hdf5 spdlog httplib)
ENDIF()
# libtiff (used by JFJochPreview in every build mode): build it ourselves. Its C++ binding
# (tiffxx) is packaged inconsistently across distros (missing on Rocky 9) and absent on
# Windows. Library only; the SET()s below are libtiff's own codec/tool switches.
# We only need DEFLATE (zlib) + the internal LZW codec, matching what Python tifffile writes
# by default. The remaining codecs default to ON whenever their library is found on the build
# host, so each must be explicitly turned OFF to keep the dependency set minimal -- otherwise
# webp pulls in libwebp + libsharpyuv and lerc pulls in libLerc.
SET(jbig OFF)
SET(zstd OFF)
SET(lzma OFF)
SET(jpeg OFF)
SET(old-jpeg OFF)
SET(webp OFF)
SET(lerc OFF)
SET(tiff-tools OFF)
SET(tiff-tests OFF)
FetchContent_Declare(tiff
GIT_REPOSITORY https://gitlab.com/libtiff/libtiff.git
GIT_TAG v4.7.1
EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(tiff)
# FFTW single precision (target fftw3f): the CPU fallback indexer, enables JFJOCH_USE_FFTW.
# Built from the release tarball -- the git repo ships no pre-generated codelets (needs the
# OCaml genfft).
SET(ENABLE_FLOAT ON CACHE BOOL "" FORCE)
SET(BUILD_TESTS OFF CACHE BOOL "" FORCE)
# SIMD codelets are runtime-dispatched (cpuid), so enabling AVX2 does NOT require an AVX2 CPU
# -- FFTW falls back at runtime. The codelet sets are arch-specific, so guard by processor:
# x86 gets SSE2/AVX/AVX2, aarch64 (e.g. Grace on DGX Spark) gets NEON; other arches build scalar.
IF (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|amd64")
SET(ENABLE_SSE2 ON CACHE BOOL "" FORCE)
SET(ENABLE_AVX ON CACHE BOOL "" FORCE)
SET(ENABLE_AVX2 ON CACHE BOOL "" FORCE)
ELSEIF (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64|ARM64")
SET(ENABLE_NEON ON CACHE BOOL "" FORCE)
ENDIF()
FetchContent_Declare(fftw
URL https://www.fftw.org/fftw-3.3.10.tar.gz
URL_HASH SHA256=56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467
EXCLUDE_FROM_ALL)
FetchContent_MakeAvailable(fftw)
# FFTW exposes fftw3.h only via $<INSTALL_INTERFACE:include>, so consuming fftw3f straight from
# the build tree (FetchContent) leaves the header unreachable. On Linux a system-installed
# fftw3.h masks this; on Windows it does not. Add the source-tree api/ dir for build-tree use.
TARGET_INCLUDE_DIRECTORIES(fftw3f INTERFACE $<BUILD_INTERFACE:${fftw_SOURCE_DIR}/api>)
ADD_COMPILE_DEFINITIONS(JFJOCH_USE_FFTW)
# Eigen is an EXTERNAL dependency (like ZLIB), resolved by find_package(Eigen3) in the subdirectories
# that need it (image_analysis, and transitively Ceres and ffbidx). It is deliberately NOT vendored
# via FetchContent: declaring Eigen with OVERRIDE_FIND_PACKAGE makes the CMake bundled with Visual
# Studio (cmake 4.x "-msvc") intermittently SEGFAULT during configure. The fault is in CMake's own
# FetchContent variable-stack cleanup, reached when Ceres' find_package(Eigen3) resolves the override
# through a nested FetchContent_MakeAvailable -- ~1 in 3 fresh configures, and 100% with Ceres CUDA on.
# Stock Kitware CMake runs the identical scripts fine, so it is a bug in the VS-bundled cmake binary;
# providing Eigen externally avoids that code path entirely and is stable (verified, both Ceres CUDA
# on and off). Provide it via the system package on Linux (eigen3-devel / libeigen3-dev) or a build
# prefix on Windows (point CMAKE_PREFIX_PATH / Eigen3_DIR at it), exactly as for ZLIB.
# getopt/getopt_long shim for Windows: the MSVC CRT has no <getopt.h>. Vendored OpenBSD/NetBSD
# implementation (BSD-licensed). Built only on Windows and defined here, before the subdirectories,
# so the portable CLI tools in tools/ can link it. A no-op on Linux/macOS, where getopt lives in
# libc (macOS uses the system getopt even though it is also a forced viewer-only platform).
IF (WIN32)
ADD_LIBRARY(wingetopt STATIC tools/wingetopt/getopt.c tools/wingetopt/getopt.h)
TARGET_INCLUDE_DIRECTORIES(wingetopt PUBLIC tools/wingetopt)
ENDIF()
IF (JFJOCH_VIEWER_ONLY)
# Minimal subtree: jfjoch_viewer and only the libraries it transitively links.
# (broker here provides JFJochAPI only; its service targets are gated out.)
ADD_SUBDIRECTORY(jungfrau)
ADD_SUBDIRECTORY(compression)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(gemmi_gph)
ADD_SUBDIRECTORY(frame_serialize)
ADD_SUBDIRECTORY(preview)
ADD_SUBDIRECTORY(writer)
ADD_SUBDIRECTORY(image_analysis)
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(tools)
ENDIF()
IF (JFJOCH_VIEWER_BUILD)
ADD_SUBDIRECTORY(broker)
ADD_SUBDIRECTORY(reader)
ADD_SUBDIRECTORY(process)
ADD_SUBDIRECTORY(viewer)
ADD_SUBDIRECTORY(tools) # builds only the portable analysis tools (process/scale/azint/extract_hkl)
ELSE()
ADD_SUBDIRECTORY(jungfrau)
ADD_SUBDIRECTORY(compression)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(writer)
ADD_SUBDIRECTORY(frame_serialize)
ADD_SUBDIRECTORY(reader)
ADD_SUBDIRECTORY(detector_control)
ADD_SUBDIRECTORY(image_puller)
ADD_SUBDIRECTORY(preview)
ADD_SUBDIRECTORY(gemmi_gph)
ADD_SUBDIRECTORY(xds-plugin)
IF (JFJOCH_WRITER_ONLY)
MESSAGE(STATUS "Compiling HDF5 writer only")
ELSE()
ADD_SUBDIRECTORY(image_pusher)
ADD_SUBDIRECTORY(broker)
ADD_SUBDIRECTORY(fpga)
ADD_SUBDIRECTORY(acquisition_device)
ADD_SUBDIRECTORY(receiver)
ADD_SUBDIRECTORY(image_analysis)
ADD_SUBDIRECTORY(process)
ADD_SUBDIRECTORY(tests)
ADD_SUBDIRECTORY(tools)
ENDIF()
IF (JFJOCH_VIEWER_BUILD)
ADD_SUBDIRECTORY(viewer)
ENDIF()
ENDIF()
IF (NOT JFJOCH_WRITER_ONLY)
IF (NOT JFJOCH_WRITER_ONLY AND NOT JFJOCH_VIEWER_ONLY)
ADD_CUSTOM_COMMAND(OUTPUT frontend/dist/index.html
COMMAND npm ci
COMMAND npm run build
COMMAND npm run licenses # write dist/THIRD_PARTY_LICENSES.txt (npm deps attribution)
COMMAND npm run redocly
COMMAND npm run docs # bundle Sphinx docs into dist/docs (served at /frontend/docs)
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/frontend)
ADD_CUSTOM_TARGET(frontend DEPENDS frontend/dist/index.html)
@@ -202,20 +346,19 @@ IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
# Set Package Name
# Initialize CPACK_COMPONENTS_ALL with common components
set(CPACK_COMPONENTS_ALL jfjoch writer)
SET(CPACK_PACKAGE_NAME "jfjoch")
# Add optional components
if (JFJOCH_INSTALL_DRIVER_SOURCE)
list(APPEND CPACK_COMPONENTS_ALL driver-dkms)
# Select the components to package based on build mode
if (JFJOCH_VIEWER_ONLY)
set(CPACK_COMPONENTS_ALL viewer)
else()
set(CPACK_COMPONENTS_ALL jfjoch writer)
endif()
if (JFJOCH_VIEWER_BUILD)
list(APPEND CPACK_COMPONENTS_ALL viewer)
if (JFJOCH_INSTALL_DRIVER_SOURCE)
list(APPEND CPACK_COMPONENTS_ALL driver-dkms)
endif()
if (JFJOCH_VIEWER_BUILD)
list(APPEND CPACK_COMPONENTS_ALL viewer)
endif()
endif()
# Common metadata
@@ -223,8 +366,69 @@ set(CPACK_PACKAGE_CONTACT "Filip Leonarski <filip.leonarski@psi.ch>")
set(CPACK_PACKAGE_VENDOR "Paul Scherrer Institut")
set(CPACK_PACKAGE_VERSION ${JFJOCH_VERSION})
# OS-aware packaging: DEB on Debian/Ubuntu, RPM on RHEL/Rocky
if (EXISTS "/etc/debian_version")
# OS-aware packaging: DragNDrop (.dmg) on macOS, NSIS installer on Windows, DEB on Debian/Ubuntu,
# RPM on RHEL/Rocky. macOS/Windows are checked first because the /etc/* probes below are Linux-only.
if (APPLE)
# .dmg containing jfjoch_viewer.app (Qt runtime already deployed into the bundle).
set(CPACK_GENERATOR "DragNDrop")
elseif (WIN32)
# NSIS installer .exe (Qt runtime deployed next to the binary by windeployqt).
set(CPACK_GENERATOR "NSIS")
# GPLv3 text shown as the click-through license page of the installer.
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
# Branding is split across three CPack knobs so the CUDA/CPU variant surfaces exactly where we
# want it and nowhere else:
# - Install folder + Start Menu group come from CPACK_PACKAGE_INSTALL_DIRECTORY and
# CPACK_NSIS_PACKAGE_NAME (the latter feeds $(^Name), the Start Menu group's default folder).
# Both stay plain "Jungfraujoch", so the Start Menu group carries no variant tag and the two
# builds install to the same place (CUDA is a strict superset -- they replace, not coexist).
# - CPACK_NSIS_DISPLAY_NAME is the Add/Remove Programs entry -- tagged "(CUDA)"/"(CPU)".
# - CPACK_PACKAGE_FILE_NAME is the installer .exe filename -- tagged "-cuda<major>"/"-cpu", so
# the (much larger) CUDA download is self-identifying, with the CUDA major version baked in.
# The tag follows JFJOCH_CUDA_AVAILABLE automatically; CUDAToolkit_VERSION_MAJOR is set whenever
# it is ON (find_package(CUDAToolkit) ran in the same guard above).
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Jungfraujoch")
set(CPACK_NSIS_PACKAGE_NAME "Jungfraujoch")
if (JFJOCH_CUDA_AVAILABLE)
set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch (CUDA)")
set(CPACK_PACKAGE_FILE_NAME "jfjoch-${JFJOCH_VERSION}-win64-cuda${CUDAToolkit_VERSION_MAJOR}")
else()
set(CPACK_NSIS_DISPLAY_NAME "Jungfraujoch (CPU)")
set(CPACK_PACKAGE_FILE_NAME "jfjoch-${JFJOCH_VERSION}-win64-cpu")
endif()
# Start Menu shortcut for the viewer ("<exe basename>;<label>"). The shortcut and the
# Add/Remove Programs entry both use the .exe's embedded icon.
set(CPACK_PACKAGE_EXECUTABLES "jfjoch_viewer;Jungfraujoch Viewer")
# Forward slash on purpose: CPack writes this value verbatim into CPackConfig.cmake, and a
# backslash there ("bin\jfjoch...") is an invalid escape that cmake 4.x (CMP0010 strict, e.g. the
# VS-bundled cmake) rejects when cpack re-parses it. Windows accepts the forward slash at runtime.
set(CPACK_NSIS_INSTALLED_ICON_NAME "bin/jfjoch_viewer.exe")
elseif (JFJOCH_VIEWER_ONLY)
# Linux portable viewer: a single self-contained .tar.gz of jfjoch_viewer (Qt is linked
# statically here, so there is nothing external to ship alongside the binary). Built on the
# oldest supported distro (RHEL 8) for a low glibc floor, so the archive runs on any newer
# Linux -- unlike the per-distro .rpm/.deb this is meant to replace in the release. Named to
# mirror the Windows/macOS artifacts, with the same -cuda<major>/-cpu tag so the (larger) GPU
# build is self-identifying. CI renames the .tar.gz to .tgz before upload.
set(CPACK_GENERATOR "TGZ")
# Package only the components in CPACK_COMPONENTS_ALL (here: viewer). Without this the archive
# generator falls back to a monolithic install and walks every install() rule in the tree --
# including the fetched HDF5 command-line tools, abseil's EXCLUDE_FROM_ALL sub-libraries and the
# non-viewer components -- none of which the viewer-only build produces, so cpack aborts with
# "cannot find <artifact>". ALL_COMPONENTS_IN_ONE keeps the output a single tarball named
# CPACK_PACKAGE_FILE_NAME (no per-component suffix), matching the CI upload glob. This mirrors
# CPACK_DEB_COMPONENT_INSTALL / CPACK_RPM_COMPONENT_INSTALL in the DEB/RPM branches below.
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
if (JFJOCH_CUDA_AVAILABLE)
set(CPACK_PACKAGE_FILE_NAME "jfjoch_viewer-${JFJOCH_VERSION}-linux-cuda${CUDAToolkit_VERSION_MAJOR}")
else()
set(CPACK_PACKAGE_FILE_NAME "jfjoch_viewer-${JFJOCH_VERSION}-linux-cpu")
endif()
elseif (EXISTS "/etc/debian_version")
set(CPACK_PACKAGE_LICENSE "GPL-3.0-only")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
@@ -290,4 +494,18 @@ else()
endif()
# Ship the license notices (top-level LICENSE, the third-party manifest, and the verbatim
# license texts) with every package variant, under share/doc/jfjoch. Installed per component so
# the file lands in whichever component package(s) the current build mode produces.
SET(JFJOCH_NOTICE_FILES
${CMAKE_SOURCE_DIR}/LICENSE
${CMAKE_SOURCE_DIR}/THIRD_PARTY_NOTICES.md)
FOREACH(_component IN LISTS CPACK_COMPONENTS_ALL)
INSTALL(FILES ${JFJOCH_NOTICE_FILES}
DESTINATION share/doc/jfjoch COMPONENT ${_component})
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/licenses/
DESTINATION share/doc/jfjoch/licenses COMPONENT ${_component}
PATTERN "COLLECT.sh" EXCLUDE)
ENDFOREACH()
INCLUDE(CPack)
+4 -1
View File
@@ -679,7 +679,10 @@ Public License instead of this License. But first, please read
================
As a special exception, we specifically permit linking Jungfraujoch code with Nvidia CUDA libraries.
As a special exception, we specifically permit linking Jungfraujoch code with Nvidia CUDA libraries and Intel MKL.
We also permit to link Jungfraujoch software (GPLv3) with Jungfraujoch high-level synthesis code (CERN OHL 2.0) for the purpose
of simulating FPGA design on CPU.
If OpenAPI definition file (jfjoch_api.yaml) is solely used to generate client code or to interact with the Jungfraujoch
API it may be distributed under terms of your choosing without being subject to GPL requirements.
+86
View File
@@ -0,0 +1,86 @@
# Third-party software notices
Jungfraujoch is licensed under **GPL-3.0** (see [`LICENSE`](LICENSE)); the FPGA design is
licensed under **CERN-OHL-S-2.0** (see [`fpga/LICENSE`](fpga/LICENSE)). It builds on a number of
third-party components, acknowledged below as required by their licenses.
This file is the human-readable manifest. The verbatim license texts live in the
[`licenses/`](licenses/) directory (regenerate with `bash licenses/COLLECT.sh`). The frontend's
bundled JavaScript dependencies are listed separately in
`frontend/dist/THIRD_PARTY_LICENSES.txt`, generated at build time (`npm run licenses`).
All licenses below are GPL-3.0-compatible.
## Fetched at build time and statically linked into the C++ binaries
These are downloaded by CMake (`FetchContent` / `ExternalProject`) during the first configure and
linked into the Jungfraujoch executables.
| Component | Version | Copyright | License (SPDX) | License text |
|---|---|---|---|---|
| [spdlog](https://github.com/gabime/spdlog) | 1.17.0 | Gabi Melman | MIT | [spdlog.txt](licenses/spdlog.txt) |
| [Zstandard](https://github.com/facebook/zstd) | (pinned) | Meta Platforms, Inc. | BSD-3-Clause | [zstd.txt](licenses/zstd.txt) |
| [HDF5](https://github.com/HDFGroup/hdf5) | 2.1.0 | The HDF Group; UIUC | BSD-3-Clause-style | [hdf5.txt](licenses/hdf5.txt) |
| [slsDetectorPackage](https://github.com/slsdetectorgroup/slsDetectorPackage) | 8.0.2 / 9.2.0 | PSI | LGPL-3.0-or-later | [LGPL](licenses/slsDetectorPackage-LGPL-3.0.txt), [GPL](licenses/slsDetectorPackage-GPL-3.0.txt) |
| [cpp-httplib](https://github.com/yhirose/cpp-httplib) | 0.39.0 | Yuji Hirose | MIT | [cpp-httplib.txt](licenses/cpp-httplib.txt) |
| [libzmq (ZeroMQ)](https://github.com/zeromq/libzmq) | 4.3.5 | iMatix and contributors | MPL-2.0 | [libzmq.txt](licenses/libzmq.txt) |
| [libtiff](https://gitlab.com/libtiff/libtiff) | 4.7.1 | Sam Leffler; SGI | libtiff (BSD-like) | [libtiff.txt](licenses/libtiff.txt) |
| [FFTW](https://www.fftw.org/) | 3.3.10 | Matteo Frigo; MIT | GPL-2.0-or-later | [fftw.txt](licenses/fftw.txt) |
| [Ceres Solver](https://github.com/ceres-solver/ceres-solver) | (pinned) | Google Inc. and contributors | BSD-3-Clause | [ceres-solver.txt](licenses/ceres-solver.txt) |
| [fast-feedback-indexer](https://github.com/paulscherrerinstitute/fast-feedback-indexer) | (pinned) | PSI | BSD-3-Clause | [fast-feedback-indexer.txt](licenses/fast-feedback-indexer.txt) |
| [libjpeg-turbo](https://github.com/libjpeg-turbo/libjpeg-turbo) | (pinned) | D. R. Commander and others; IJG | IJG + BSD-3-Clause + Zlib | [libjpeg-turbo.txt](licenses/libjpeg-turbo.txt) |
| [Catch2](https://github.com/catchorg/Catch2) | 3.13.0 | Catch2 Authors | BSL-1.0 | [catch2.txt](licenses/catch2.txt) |
Catch2 is used only to build the test binary (`jfjoch_test`) and is not part of any shipped
artifact; it is listed here for completeness.
## Vendored directly in the repository
These are copied into the source tree (see the path) rather than fetched.
| Component | Path | Copyright | License (SPDX) | License text |
|---|---|---|---|---|
| [nlohmann/json](https://github.com/nlohmann/json) | `include/nlohmann/` | Niels Lohmann | MIT | [nlohmann-json.txt](licenses/nlohmann-json.txt) |
| [Macaron Base64](https://gist.github.com/tomykaira/f0fd86b6c73063283afe550bc5d77594) | `include/base64/` | tomykaira | MIT | [base64-macaron.txt](licenses/base64-macaron.txt) |
| [TinyCBOR](https://github.com/intel/tinycbor) | `frame_serialize/tinycbor/` | Intel Corporation | MIT | [tinycbor.txt](licenses/tinycbor.txt) |
| [Bitshuffle](https://github.com/kiyo-masui/bitshuffle) | `compression/bitshuffle/` | Kiyoshi Masui | MIT | [bitshuffle.txt](licenses/bitshuffle.txt) |
| [Bitshuffle (h-perf)](https://github.com/kalcutter/bitshuffle) | `compression/bitshuffle_hperf/` | Kal Cutter (DECTRIS) | Apache-2.0 | [bitshuffle-hperf.txt](licenses/bitshuffle-hperf.txt) |
| [LZ4](https://github.com/lz4/lz4) | `compression/lz4/` | Yann Collet | BSD-2-Clause | [lz4.txt](licenses/lz4.txt) |
| [HLS arbitrary-precision types](https://github.com/Xilinx/HLS_arbitrary_Precision_Types) | `fpga/include/` | Xilinx, Inc. | Apache-2.0 | [xilinx-hls-headers.txt](licenses/xilinx-hls-headers.txt) |
| [GEMMI](https://github.com/project-gemmi/gemmi) | `gemmi_gph/` | Global Phasing Ltd. | MPL-2.0 | [gemmi.txt](licenses/gemmi.txt) |
| [xbflash.qspi](https://github.com/Xilinx/XRT) | `tools/xbflash.qspi/` | Xilinx / AMD | Apache-2.0 | [xbflash-qspi.txt](licenses/xbflash-qspi.txt) |
| [wingetopt](https://github.com/alex85k/wingetopt) | `tools/wingetopt/` | Todd C. Miller; The NetBSD Foundation | ISC AND BSD-2-Clause | [wingetopt.txt](licenses/wingetopt.txt) |
## Runtime libraries and SDKs (shipped in binaries, not in the source tree)
| Component | Used by | License | Notice |
|---|---|---|---|
| [Qt 6](https://www.qt.io/) | `jfjoch_viewer` | LGPL-3.0 | [notice](licenses/Qt6-NOTICE.txt), [LGPL-3.0](licenses/Qt6-LGPL-3.0.txt) |
| [NVIDIA CUDA Toolkit](https://developer.nvidia.com/cuda-toolkit) (cudart, cuFFT) | CUDA builds | NVIDIA CUDA EULA | [notice](licenses/NVIDIA-CUDA-NOTICE.txt), [EULA](licenses/NVIDIA-CUDA-EULA.txt) |
| [zlib](https://zlib.net/) | everywhere (compression) | Zlib | [zlib.txt](licenses/zlib.txt) |
| [Eigen](https://gitlab.com/libeigen/eigen) | analysis libs, Ceres, ffbidx (header-only) | MPL-2.0 (+ BSD parts) | [eigen.txt](licenses/eigen.txt), [README](licenses/eigen-README.txt) |
## Frontend (npm) dependencies
The React/TypeScript frontend (`frontend/`) bundles a large transitive tree of npm packages,
overwhelmingly MIT/ISC/BSD/Apache-2.0 licensed. Their full notices are generated automatically:
```
cd frontend && npm run licenses # writes dist/THIRD_PARTY_LICENSES.txt
```
The generated file is produced as part of the `frontend` build target and installed alongside the
served frontend, so the shipped web UI carries its own attribution.
## Notes on weak-copyleft and attribution-sensitive components
* **MPL-2.0** (Eigen, GEMMI, libzmq): file-level copyleft. GEMMI is vendored in `gemmi_gph/` in
trimmed form; libzmq is fetched at build time; Eigen is provided externally (header-only). The
corresponding source is available from each project upstream.
* **FFTW** is GPL-2.0-or-later — compatible with, and absorbed by, this project's GPL-3.0 license.
* **Apache-2.0** components: where upstream ships a `NOTICE` file, it is reproduced in the
corresponding `licenses/` text.
* **Qt (LGPL-3.0)** and **NVIDIA CUDA (EULA)** carry redistribution conditions beyond a copyright
notice; see their dedicated notice files. The verbatim LGPL-3.0 and CUDA EULA texts are bundled
(`licenses/Qt6-LGPL-3.0.txt`, `licenses/NVIDIA-CUDA-EULA.txt`); the CUDA EULA is the one shipped
with CUDA Toolkit 12.8 — replace it if you build against a different toolkit version.
+1 -1
View File
@@ -1 +1 @@
1.0.0-rc.137
1.0.0-rc.156
+1 -5
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_ACQUISITIONCOUNTERS_H
#define JUNGFRAUJOCH_ACQUISITIONCOUNTERS_H
#pragma once
#include <condition_variable>
#include <shared_mutex>
@@ -67,6 +66,3 @@ public:
uint64_t GetModuleNumber() const;
};
#endif //JUNGFRAUJOCH_ACQUISITIONCOUNTERS_H
+15 -45
View File
@@ -1,11 +1,6 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifdef JFJOCH_USE_NUMA
#include <numaif.h>
#endif
#include <sys/mman.h>
#include <thread>
#include <fstream>
#include <cmath>
@@ -14,24 +9,6 @@
#include "AcquisitionDevice.h"
#include "../common/NetworkAddressConvert.h"
void *mmap_acquisition_buffer(size_t size, int16_t numa_node) {
void *ret = mmap(nullptr, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (ret == MAP_FAILED) {
throw JFJochException(JFJochExceptionCategory::MemAllocFailed, "frame_buffer");
}
#ifdef JFJOCH_USE_NUMA
if (numa_node >= 0) {
unsigned long nodemask = 1L << numa_node;;
if (numa_node > sizeof(nodemask)*8)
throw JFJochException(JFJochExceptionCategory::MemAllocFailed, "Mask too small for NUMA node");
if (mbind(ret, size, MPOL_BIND, &nodemask, sizeof(nodemask)*8, MPOL_MF_STRICT) == -1)
throw JFJochException(JFJochExceptionCategory::MemAllocFailed, "Cannot apply NUMA policy");
}
#endif
memset(ret, 0, size);
return ret;
}
AcquisitionDevice::AcquisitionDevice(uint16_t in_data_stream) {
logger = nullptr;
data_stream = in_data_stream;
@@ -200,27 +177,35 @@ void AcquisitionDevice::InitializeEmptyPixelMask(const DiffractionExperiment &ex
void AcquisitionDevice::InitializeDataProcessing(const DiffractionExperiment &experiment,
const AzimuthalIntegration &azint) {
const AzimuthalIntegrationMapping &azint) {
auto offset = experiment.GetFirstModuleOfDataStream(data_stream);
size_t modules = experiment.GetModulesNum(data_stream);
// When azimuthal integration is forced onto the CPU, the FPGA must not bin pixels
// (the integration map can address more bins than the FPGA supports); the CPU path
// computes the profile from the assembled image instead.
const bool load_integration_map = !experiment.GetAzimuthalIntegrationSettings().IsForceCPUinFPGAWorkflow();
if (experiment.IsGeometryTransformed()) {
std::vector<float> tmp1(RAW_MODULE_SIZE);
std::vector<uint16_t> tmp2(RAW_MODULE_SIZE);
for (int m = 0; m < modules; m++) {
ConvertedToRawGeometry(experiment, offset + m, tmp1.data(), azint.Corrections().data());
ConvertedToRawGeometry(experiment, offset + m, tmp2.data(), azint.GetPixelToBin().data());
InitializeIntegrationMap(tmp2.data(), tmp1.data(), m);
if (load_integration_map) {
ConvertedToRawGeometry(experiment, offset + m, tmp1.data(), azint.Corrections().data());
ConvertedToRawGeometry(experiment, offset + m, tmp2.data(), azint.GetPixelToBin().data());
InitializeIntegrationMap(tmp2.data(), tmp1.data(), m);
}
ConvertedToRawGeometry(experiment, offset + m, tmp1.data(), azint.Resolution().data());
InitializeSpotFinderResolutionMap(tmp1.data(), m);
}
} else {
for (int m = 0; m < modules; m++) {
InitializeIntegrationMap(azint.GetPixelToBin().data() + (offset + m) * RAW_MODULE_SIZE,
azint.Corrections().data() + (offset + m) * RAW_MODULE_SIZE,
m);
if (load_integration_map)
InitializeIntegrationMap(azint.GetPixelToBin().data() + (offset + m) * RAW_MODULE_SIZE,
azint.Corrections().data() + (offset + m) * RAW_MODULE_SIZE,
m);
InitializeSpotFinderResolutionMap(azint.Resolution().data() + (m + offset) * RAW_MODULE_SIZE,
m);
}
@@ -238,21 +223,6 @@ void AcquisitionDevice::InitializePixelMask(const DiffractionExperiment &experim
}
}
void AcquisitionDevice::MapBuffersStandard(size_t c2h_buffer_count, int16_t numa_node) {
try {
for (int i = 0; i < c2h_buffer_count; i++)
buffer_device.emplace_back((DeviceOutput *) mmap_acquisition_buffer(FPGA_BUFFER_LOCATION_SIZE, numa_node));
} catch (const JFJochException &e) {
UnmapBuffers();
throw;
}
}
void AcquisitionDevice::UnmapBuffers() {
for (auto &i: buffer_device)
if (i != nullptr) munmap(i, FPGA_BUFFER_LOCATION_SIZE);
}
void AcquisitionDevice::FrameBufferRelease(size_t frame_number, uint16_t module_number) {
auto handle = counters.GetBufferHandleAndClear(frame_number, module_number);
if (handle != AcquisitionCounters::HandleNotFound)
+7 -9
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_ACQUISITIONDEVICE_H
#define JUNGFRAUJOCH_ACQUISITIONDEVICE_H
#pragma once
#include <map>
#include <mutex>
@@ -21,7 +20,7 @@
#include "Completion.h"
#include "../fpga/pcie_driver/jfjoch_fpga.h"
#include "../common/NetworkAddressConvert.h"
#include "../common/AzimuthalIntegration.h"
#include "../common/AzimuthalIntegrationMapping.h"
struct AcquisitionDeviceStatistics {
uint64_t good_packets;
@@ -50,6 +49,9 @@ protected:
ThreadSafeFIFO<Completion> work_completion_queue;
ThreadSafeFIFO<WorkRequest> work_request_queue;
// Non-owning view of the per-buffer addresses. Each device subclass owns the backing memory
// and its lifecycle: PCIExpressDevice mmap's/munmap's kernel DMA buffers, HLSSimulatedDevice
// points these at plain heap buffers it owns.
std::vector<DeviceOutput *> buffer_device;
Logger *logger;
@@ -59,8 +61,6 @@ protected:
uint32_t ipv4_addr;
explicit AcquisitionDevice(uint16_t data_stream);
void UnmapBuffers();
void MapBuffersStandard(size_t c2h_buffer_count, int16_t numa_node);
const DeviceOutput *GetDeviceOutput(size_t handle) const;
DeviceOutput *GetDeviceOutput(size_t handle);
virtual void HW_RunInternalGenerator(const FrameGeneratorConfig& config) = 0;
@@ -71,7 +71,7 @@ public:
static constexpr const uint64_t HandleNotValid = UINT64_MAX;
virtual ~AcquisitionDevice() { UnmapBuffers(); };
virtual ~AcquisitionDevice() = default;
void StartAction(const DiffractionExperiment &experiment, uint32_t optional_flags = 0);
void PrepareAction(const DiffractionExperiment &experiment);
@@ -101,7 +101,7 @@ public:
void InitializePixelMask(const DiffractionExperiment &experiment, const PixelMask &mask_raw);
virtual void InitializePixelMask(const uint32_t *module_mask, size_t module_number);
void InitializeROIMap(const DiffractionExperiment& experiment, const std::vector<uint16_t>& raw_roi_map);
void InitializeDataProcessing(const DiffractionExperiment &experiment, const AzimuthalIntegration& azint);
void InitializeDataProcessing(const DiffractionExperiment &experiment, const AzimuthalIntegrationMapping& azint);
const AcquisitionCounters& Counters() const;
@@ -119,5 +119,3 @@ public:
void RunInternalGenerator(const DiffractionExperiment& experiment);
};
#endif //JUNGFRAUJOCH_ACQUISITIONDEVICE_H
+1 -4
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_ACQUISITIONDEVICEGROUP_H
#define JUNGFRAUJOCH_ACQUISITIONDEVICEGROUP_H
#pragma once
#include <vector>
#include "AcquisitionDevice.h"
@@ -20,5 +19,3 @@ public:
std::vector<DeviceStatus> GetDeviceStatus() const;
void EnableLogging(Logger *logger);
};
#endif //JUNGFRAUJOCH_ACQUISITIONDEVICEGROUP_H
+1 -4
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_COMPLETION_H
#define JUNGFRAUJOCH_COMPLETION_H
#pragma once
#include <cstdint>
@@ -21,5 +20,3 @@ struct Completion {
};
Completion parse_hw_completion(uint32_t hw_input);
#endif //JUNGFRAUJOCH_COMPLETION_H
+1 -4
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_FPGAACQUISITIONDEVICE_H
#define JUNGFRAUJOCH_FPGAACQUISITIONDEVICE_H
#pragma once
#include "AcquisitionDevice.h"
#include "../fpga/pcie_driver/jfjoch_fpga.h"
@@ -49,5 +48,3 @@ public:
void SetInternalGeneratorFrame(const uint16_t *input, size_t module_number) override;
uint32_t GetExpectedDescriptorsPerModule() const override;
};
#endif //JUNGFRAUJOCH_FPGAACQUISITIONDEVICE_H
+6 -2
View File
@@ -3,14 +3,18 @@
#include "HLSSimulatedDevice.h"
HLSSimulatedDevice::HLSSimulatedDevice(uint16_t data_stream, size_t in_frame_buffer_size_modules, int16_t numa_node)
HLSSimulatedDevice::HLSSimulatedDevice(uint16_t data_stream, size_t in_frame_buffer_size_modules)
: FPGAAcquisitionDevice(data_stream) {
mac_addr = 0xCCAA11223344;
ipv4_addr = 0x0132010A;
max_modules = MAX_MODULES_FPGA;
MapBuffersStandard(in_frame_buffer_size_modules, numa_node);
buffers.reserve(in_frame_buffer_size_modules);
for (size_t i = 0; i < in_frame_buffer_size_modules; i++) {
buffers.push_back(std::make_unique<FrameBuffer>()); // zero-initialised, 64-byte aligned
buffer_device.push_back(reinterpret_cast<DeviceOutput *>(buffers.back().get()));
}
device = std::make_unique<HLSDevice>(buffer_device);
}
+9 -6
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_HLSSIMULATEDDEVICE_H
#define JUNGFRAUJOCH_HLSSIMULATEDDEVICE_H
#pragma once
#include <thread>
@@ -12,6 +11,13 @@
#include "FPGAAcquisitionDevice.h"
class HLSSimulatedDevice : public FPGAAcquisitionDevice {
// Owns the simulated frame buffers. Plain heap (this path is not performance-critical, so no
// NUMA placement and no mmap), but page-aligned (4 KiB) to match the real device's kernel DMA
// buffers - more than enough for the data path's alignment needs (AXI datamover 64 B,
// FPGAIntegrationTest 128 B). Declared before `device` so the buffers outlive the HLSDevice
// action thread that writes into them; buffer_device points into these.
struct alignas(4096) FrameBuffer { uint8_t data[FPGA_BUFFER_LOCATION_SIZE]; };
std::vector<std::unique_ptr<FrameBuffer>> buffers;
std::unique_ptr<HLSDevice> device;
void HW_ReadActionRegister(DataCollectionConfig *job) override;
@@ -26,7 +32,7 @@ class HLSSimulatedDevice : public FPGAAcquisitionDevice {
void HW_SetSpotFinderParameters(const SpotFinderParameters &params) override;
void HW_RunInternalGenerator(const FrameGeneratorConfig &config) override;
public:
HLSSimulatedDevice(uint16_t data_stream, size_t in_frame_buffer_size_modules, int16_t numa_node = -1);
HLSSimulatedDevice(uint16_t data_stream, size_t in_frame_buffer_size_modules);
~HLSSimulatedDevice() override = default;
void CreateJFPacket(const DiffractionExperiment& experiment, uint64_t frame_number, uint32_t eth_packet,
uint32_t module_number, const uint16_t *data, int8_t adjust_axis = 0, uint8_t user = 0);
@@ -41,6 +47,3 @@ public:
void Cancel() override;
DeviceStatus GetDeviceStatus() const override;
};
#endif //JUNGFRAUJOCH_HLSSIMULATEDDEVICE_H
+9
View File
@@ -33,6 +33,15 @@ PCIExpressDevice::PCIExpressDevice(uint16_t data_stream, const std::string &devi
}
}
PCIExpressDevice::~PCIExpressDevice() {
UnmapBuffers();
}
void PCIExpressDevice::UnmapBuffers() {
for (auto &buf: buffer_device)
if (buf != nullptr) dev.UnmapKernelBuffer(buf);
}
bool PCIExpressDevice::HW_ReadMailbox(uint32_t *values) {
PCI_EXCEPT(return dev.ReadWorkCompletion(values);)
}
+3 -4
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_PCIEXPRESSDEVICE_H
#define JUNGFRAUJOCH_PCIEXPRESSDEVICE_H
#pragma once
#include "FPGAAcquisitionDevice.h"
#include "../fpga/host_library/JungfraujochDevice.h"
@@ -21,10 +20,12 @@ class PCIExpressDevice : public FPGAAcquisitionDevice {
void FPGA_EndAction() override;
uint32_t GetNumKernelBuffers() const;
void HW_RunInternalGenerator(const FrameGeneratorConfig &config) override;
void UnmapBuffers();
public:
explicit PCIExpressDevice(uint16_t data_stream);
PCIExpressDevice(uint16_t data_stream, uint16_t pci_slot);
PCIExpressDevice(uint16_t data_stream, const std::string &device_name);
~PCIExpressDevice() override;
void Cancel() override;
int32_t GetNUMANode() const override;
@@ -36,5 +37,3 @@ public:
DeviceStatus GetDeviceStatus() const override;
DataCollectionStatus GetDataCollectionStatus() const override;
};
#endif //JUNGFRAUJOCH_PCIEXPRESSDEVICE_H
+15 -11
View File
@@ -6,17 +6,21 @@ AUX_SOURCE_DIRECTORY(gen/model MODEL_SOURCES)
ADD_LIBRARY(JFJochAPI STATIC ${MODEL_SOURCES})
TARGET_INCLUDE_DIRECTORIES(JFJochAPI PUBLIC gen/model)
# Jungfraujoch Broker (abstract from HTTP service)
ADD_LIBRARY(JFJochBroker STATIC
JFJochStateMachine.cpp JFJochStateMachine.h
JFJochServices.cpp JFJochServices.h
JFJochBrokerParser.cpp JFJochBrokerParser.h
OpenAPIConvert.h OpenAPIConvert.cpp)
# The broker service pulls in the receiver/detector stack. A viewer-only build
# needs JFJochAPI (the shared OpenAPI model, above) but none of this machinery.
IF (NOT JFJOCH_VIEWER_ONLY)
# Jungfraujoch Broker (abstract from HTTP service)
ADD_LIBRARY(JFJochBroker STATIC
JFJochStateMachine.cpp JFJochStateMachine.h
JFJochServices.cpp JFJochServices.h
JFJochBrokerParser.cpp JFJochBrokerParser.h
OpenAPIConvert.h OpenAPIConvert.cpp)
TARGET_LINK_LIBRARIES(JFJochBroker JFJochReceiver JFJochDetector JFJochCommon JFJochAPI JFJochPreview)
TARGET_LINK_LIBRARIES(JFJochBroker JFJochReceiver JFJochDetector JFJochCommon JFJochAPI JFJochPreview)
ADD_EXECUTABLE(jfjoch_broker jfjoch_broker.cpp JFJochBrokerHttp.cpp JFJochBrokerHttp.h)
ADD_EXECUTABLE(jfjoch_broker jfjoch_broker.cpp JFJochBrokerHttp.cpp JFJochBrokerHttp.h)
TARGET_LINK_LIBRARIES(jfjoch_broker JFJochBroker httplib::httplib ${CMAKE_DL_LIBS})
TARGET_INCLUDE_DIRECTORIES(jfjoch_broker PUBLIC gen/api)
INSTALL(TARGETS jfjoch_broker RUNTIME COMPONENT jfjoch)
TARGET_LINK_LIBRARIES(jfjoch_broker JFJochBroker httplib::httplib ${CMAKE_DL_LIBS})
TARGET_INCLUDE_DIRECTORIES(jfjoch_broker PUBLIC gen/api)
INSTALL(TARGETS jfjoch_broker RUNTIME COMPONENT jfjoch)
ENDIF()
+60 -9
View File
@@ -138,10 +138,6 @@ std::pair<int, std::string> JFJochBrokerHttp::handleOperationException(const std
void JFJochBrokerHttp::attach(httplib::Server &server) {
register_routes(server);
server.set_error_handler([](const httplib::Request &, httplib::Response &res) {
res.status = 404;
res.set_content("The requested method does not exist", "text/plain");
});
}
void JFJochBrokerHttp::register_routes(httplib::Server &server) {
@@ -197,6 +193,8 @@ void JFJochBrokerHttp::register_routes(httplib::Server &server) {
server.Post("/config/image_format/raw", bind_noarg(&JFJochBrokerHttp::config_image_format_raw_post));
server.Get("/config/indexing", bind_noarg(&JFJochBrokerHttp::config_indexing_get));
server.Put("/config/indexing", bind_json(&JFJochBrokerHttp::config_indexing_put, Indexing_settings{}));
server.Get("/config/bragg_integration", bind_noarg(&JFJochBrokerHttp::config_bragg_integration_get));
server.Put("/config/bragg_integration", bind_json(&JFJochBrokerHttp::config_bragg_integration_put, Bragg_integration_settings{}));
server.Get("/config/instrument", bind_noarg(&JFJochBrokerHttp::config_instrument_get));
server.Put("/config/instrument", bind_json(&JFJochBrokerHttp::config_instrument_put, Instrument_metadata{}));
server.Put("/config/internal_generator_image", [this](const httplib::Request &req, httplib::Response &res) {
@@ -347,6 +345,15 @@ void JFJochBrokerHttp::register_routes(httplib::Server &server) {
}
});
server.Post("/wait_until_running", [this](const httplib::Request &req, httplib::Response &res) {
try {
wait_until_running_post(parse_query_value<int32_t>(req, "timeout"), res);
} catch (const std::exception &e) {
auto [c, s] = handleOperationException(e);
send_plain(res, c, s);
}
});
server.Get("/xfel/event_code", bind_noarg(&JFJochBrokerHttp::xfel_event_code_get));
server.Get("/xfel/pulse_id", bind_noarg(&JFJochBrokerHttp::xfel_pulse_id_get));
}
@@ -369,7 +376,7 @@ void JFJochBrokerHttp::initialize_post(httplib::Response &response) {
void JFJochBrokerHttp::start_post(const Dataset_settings &datasetSettings, httplib::Response &response) {
nlohmann::json j = datasetSettings;
logger.Info("Start {}", j.dump());
state_machine.Start(Convert(datasetSettings));
state_machine.Start(Convert(datasetSettings), datasetSettings.isAsyncStart());
response.status = 200;
}
@@ -377,6 +384,38 @@ void JFJochBrokerHttp::status_get(httplib::Response &response) {
ProcessOutput(Convert(state_machine.GetStatus()), response);
}
void JFJochBrokerHttp::wait_until_running_post(const std::optional<int32_t> &timeout, httplib::Response &response) {
BrokerStatus status;
if (!timeout)
status = state_machine.WaitTillNotBusy(std::chrono::minutes(1));
else if ((timeout.value() > 3600) || (timeout.value() < 0)) {
response.status = 400;
response.set_content("timeout must be in range 0..3600", "text/plain");
return;
} else if (timeout.value() == 0)
status = state_machine.GetStatus();
else
status = state_machine.WaitTillNotBusy(std::chrono::seconds(timeout.value()));
logger.Info("Wait until running");
switch (status.state) {
case JFJochState::Measuring:
response.status = 200;
break;
case JFJochState::Inactive:
response.status = 502;
break;
case JFJochState::Error:
throw WrongDAQStateException(status.message.value_or("Unknown error"));
case JFJochState::Idle:
case JFJochState::Busy:
case JFJochState::Calibration:
response.status = 504;
break;
}
}
void JFJochBrokerHttp::wait_till_done_post(const std::optional<int32_t> &timeout, httplib::Response &response) {
BrokerStatus status;
if (!timeout)
@@ -390,6 +429,8 @@ void JFJochBrokerHttp::wait_till_done_post(const std::optional<int32_t> &timeout
else
status = state_machine.WaitTillMeasurementDone(std::chrono::seconds(timeout.value()));
logger.Info("Wait till done");
switch (status.state) {
case JFJochState::Idle:
response.status = 200;
@@ -538,6 +579,7 @@ void JFJochBrokerHttp::statistics_get(httplib::Response &response) {
statistics.setAzInt(Convert(state_machine.GetRadialIntegrationSettings()));
statistics.setBuffer(Convert(state_machine.GetImageBufferStatus()));
statistics.setIndexing(Convert(state_machine.GetIndexingSettings()));
statistics.setBraggIntegration(Convert(state_machine.GetBraggIntegrationSettings()));
statistics.setDarkMask(Convert(state_machine.GetDarkMaskSettings()));
statistics.setImagePusher(Convert(state_machine.GetImagePusherStatus()));
@@ -704,9 +746,8 @@ void JFJochBrokerHttp::config_user_mask_tiff_get(httplib::Response &response) {
void JFJochBrokerHttp::config_user_mask_tiff_put(const httplib::Request &request,
httplib::Response &response) {
uint32_t cols, lines;
auto v = ReadTIFFFromString32(request.body, cols, lines);
state_machine.SetUserPixelMask(v);
std::vector<uint8_t> buffer;
state_machine.SetUserPixelMask(ReadTIFF(request.body, buffer));
response.status = 200;
}
@@ -771,6 +812,16 @@ void JFJochBrokerHttp::config_indexing_put(const Indexing_settings &indexingSett
response.status = 200;
}
void JFJochBrokerHttp::config_bragg_integration_get(httplib::Response &response) {
ProcessOutput(Convert(state_machine.GetBraggIntegrationSettings()), response);
}
void JFJochBrokerHttp::config_bragg_integration_put(const Bragg_integration_settings &braggIntegrationSettings,
httplib::Response &response) {
state_machine.SetBraggIntegrationSettings(Convert(braggIntegrationSettings));
response.status = 200;
}
void JFJochBrokerHttp::result_scan_get(httplib::Response &response) {
auto ret = state_machine.GetScanResult();
if (ret.has_value())
@@ -841,7 +892,7 @@ void JFJochBrokerHttp::preview_plot_get(const std::optional<std::string> &type,
if (azintUnit == "Q_recipA" || azintUnit == "q_recipa")
unit = PlotAzintUnit::Q_recipA;
else if (azintUnit == "d_A" || azintUnit == "d_a")
unit = PlotAzintUnit::D_A;
unit = PlotAzintUnit::d_A;
else if (azintUnit == "two_theta_deg")
unit = PlotAzintUnit::TwoTheta_deg;
}
+6
View File
@@ -17,6 +17,7 @@
#include "OpenAPIConvert.h"
#include "gen/model/Azim_int_settings.h"
#include "gen/model/Bragg_integration_settings.h"
#include "gen/model/Broker_status.h"
#include "gen/model/Dark_mask_settings.h"
#include "gen/model/Dataset_settings.h"
@@ -77,6 +78,8 @@ class JFJochBrokerHttp {
httplib::Response &response);
void status_get(httplib::Response &response);
void wait_till_done_post(const std::optional<int32_t> &timeout, httplib::Response &response);
void wait_until_running_post(const std::optional<int32_t> &timeout, httplib::Response &response);
void trigger_post(httplib::Response &response);
void pedestal_post(httplib::Response &response);
@@ -174,6 +177,9 @@ class JFJochBrokerHttp {
void config_indexing_get(httplib::Response &response);
void config_indexing_put(const org::openapitools::server::model::Indexing_settings &indexingSettings,
httplib::Response &response);
void config_bragg_integration_get(httplib::Response &response);
void config_bragg_integration_put(const org::openapitools::server::model::Bragg_integration_settings &braggIntegrationSettings,
httplib::Response &response);
void config_dark_mask_get(httplib::Response &response);
void config_dark_mask_put(const org::openapitools::server::model::Dark_mask_settings &darkMaskSettings,
+29 -13
View File
@@ -91,10 +91,15 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto
DetectorSetup setup(geom, detector_type, d.getDescription(), d.getHostname());
auto calib = d.getCalibrationFile();
auto trim_energies = d.getTrimEnergiesEV();
if (!calib.empty()) {
switch (detector_type) {
case DetectorType::EIGER:
setup.SetTrimFiles(calib);
if (trim_energies.empty())
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Trimming energies not provided");
setup.TrimEnergies_eV(trim_energies);
break;
case DetectorType::JUNGFRAU:
setup.LoadGain(calib);
@@ -118,25 +123,31 @@ DetectorSetup ParseDetectorSetup(const org::openapitools::server::model::Detecto
setup.HighVoltage(d.getHighVoltageV());
setup.UDPInterfaceCount(d.getUdpInterfaceCount())
.SensorThickness_um(d.getSensorThicknessUm())
// .PixelSize_um(GET_FLOAT(j, "pixel_size_um", 75.0f))
.SensorMaterial(d.getSensorMaterial())
.SerialNumber(d.getSerialNumber())
.ModuleSync(d.isModuleSync());
if (d.readoutTimeUsIsSet())
setup.ReadOutTime(std::chrono::microseconds(d.getReadoutTimeUs()));
// Only override the sensor from the request when it explicitly sets these. The API model defaults
// them (320 um / Si) with IsSet=false, so an unconditional set would clobber the detector-reported
// value (DECTRIS SIMPLON read) or a detector-specific default with 320 um (highVoltageV above is
// guarded the same way).
if (d.sensorThicknessUmIsSet())
setup.SensorThickness_um(d.getSensorThicknessUm());
if (d.sensorMaterialIsSet())
setup.SensorMaterial(d.getSensorMaterial());
if (d.readoutTimeNsIsSet())
setup.ReadOutTime(std::chrono::nanoseconds(d.getReadoutTimeNs()));
if (d.baseDataIpv4AddressIsSet())
setup.BaseIPv4Addr(d.getBaseDataIpv4Address());
if (d.txDelayIsSet())
setup.TxDelay(d.getTxDelay());
if (d.minimumCountTimeUsIsSet())
setup.MinCountTime(std::chrono::microseconds(d.getMinimumCountTimeUs()));
if (d.minCountTimeNsIsSet())
setup.MinCountTime(std::chrono::nanoseconds(d.getMinCountTimeNs()));
if (d.minimumFrameTimeUsIsSet())
setup.MinFrameTime(std::chrono::microseconds(d.getMinimumFrameTimeUs()));
if (d.minFrameTimeNsIsSet())
setup.MinFrameTime(std::chrono::nanoseconds(d.getMinFrameTimeNs()));
if (d.defaultSettingsIsSet())
setup.DefaultSettings(Convert(d.getDefaultSettings()));
@@ -166,6 +177,9 @@ void ParseFacilityConfiguration(const org::openapitools::server::model::Jfjoch_s
if (j.indexingIsSet())
experiment.ImportIndexingSettings(Convert(j.getIndexing()));
if (j.braggIntegrationIsSet())
experiment.ImportBraggIntegrationSettings(Convert(j.getBraggIntegration()));
if (j.darkMaskIsSet())
experiment.ImportDarkMaskSettings(Convert(j.getDarkMask()));
}
@@ -201,6 +215,12 @@ std::unique_ptr<ImagePusher> ParseTCPImagePusher(const org::openapitools::server
auto tmp = std::make_unique<TCPStreamPusher>(j.getTcp().getImageSocket(), j.getTcp().getNwriters(), send_buffer_size);
// Optional liveness/backpressure tuning; unset -> keep the pusher's built-in defaults.
if (j.getTcp().peerLivenessTimeoutMsIsSet() && j.getTcp().getPeerLivenessTimeoutMs() > 0)
tmp->SetPeerLivenessTimeout(std::chrono::milliseconds(j.getTcp().getPeerLivenessTimeoutMs()));
if (j.getTcp().maxBackpressureTimeoutMsIsSet() && j.getTcp().getMaxBackpressureTimeoutMs() > 0)
tmp->SetMaxBackpressureTimeout(std::chrono::milliseconds(j.getTcp().getMaxBackpressureTimeoutMs()));
return std::move(tmp);
}
@@ -234,10 +254,6 @@ void ParseAcquisitionDeviceGroup(const org::openapitools::server::model::Jfjoch_
}
void ParseReceiverSettings(const org::openapitools::server::model::Jfjoch_settings &input, JFJochReceiverService &service) {
std::string numa_policy = input.getNumaPolicy();
if (!numa_policy.empty())
service.NUMAPolicy(numa_policy);
// Using default in case
service.NumThreads(input.getReceiverThreads());
+1 -4
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_JFJOCHBROKERPARSER_H
#define JUNGFRAUJOCH_JFJOCHBROKERPARSER_H
#pragma once
#include "../common/DiffractionExperiment.h"
#include "../acquisition_device/AcquisitionDeviceGroup.h"
@@ -22,5 +21,3 @@ std::unique_ptr<ImagePusher> ParseImagePusher(const org::openapitools::server::m
void ParseAcquisitionDeviceGroup(const org::openapitools::server::model::Jfjoch_settings &input, AcquisitionDeviceGroup &aq_devices);
void ParseReceiverSettings(const org::openapitools::server::model::Jfjoch_settings &input, JFJochReceiverService &service);
SpotFindingSettings ParseSpotFindingSettings(const org::openapitools::server::model::Jfjoch_settings &input);
#endif //JUNGFRAUJOCH_JFJOCHBROKERPARSER_H
+19 -2
View File
@@ -17,7 +17,9 @@ void JFJochServices::Start(const DiffractionExperiment& experiment,
if (receiver != nullptr) {
logger.Info(" ... receiver start");
receiver->Start(experiment, pixel_mask, calibration);
if (image_puller)
image_puller->ResumeAndClear();
receiver->Start(experiment, pixel_mask, calibration, image_puller);
{
std::shared_lock ul(detector_mutex);
if (detector && !experiment.IsUsingInternalPacketGen()) {
@@ -31,6 +33,8 @@ void JFJochServices::Start(const DiffractionExperiment& experiment,
}
void JFJochServices::Off() {
image_puller.reset();
std::unique_ptr<DetectorWrapper> old_detector;
{
std::unique_lock ul(detector_mutex);
@@ -53,9 +57,12 @@ void JFJochServices::On(DiffractionExperiment &x) {
case DetectorType::EIGER:
case DetectorType::JUNGFRAU:
new_detector = std::make_unique<SLSDetectorWrapper>();
image_puller.reset();
break;
case DetectorType::DECTRIS:
new_detector = std::make_unique<DectrisDetectorWrapper>();
image_puller = std::make_shared<ZMQImagePuller>(x.GetDetectorSetup().GetDECTRISStream2Addr());
image_puller->Suspend();
break;
}
new_detector->Initialize(x, receiver->GetNetworkConfig());
@@ -100,6 +107,8 @@ JFJochServicesOutput JFJochServices::Stop() {
logger.Info("Wait for receiver done");
ret.receiver_output = receiver->Stop();
if (image_puller)
image_puller->Suspend();
logger.Info(" ... Receiver efficiency: {} % Max delay: {} Compression ratio {}x",
static_cast<int>(ret.receiver_output.efficiency * 100.0),
@@ -113,11 +122,19 @@ JFJochServicesOutput JFJochServices::Stop() {
ret.receiver_output.received_packets[i], ret.receiver_output.expected_packets[i]);
}
}
// A writer that broke mid-run (e.g. a lost connection) leaves a truncated file.
// Surface that as a failed acquisition instead of silently reporting success.
if (!ret.receiver_output.writer_err.empty())
throw JFJochException(JFJochExceptionCategory::FileWriteError,
"Writer error, written data may be incomplete: "
+ ret.receiver_output.writer_err);
logger.Info(" ... finished with success");
} catch (const JFJochException &e) {
logger.Error(" ... finished with error {}", e.what());
exception = std::make_unique<JFJochException>(e);
}
logger.Info("Receiver finished with success");
} else {
logger.Info("No receiver - sleeping for 30 seconds");
std::this_thread::sleep_for(std::chrono::seconds(30));
+2 -4
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_JFJOCHSERVICES_H
#define JUNGFRAUJOCH_JFJOCHSERVICES_H
#pragma once
#include <shared_mutex>
#include "../common/DiffractionExperiment.h"
@@ -20,6 +19,7 @@ class JFJochServices {
JFJochReceiverService *receiver = nullptr;
std::unique_ptr<DetectorWrapper> detector;
std::shared_ptr<ZMQImagePuller> image_puller;
std::atomic<bool> cannot_stop_detector = false;
Logger &logger;
@@ -74,5 +74,3 @@ public:
ImagePusherStatus GetImagePusherStatus() const;
};
#endif //JUNGFRAUJOCH_JFJOCHSERVICES_H
+71 -26
View File
@@ -82,7 +82,7 @@ void JFJochStateMachine::CalibrateJUNGFRAU(std::unique_lock<std::mutex> &ul) {
pixel_mask.LoadDetectorBadPixelMask(experiment, calibration.get());
}
void JFJochStateMachine::CalibrateDetector(std::unique_lock<std::mutex> &ul) {
void JFJochStateMachine::CalibrateDetector(std::unique_lock<std::mutex> ul) {
cancel_sequence = false;
pixel_mask = PixelMask(experiment);
@@ -112,8 +112,9 @@ void JFJochStateMachine::CalibrateDetector(std::unique_lock<std::mutex> &ul) {
throw;
}
SetState(JFJochState::Idle, "Calibration sequence done", BrokerStatus::MessageSeverity::Success);
logger.Info("Pedestal sequence done");
logger.Info("Calibration sequence done");
ul.unlock(); // Notify all outside of mutex
c.notify_all();
}
void JFJochStateMachine::TakeDarkMaskInternal(std::unique_lock<std::mutex> &ul) {
@@ -144,7 +145,7 @@ void JFJochStateMachine::TakeDarkMaskInternal(std::unique_lock<std::mutex> &ul)
ul.lock();
if (mask_output.receiver_output.dark_mask_result.size() == local_experiment.GetPixelsNum()) {
pixel_mask.LoadDarkBadPixelMask(mask_output.receiver_output.dark_mask_result);
pixel_mask.LoadDarkBadPixelMask(local_experiment, mask_output.receiver_output.dark_mask_result);
SetState(JFJochState::Idle);
} else
SetState(JFJochState::Error, "Mask not collected properly", BrokerStatus::MessageSeverity::Error);
@@ -309,12 +310,9 @@ void JFJochStateMachine::Pedestal() {
if (state != JFJochState::Idle)
throw WrongDAQStateException("Must be idle to take pedestal");
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
}
SetState(JFJochState::Busy, "Updating calibration", BrokerStatus::MessageSeverity::Info);
void JFJochStateMachine::PedestalThread(std::unique_lock<std::mutex> ul) {
CalibrateDetector(ul);
measurement = std::async(std::launch::async, &JFJochStateMachine::CalibrateDetector, this, std::move(ul));
}
void JFJochStateMachine::InitializeThread(std::unique_lock<std::mutex> ul) {
@@ -337,14 +335,14 @@ void JFJochStateMachine::InitializeThread(std::unique_lock<std::mutex> ul) {
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
throw;
}
CalibrateDetector(ul);
CalibrateDetector(std::move(ul));
}
void JFJochStateMachine::Trigger() {
services.Trigger();
}
void JFJochStateMachine::Start(const DatasetSettings &settings) {
void JFJochStateMachine::Start(const DatasetSettings &settings, bool async) {
std::unique_lock ul(m);
if (state != JFJochState::Idle)
@@ -363,18 +361,16 @@ void JFJochStateMachine::Start(const DatasetSettings &settings) {
experiment.IncrementRunNumber();
try {
SetState(JFJochState::Busy, "Preparing measurement", BrokerStatus::MessageSeverity::Info);
services.SetSpotFindingSettings(GetSpotFindingSettings());
services.Start(experiment, pixel_mask, calibration.get());
SetState(JFJochState::Busy, "Preparing measurement", BrokerStatus::MessageSeverity::Info);
measurement = std::async(std::launch::async, &JFJochStateMachine::MeasurementThread, this);
if (!async)
c.wait(ul, [&]() { return state != JFJochState::Busy; });
}
SetState(JFJochState::Measuring, "Measuring ...", BrokerStatus::MessageSeverity::Info);
measurement = std::async(std::launch::async, &JFJochStateMachine::MeasurementThread, this);
} catch (const std::exception &e) {
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
services.Cancel();
throw;
}
BrokerStatus JFJochStateMachine::WaitTillNotBusy(std::chrono::milliseconds timeout) {
std::unique_lock ul(m);
c.wait_for(ul, timeout, [&]() { return state != JFJochState::Busy; });
return GetStatus();
}
void JFJochStateMachine::UpdatePixelMaskStatistics(const PixelMaskStatistics &input) {
@@ -388,6 +384,24 @@ PixelMaskStatistics JFJochStateMachine::GetPixelMaskStatistics() const {
}
void JFJochStateMachine::MeasurementThread() {
try {
services.SetSpotFindingSettings(GetSpotFindingSettings());
services.Start(experiment, pixel_mask, calibration.get());
{
std::unique_lock ul(m);
SetState(JFJochState::Measuring, "Measuring ...", BrokerStatus::MessageSeverity::Info);
}
c.notify_all();
} catch (std::exception &e) {
{
std::unique_lock ul(m);
SetState(JFJochState::Error, e.what(), BrokerStatus::MessageSeverity::Error);
}
services.Cancel();
c.notify_all();
return;
}
try {
auto tmp_output = services.Stop();
{
@@ -395,13 +409,14 @@ void JFJochStateMachine::MeasurementThread() {
scan_result = tmp_output.receiver_output.scan_result;
auto image_mean_time = tmp_output.receiver_output.processing_time;
logger.Info("Per-image processing time: (mean; microseconds): decompress {:.0f} preprocess {:.0f} azint {:.0f} spot finding {:.0f} indexing {:.0f} refinement {:.0f} prediction {:.0f} integration {:.0f} total {:.0f}",
logger.Info("Per-image mean processing time (microseconds): compression {:.0f} preprocess {:.0f} azint {:.0f} spot finding {:.0f} indexing {:.0f} refinement {:.0f} indexing analysis {:.0f} prediction {:.0f} integration {:.0f} total {:.0f}",
image_mean_time.compression * 1e6,
image_mean_time.preprocessing * 1e6,
image_mean_time.azint * 1e6,
image_mean_time.spot_finding * 1e6,
image_mean_time.indexing * 1e6,
image_mean_time.refinement * 1e6,
image_mean_time.indexing_analysis * 1e6,
image_mean_time.bragg_prediction * 1e6,
image_mean_time.integration * 1e6,
image_mean_time.processing * 1e6);
@@ -540,7 +555,7 @@ void JFJochStateMachine::LoadDetectorSettings(const DetectorSettings &settings)
case JFJochState::Idle:
if (ImportDetectorSettings(settings)) {
SetState(JFJochState::Busy, "Loading settings", BrokerStatus::MessageSeverity::Info);
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
measurement = std::async(std::launch::async, &JFJochStateMachine::CalibrateDetector, this, std::move(ul));
} else {
try {
SetState(JFJochState::Busy, "Configure detector", BrokerStatus::MessageSeverity::Info);
@@ -797,7 +812,7 @@ void JFJochStateMachine::LoadInternalGeneratorImageTIFF(const std::string &s, ui
uint32_t cols, lines;
auto v = ReadTIFFFromString16(s, cols, lines);
if (((cols == experiment.GetXPixelsNum()) && (lines == experiment.GetYPixelsNum()))
|| ((cols == RAW_MODULE_SIZE) && (lines == RAW_MODULE_LINES * experiment.GetModulesNum())))
|| ((cols == RAW_MODULE_COLS) && (lines == RAW_MODULE_LINES * experiment.GetModulesNum())))
services.LoadInternalGeneratorImage(experiment, v, image_number);
else
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
@@ -888,6 +903,21 @@ void JFJochStateMachine::SetUserPixelMask(const std::vector<uint32_t> &v) {
}
}
void JFJochStateMachine::SetUserPixelMask(const CompressedImage &image) {
std::unique_lock ul(m);
if (state != JFJochState::Idle)
throw WrongDAQStateException("User mask can be only modified in Idle state");
try {
pixel_mask.LoadUserMask(experiment, image);
UpdatePixelMaskStatistics(pixel_mask.GetStatistics());
} catch (const JFJochException &e) {
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Problem handling user mask " + std::string(e.what()));
}
}
InstrumentMetadata JFJochStateMachine::GetInstrumentMetadata() const {
std::unique_lock ul(experiment_instrument_metadata_mutex);
return experiment.GetInstrumentMetadata();
@@ -1029,6 +1059,21 @@ void JFJochStateMachine::SetIndexingSettings(const IndexingSettings &input) {
}
}
BraggIntegrationSettings JFJochStateMachine::GetBraggIntegrationSettings() const {
std::unique_lock ul(experiment_indexing_settings_mutex);
return experiment.GetBraggIntegrationSettings();
}
void JFJochStateMachine::SetBraggIntegrationSettings(const BraggIntegrationSettings &input) {
std::unique_lock ul(m);
if (IsRunning())
throw WrongDAQStateException("Cannot change Bragg integration settings during data collection");
// The analysis engines read the integrator mode off the experiment when they are built at the start
// of the next run, so importing it here is all that is needed.
std::unique_lock ul2(experiment_indexing_settings_mutex);
experiment.ImportBraggIntegrationSettings(input);
}
std::optional<ScanResult> JFJochStateMachine::GetScanResult() const {
std::unique_lock ul(m);
if (IsRunning())
@@ -1054,7 +1099,7 @@ void JFJochStateMachine::SetDarkMaskSettings(const DarkMaskSettings &settings) {
if ((experiment.GetDetectorType() == DetectorType::DECTRIS) && (state == JFJochState::Idle)) {
// Need to redo the calibration
SetState(JFJochState::Busy, "Loading settings", BrokerStatus::MessageSeverity::Info);
measurement = std::async(std::launch::async, &JFJochStateMachine::PedestalThread, this, std::move(ul));
measurement = std::async(std::launch::async, &JFJochStateMachine::CalibrateDetector, this, std::move(ul));
}
}
+12 -11
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JUNGFRAUJOCH_JFJOCHSTATEMACHINE_H
#define JUNGFRAUJOCH_JFJOCHSTATEMACHINE_H
#pragma once
#include <string>
#include <mutex>
@@ -25,9 +24,9 @@ struct DetectorListElement {
int64_t nmodules;
int64_t width;
int64_t height;
std::chrono::microseconds readout_time;
std::chrono::microseconds min_frame_time;
std::chrono::microseconds min_count_time;
std::chrono::nanoseconds readout_time;
std::chrono::nanoseconds min_frame_time;
std::chrono::nanoseconds min_count_time;
DetectorType detector_type;
float pixel_size_mm;
};
@@ -127,14 +126,13 @@ class JFJochStateMachine {
const std::optional<std::string> &message = {},
BrokerStatus::MessageSeverity message_severity = BrokerStatus::MessageSeverity::Info);
void MeasurementThread();
void PedestalThread(std::unique_lock<std::mutex> ul);
void InitializeThread(std::unique_lock<std::mutex> ul);
bool ImportPedestalG1G2(const JFJochReceiverOutput &receiver_output, size_t gain_level, size_t storage_cell = 0);
bool ImportPedestalG0(const JFJochReceiverOutput &receiver_output);
bool IsRunning() const; // Is state Busy/Pedestal/Measure
void ResetError() noexcept;
void TakeDarkMaskInternal(std::unique_lock<std::mutex> &ul);
void CalibrateDetector(std::unique_lock<std::mutex> &ul);
void CalibrateDetector(std::unique_lock<std::mutex> ul);
void CalibrateJUNGFRAU(std::unique_lock<std::mutex> &ul);
void TakePedestalInternalG0(std::unique_lock<std::mutex> &ul);
void TakePedestalInternalG1(std::unique_lock<std::mutex> &ul, int32_t storage_cell = 0);
@@ -152,7 +150,9 @@ public:
void Initialize();
void Pedestal();
void Deactivate();
void Start(const DatasetSettings& settings);
void Start(const DatasetSettings& settings, bool async = false);
BrokerStatus WaitTillNotBusy(std::chrono::milliseconds timeout);
BrokerStatus WaitTillMeasurementDone();
BrokerStatus WaitTillMeasurementDone(std::chrono::milliseconds timeout);
void Trigger();
@@ -220,6 +220,7 @@ public:
std::vector<uint32_t> GetUserPixelMask() const;
void SetUserPixelMask(const std::vector<uint32_t> &v);
void SetUserPixelMask(const CompressedImage &image);
std::vector<DeviceStatus> GetDeviceStatus() const;
@@ -231,6 +232,9 @@ public:
void SetIndexingSettings(const IndexingSettings &input);
IndexingSettings GetIndexingSettings() const;
void SetBraggIntegrationSettings(const BraggIntegrationSettings &input);
BraggIntegrationSettings GetBraggIntegrationSettings() const;
PixelMaskStatistics GetPixelMaskStatistics() const;
void GetStartMessageFromBuffer(std::vector<uint8_t> &v);
@@ -246,6 +250,3 @@ public:
ImagePusherStatus GetImagePusherStatus() const;
};
#endif //JUNGFRAUJOCH_JFJOCHSTATEMACHINE_H
+97 -11
View File
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#include "../common/JFJochMath.h"
#include "OpenAPIConvert.h"
// From https://en.cppreference.com/w/cpp/string/byte/tolower
@@ -170,9 +171,12 @@ DetectorSettings Convert(const org::openapitools::server::model::Detector_settin
org::openapitools::server::model::Detector_settings Convert(const DetectorSettings &input) {
org::openapitools::server::model::Detector_settings ret{};
ret.setFrameTimeUs(input.GetFrameTime().count());
ret.setFrameTimeUs(std::chrono::round<std::chrono::microseconds>(
std::chrono::duration<float>(input.GetFrameTime())).count());
if (input.GetCountTime().has_value())
ret.setCountTimeUs(input.GetCountTime()->count());
ret.setCountTimeUs(std::chrono::round<std::chrono::microseconds>(
std::chrono::duration<float>(input.GetCountTime().value())
).count());
ret.setDetectorTriggerDelayNs(input.GetDetectorDelay().count());
ret.setInternalFrameGeneratorImages(input.GetInternalGeneratorImages());
ret.setInternalFrameGenerator(input.IsInternalGeneratorEnable());
@@ -370,9 +374,9 @@ org::openapitools::server::model::Detector_list Convert(const DetectorList &inpu
d.setSerialNumber(input.detector[i].serial_number);
d.setBaseIpv4Addr(input.detector[i].base_ipv4_addr);
d.setUdpInterfaceCount(input.detector[i].udp_interface_count);
d.setMinFrameTimeUs(input.detector[i].min_frame_time.count());
d.setMinCountTimeUs(input.detector[i].min_count_time.count());
d.setReadoutTimeUs(input.detector[i].readout_time.count());
d.setMinFrameTimeNs(input.detector[i].min_frame_time.count());
d.setMinCountTimeNs(input.detector[i].min_count_time.count());
d.setReadoutTimeNs(input.detector[i].readout_time.count());
d.setPixelSizeMm(input.detector[i].pixel_size_mm);
d.setType(Convert(input.detector[i].detector_type));
dets.emplace_back(std::move(d));
@@ -435,6 +439,7 @@ AzimuthalIntegrationSettings Convert(const org::openapitools::server::model::Azi
ret.QSpacing_recipA(input.getQSpacing());
ret.QRange_recipA(input.getLowQRecipA(), input.getHighQRecipA());
ret.AzimuthalBinCount(input.getAzimuthalBins());
ret.ForceCPUinFPGAWorkflow(input.isForceCpu());
return ret;
}
@@ -446,6 +451,7 @@ org::openapitools::server::model::Azim_int_settings Convert(const AzimuthalInteg
ret.setLowQRecipA(settings.GetLowQ_recipA());
ret.setQSpacing(settings.GetQSpacing_recipA());
ret.setAzimuthalBins(settings.GetAzimuthalBinCount());
ret.setForceCpu(settings.IsForceCPUinFPGAWorkflow());
return ret;
}
@@ -455,10 +461,18 @@ ROIDefinition Convert(const org::openapitools::server::model::Roi_definitions& i
output.boxes.emplace_back(ROIBox(i.getName(), i.getMinXPxl(), i.getMaxXPxl(), i.getMinYPxl(), i.getMaxYPxl()));
for (const auto &i: input.getCircle().getRois())
output.circles.emplace_back(ROICircle(i.getName(), i.getCenterXPxl(), i.getCenterYPxl(), i.getRadiusPxl()));
for (const auto &i: input.getAzim().getRois())
for (const auto &i: input.getAzim().getRois()) {
// A sector needs both bounds; if only one is given, treat it as a full ring.
float phi_min = 0, phi_max = 0;
if (i.phiMinDegIsSet() && i.phiMaxDegIsSet()) {
phi_min = i.getPhiMinDeg();
phi_max = i.getPhiMaxDeg();
}
output.azimuthal.emplace_back(ROIAzimuthal(i.getName(),
(i.getQMaxRecipA() == 0.0) ? 0.0 : 2.0f * M_PI / i.getQMaxRecipA(),
(i.getQMinRecipA() == 0.0) ? 0.0 : 2.0f * M_PI / i.getQMinRecipA()));
(i.getQMaxRecipA() == 0.0) ? 0.0 : 2.0f * PI / i.getQMaxRecipA(),
(i.getQMinRecipA() == 0.0) ? 0.0 : 2.0f * PI / i.getQMinRecipA(),
phi_min, phi_max));
}
return output;
}
@@ -485,6 +499,10 @@ org::openapitools::server::model::Roi_azim_list Convert(const std::vector<ROIAzi
elem.setName(i.GetName());
elem.setQMinRecipA(i.GetQMin_recipA());
elem.setQMaxRecipA(i.GetQMax_recipA());
if (i.HasPhi()) {
elem.setPhiMinDeg(i.GetPhiMin_deg());
elem.setPhiMaxDeg(i.GetPhiMax_deg());
}
tmp.emplace_back(elem);
}
ret.setRois(tmp);
@@ -607,6 +625,8 @@ DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings
ret.Compression(CompressionAlgorithm::BSHUF_ZSTD);
else if (compr == "bszstd_rle")
ret.Compression(CompressionAlgorithm::BSHUF_ZSTD_RLE);
else if (compr == "bszstd_rlehuf")
ret.Compression(CompressionAlgorithm::BSHUF_ZSTD_RLE_HUFF);
else if (compr == "none")
ret.Compression(CompressionAlgorithm::NO_COMPRESSION);
else
@@ -674,6 +694,18 @@ DatasetSettings Convert(const org::openapitools::server::model::Dataset_settings
ret.FluorescenceSpectrum({fl.getEnergyEV(), fl.getData()});
}
if (input.smargonIsSet()) {
auto sm = input.getSmargon();
SmargonPosition smargon;
smargon.phi_deg = sm.getPhiDeg();
smargon.chi_deg = sm.getChiDeg();
if (sm.phiAxisIsSet())
smargon.phi_axis = ConvertOpenAPI(sm.getPhiAxis());
if (sm.chiAxisIsSet())
smargon.chi_axis = ConvertOpenAPI(sm.getChiAxis());
ret.Smargon(smargon);
}
return ret;
}
@@ -725,7 +757,7 @@ org::openapitools::server::model::Zeromq_preview_settings Convert(const ZMQPrevi
org::openapitools::server::model::Zeromq_preview_settings ret;
ret.setEnabled(settings.period.has_value());
if (settings.period.has_value())
ret.setPeriodMs(settings.period.value().count());
ret.setPeriodMs(std::chrono::round<std::chrono::milliseconds>(settings.period.value()).count());
ret.setSocketAddress(settings.address);
return ret;
}
@@ -734,7 +766,7 @@ org::openapitools::server::model::Zeromq_metadata_settings Convert(const ZMQMeta
org::openapitools::server::model::Zeromq_metadata_settings ret;
ret.setEnabled(settings.period.has_value());
if (settings.period.has_value())
ret.setPeriodMs(settings.period.value().count());
ret.setPeriodMs(std::chrono::round<std::chrono::milliseconds>(settings.period.value()).count());
ret.setSocketAddress(settings.address);
return ret;
}
@@ -848,6 +880,7 @@ PlotType ConvertPlotType(const std::optional<std::string>& input) {
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Plot type is compulsory paramater");
if (input == "bkg_estimate") return PlotType::BkgEstimate;
if (input == "ice_ring_score") return PlotType::IceRingScore;
if (input == "azint") return PlotType::AzInt;
if (input == "azint_1d") return PlotType::AzInt1D;
if (input == "spot_count") return PlotType::SpotCount;
@@ -879,6 +912,12 @@ PlotType ConvertPlotType(const std::optional<std::string>& input) {
if (input == "processing_time") return PlotType::ImageProcessingTime;
if (input == "beam_center_x") return PlotType::RefinementBeamX;
if (input == "beam_center_y") return PlotType::RefinementBeamY;
if (input == "integrated_reflections") return PlotType::IntegratedReflections;
if (input == "image_scale_factor") return PlotType::ImageScaleFactor;
if (input == "image_scale_cc") return PlotType::ImageScaleCC;
if (input == "image_scale_b") return PlotType::ImageScaleBFactor;
if (input == "compression_ratio") return PlotType::CompressionRatio;
if (input == "indexing_lattice_count") return PlotType::IndexingLatticeCount;
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid,
"Plot type not recognized");
}
@@ -935,6 +974,9 @@ IndexingSettings Convert(const org::openapitools::server::model::Indexing_settin
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::BeamCenter);
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::OrientationOnly);
break;
case org::openapitools::server::model::Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE:
ret.GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum::None);
break;
@@ -1008,6 +1050,42 @@ org::openapitools::server::model::Indexing_settings Convert(const IndexingSettin
return ret;
}
BraggIntegrationSettings Convert(const org::openapitools::server::model::Bragg_integration_settings &input) {
BraggIntegrationSettings ret;
switch (input.getIntegrationModel().getValue()) {
case org::openapitools::server::model::Integration_model::eIntegration_model::PROFILEGAUSSIAN:
ret.Integrator(IntegratorMode::ProfileGaussian);
break;
case org::openapitools::server::model::Integration_model::eIntegration_model::PROFILEEMPIRICAL:
ret.Integrator(IntegratorMode::ProfileEmpirical);
break;
case org::openapitools::server::model::Integration_model::eIntegration_model::BOXSUM:
ret.Integrator(IntegratorMode::BoxSum);
break;
default:
throw JFJochException(JFJochExceptionCategory::InputParameterInvalid, "Unknown integration model");
}
return ret;
}
org::openapitools::server::model::Bragg_integration_settings Convert(const BraggIntegrationSettings &input) {
org::openapitools::server::model::Bragg_integration_settings ret;
org::openapitools::server::model::Integration_model tmp;
switch (input.GetIntegrator()) {
case IntegratorMode::ProfileGaussian:
tmp.setValue(org::openapitools::server::model::Integration_model::eIntegration_model::PROFILEGAUSSIAN);
break;
case IntegratorMode::ProfileEmpirical:
tmp.setValue(org::openapitools::server::model::Integration_model::eIntegration_model::PROFILEEMPIRICAL);
break;
case IntegratorMode::BoxSum:
tmp.setValue(org::openapitools::server::model::Integration_model::eIntegration_model::BOXSUM);
break;
}
ret.setIntegrationModel(tmp);
return ret;
}
org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
org::openapitools::server::model::Scan_result ret;
ret.setFilePrefix(input.file_prefix);
@@ -1036,6 +1114,8 @@ org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
tmp.setSpots(i.spot_count.value());
if (i.spot_count_ice.has_value())
tmp.setSpotsIce(i.spot_count_ice.value());
if (i.ice_ring_score.has_value())
tmp.setIce(i.ice_ring_score.value());
if (i.spot_count_low_res.has_value())
tmp.setSpotsLowRes(i.spot_count_low_res.value());
if (i.spot_count_indexed.has_value())
@@ -1056,6 +1136,8 @@ org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
uc.setGamma(i.uc->gamma);
tmp.setUc(uc);
}
if (i.indexed_lattice_count.has_value())
tmp.setLattCount(i.indexed_lattice_count.value());
if (i.xfel_pulse_id.has_value())
tmp.setXfelPulseid(i.xfel_pulse_id.value());
if (i.res.has_value())
@@ -1076,13 +1158,17 @@ org::openapitools::server::model::Scan_result Convert(const ScanResult& input) {
uc.setGamma(i_uc.gamma);
ret.setRotationUnitCell(uc);
}
if (input.rotation_crystal_system && input.rotation_centering)
ret.setRotationBravais(BravaisSymbol(*input.rotation_crystal_system, *input.rotation_centering));
return ret;
}
org::openapitools::server::model::Dark_mask_settings Convert(const DarkMaskSettings &input) {
org::openapitools::server::model::Dark_mask_settings ret{};
ret.setDetectorThresholdKeV(input.GetThreshold_keV());
ret.setFrameTimeUs(input.GetFrameTime().count());
ret.setFrameTimeUs(std::chrono::round<std::chrono::microseconds>(
std::chrono::duration<float>(input.GetFrameTime())
).count());
ret.setMaxFramesWithSignal(input.GetMaxFramesWithCounts());
ret.setMaxAllowedPixelCount(input.GetMaxCounts());
ret.setNumberOfFrames(input.GetNumberOfFrames());
+6 -3
View File
@@ -1,8 +1,7 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifndef JFJOCH_OPENAPICONVERT_H
#define JFJOCH_OPENAPICONVERT_H
#pragma once
#include "Dark_mask_settings.h"
#include "Image_pusher_status.h"
@@ -29,6 +28,7 @@
#include "gen/model/Rotation_axis.h"
#include "gen/model/Grid_scan.h"
#include "gen/model/Indexing_settings.h"
#include "gen/model/Bragg_integration_settings.h"
#include "gen/model/Scan_result.h"
#include "../common/JFJochMessages.h"
@@ -48,6 +48,9 @@ org::openapitools::server::model::Spot_finding_settings Convert(const SpotFindin
IndexingSettings Convert(const org::openapitools::server::model::Indexing_settings &input);
org::openapitools::server::model::Indexing_settings Convert(const IndexingSettings &input);
BraggIntegrationSettings Convert(const org::openapitools::server::model::Bragg_integration_settings &input);
org::openapitools::server::model::Bragg_integration_settings Convert(const BraggIntegrationSettings &input);
org::openapitools::server::model::Measurement_statistics Convert(const MeasurementStatistics &input);
DetectorSettings Convert(const org::openapitools::server::model::Detector_settings &input);
@@ -96,4 +99,4 @@ org::openapitools::server::model::Dark_mask_settings Convert(const DarkMaskSetti
DarkMaskSettings Convert(const org::openapitools::server::model::Dark_mask_settings& input);
org::openapitools::server::model::Image_pusher_status Convert(const ImagePusherStatus& input);
#endif //JFJOCH_OPENAPICONVERT_H
+14
View File
@@ -0,0 +1,14 @@
# Generated OpenAPI cpp-pistache-server output.
#
# Only model/ is compiled (into the JFJochAPI library) and tracked. The REST
# server is hand-written on cpp-httplib (see broker/JFJochBrokerHttp.cpp), so the
# generated Pistache server stubs below are regeneration debris: never compiled,
# and they tend to carry a newer spec version than the committed models. Keep
# them out of git to avoid accidentally committing mismatched artefacts.
/api/
/impl/
/main-api-server.cpp
/CMakeLists.txt
/README.md
/.openapi-generator/
/.openapi-generator-ignore
+87 -6
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,6 +28,8 @@ Azim_int_settings::Azim_int_settings()
m_Q_spacing = 0.0f;
m_Azimuthal_bins = 1L;
m_Azimuthal_binsIsSet = false;
m_Force_cpu = false;
m_Force_cpuIsSet = false;
}
@@ -50,7 +52,59 @@ bool Azim_int_settings::validate(std::stringstream& msg, const std::string& path
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Azim_int_settings" : pathPrefix;
/* High_q_recipA */ {
const float& value = m_High_q_recipA;
const std::string currentValuePath = _pathPrefix + ".highQRecipA";
if (value < static_cast<float>(0.000020))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.000020;";
}
if (value > static_cast<float>(10.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 10.0;";
}
}
/* Low_q_recipA */ {
const float& value = m_Low_q_recipA;
const std::string currentValuePath = _pathPrefix + ".lowQRecipA";
if (value < static_cast<float>(0.000010))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.000010;";
}
if (value > static_cast<float>(10))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 10;";
}
}
/* Q_spacing */ {
const float& value = m_Q_spacing;
const std::string currentValuePath = _pathPrefix + ".qSpacing";
if (value < static_cast<float>(0.000010))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.000010;";
}
}
if (azimuthalBinsIsSet())
{
const int64_t& value = m_Azimuthal_bins;
@@ -62,14 +116,14 @@ bool Azim_int_settings::validate(std::stringstream& msg, const std::string& path
success = false;
msg << currentValuePath << ": must be greater than or equal to 1;";
}
if (value > 256ll)
if (value > 512ll)
{
success = false;
msg << currentValuePath << ": must be less than or equal to 256;";
msg << currentValuePath << ": must be less than or equal to 512;";
}
}
return success;
}
@@ -94,7 +148,10 @@ bool Azim_int_settings::operator==(const Azim_int_settings& rhs) const
&&
((!azimuthalBinsIsSet() && !rhs.azimuthalBinsIsSet()) || (azimuthalBinsIsSet() && rhs.azimuthalBinsIsSet() && getAzimuthalBins() == rhs.getAzimuthalBins()))
((!azimuthalBinsIsSet() && !rhs.azimuthalBinsIsSet()) || (azimuthalBinsIsSet() && rhs.azimuthalBinsIsSet() && getAzimuthalBins() == rhs.getAzimuthalBins())) &&
((!forceCpuIsSet() && !rhs.forceCpuIsSet()) || (forceCpuIsSet() && rhs.forceCpuIsSet() && isForceCpu() == rhs.isForceCpu()))
;
}
@@ -114,6 +171,8 @@ void to_json(nlohmann::json& j, const Azim_int_settings& o)
j["q_spacing"] = o.m_Q_spacing;
if(o.azimuthalBinsIsSet())
j["azimuthal_bins"] = o.m_Azimuthal_bins;
if(o.forceCpuIsSet())
j["force_cpu"] = o.m_Force_cpu;
}
@@ -129,6 +188,11 @@ void from_json(const nlohmann::json& j, Azim_int_settings& o)
j.at("azimuthal_bins").get_to(o.m_Azimuthal_bins);
o.m_Azimuthal_binsIsSet = true;
}
if(j.find("force_cpu") != j.end())
{
j.at("force_cpu").get_to(o.m_Force_cpu);
o.m_Force_cpuIsSet = true;
}
}
@@ -189,6 +253,23 @@ void Azim_int_settings::unsetAzimuthal_bins()
{
m_Azimuthal_binsIsSet = false;
}
bool Azim_int_settings::isForceCpu() const
{
return m_Force_cpu;
}
void Azim_int_settings::setForceCpu(bool const value)
{
m_Force_cpu = value;
m_Force_cpuIsSet = true;
}
bool Azim_int_settings::forceCpuIsSet() const
{
return m_Force_cpuIsSet;
}
void Azim_int_settings::unsetForce_cpu()
{
m_Force_cpuIsSet = false;
}
} // namespace org::openapitools::server::model
+10 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -89,6 +89,13 @@ public:
void setAzimuthalBins(int64_t const value);
bool azimuthalBinsIsSet() const;
void unsetAzimuthal_bins();
/// <summary>
/// Force CPU processing of azimuthal integration in the FPGA data acquisition workflow. This allows to extend number of azimuthal integration bins, as well as to calculate standard deviation of the azimuthal integration results.
/// </summary>
bool isForceCpu() const;
void setForceCpu(bool const value);
bool forceCpuIsSet() const;
void unsetForce_cpu();
friend void to_json(nlohmann::json& j, const Azim_int_settings& o);
friend void from_json(const nlohmann::json& j, Azim_int_settings& o);
@@ -105,6 +112,8 @@ protected:
int64_t m_Azimuthal_bins;
bool m_Azimuthal_binsIsSet;
bool m_Force_cpu;
bool m_Force_cpuIsSet;
};
@@ -0,0 +1,90 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Bragg_integration_settings.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Bragg_integration_settings::Bragg_integration_settings()
{
}
void Bragg_integration_settings::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Bragg_integration_settings::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Bragg_integration_settings::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Bragg_integration_settings" : pathPrefix;
return success;
}
bool Bragg_integration_settings::operator==(const Bragg_integration_settings& rhs) const
{
return
(getIntegrationModel() == rhs.getIntegrationModel())
;
}
bool Bragg_integration_settings::operator!=(const Bragg_integration_settings& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Bragg_integration_settings& o)
{
j = nlohmann::json::object();
j["integration_model"] = o.m_Integration_model;
}
void from_json(const nlohmann::json& j, Bragg_integration_settings& o)
{
j.at("integration_model").get_to(o.m_Integration_model);
}
org::openapitools::server::model::Integration_model Bragg_integration_settings::getIntegrationModel() const
{
return m_Integration_model;
}
void Bragg_integration_settings::setIntegrationModel(org::openapitools::server::model::Integration_model const& value)
{
m_Integration_model = value;
}
} // namespace org::openapitools::server::model
@@ -0,0 +1,77 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Bragg_integration_settings.h
*
* Settings for Bragg spot integration
*/
#ifndef Bragg_integration_settings_H_
#define Bragg_integration_settings_H_
#include "Integration_model.h"
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Settings for Bragg spot integration
/// </summary>
class Bragg_integration_settings
{
public:
Bragg_integration_settings();
virtual ~Bragg_integration_settings() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Bragg_integration_settings& rhs) const;
bool operator!=(const Bragg_integration_settings& rhs) const;
/////////////////////////////////////////////
/// Bragg_integration_settings members
/// <summary>
///
/// </summary>
org::openapitools::server::model::Integration_model getIntegrationModel() const;
void setIntegrationModel(org::openapitools::server::model::Integration_model const& value);
friend void to_json(nlohmann::json& j, const Bragg_integration_settings& o);
friend void from_json(const nlohmann::json& j, Bragg_integration_settings& o);
protected:
org::openapitools::server::model::Integration_model m_Integration_model;
};
} // namespace org::openapitools::server::model
#endif /* Bragg_integration_settings_H_ */
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+60 -3
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -80,10 +80,13 @@ Dataset_settings::Dataset_settings()
m_Unit_cellIsSet = false;
m_Spot_finding = true;
m_Spot_findingIsSet = false;
m_SmargonIsSet = false;
m_Max_spot_count = 250;
m_Max_spot_countIsSet = false;
m_Detect_ice_rings = false;
m_Detect_ice_ringsIsSet = false;
m_Async_start = false;
m_Async_startIsSet = false;
m_Xray_fluorescence_spectrumIsSet = false;
}
@@ -404,7 +407,7 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
}
}
if (maxSpotCountIsSet())
{
const int32_t& value = m_Max_spot_count;
@@ -423,7 +426,7 @@ bool Dataset_settings::validate(std::stringstream& msg, const std::string& pathP
}
}
return success;
}
@@ -535,12 +538,18 @@ bool Dataset_settings::operator==(const Dataset_settings& rhs) const
((!spotFindingIsSet() && !rhs.spotFindingIsSet()) || (spotFindingIsSet() && rhs.spotFindingIsSet() && isSpotFinding() == rhs.isSpotFinding())) &&
((!smargonIsSet() && !rhs.smargonIsSet()) || (smargonIsSet() && rhs.smargonIsSet() && getSmargon() == rhs.getSmargon())) &&
((!maxSpotCountIsSet() && !rhs.maxSpotCountIsSet()) || (maxSpotCountIsSet() && rhs.maxSpotCountIsSet() && getMaxSpotCount() == rhs.getMaxSpotCount())) &&
((!detectIceRingsIsSet() && !rhs.detectIceRingsIsSet()) || (detectIceRingsIsSet() && rhs.detectIceRingsIsSet() && isDetectIceRings() == rhs.isDetectIceRings())) &&
((!asyncStartIsSet() && !rhs.asyncStartIsSet()) || (asyncStartIsSet() && rhs.asyncStartIsSet() && isAsyncStart() == rhs.isAsyncStart())) &&
((!xrayFluorescenceSpectrumIsSet() && !rhs.xrayFluorescenceSpectrumIsSet()) || (xrayFluorescenceSpectrumIsSet() && rhs.xrayFluorescenceSpectrumIsSet() && getXrayFluorescenceSpectrum() == rhs.getXrayFluorescenceSpectrum()))
;
@@ -618,10 +627,14 @@ void to_json(nlohmann::json& j, const Dataset_settings& o)
j["unit_cell"] = o.m_Unit_cell;
if(o.spotFindingIsSet())
j["spot_finding"] = o.m_Spot_finding;
if(o.smargonIsSet())
j["smargon"] = o.m_Smargon;
if(o.maxSpotCountIsSet())
j["max_spot_count"] = o.m_Max_spot_count;
if(o.detectIceRingsIsSet())
j["detect_ice_rings"] = o.m_Detect_ice_rings;
if(o.asyncStartIsSet())
j["async_start"] = o.m_Async_start;
if(o.xrayFluorescenceSpectrumIsSet())
j["xray_fluorescence_spectrum"] = o.m_Xray_fluorescence_spectrum;
@@ -783,6 +796,11 @@ void from_json(const nlohmann::json& j, Dataset_settings& o)
j.at("spot_finding").get_to(o.m_Spot_finding);
o.m_Spot_findingIsSet = true;
}
if(j.find("smargon") != j.end())
{
j.at("smargon").get_to(o.m_Smargon);
o.m_SmargonIsSet = true;
}
if(j.find("max_spot_count") != j.end())
{
j.at("max_spot_count").get_to(o.m_Max_spot_count);
@@ -793,6 +811,11 @@ void from_json(const nlohmann::json& j, Dataset_settings& o)
j.at("detect_ice_rings").get_to(o.m_Detect_ice_rings);
o.m_Detect_ice_ringsIsSet = true;
}
if(j.find("async_start") != j.end())
{
j.at("async_start").get_to(o.m_Async_start);
o.m_Async_startIsSet = true;
}
if(j.find("xray_fluorescence_spectrum") != j.end())
{
j.at("xray_fluorescence_spectrum").get_to(o.m_Xray_fluorescence_spectrum);
@@ -1343,6 +1366,23 @@ void Dataset_settings::unsetSpot_finding()
{
m_Spot_findingIsSet = false;
}
org::openapitools::server::model::Dataset_settings_smargon Dataset_settings::getSmargon() const
{
return m_Smargon;
}
void Dataset_settings::setSmargon(org::openapitools::server::model::Dataset_settings_smargon const& value)
{
m_Smargon = value;
m_SmargonIsSet = true;
}
bool Dataset_settings::smargonIsSet() const
{
return m_SmargonIsSet;
}
void Dataset_settings::unsetSmargon()
{
m_SmargonIsSet = false;
}
int32_t Dataset_settings::getMaxSpotCount() const
{
return m_Max_spot_count;
@@ -1377,6 +1417,23 @@ void Dataset_settings::unsetDetect_ice_rings()
{
m_Detect_ice_ringsIsSet = false;
}
bool Dataset_settings::isAsyncStart() const
{
return m_Async_start;
}
void Dataset_settings::setAsyncStart(bool const value)
{
m_Async_start = value;
m_Async_startIsSet = true;
}
bool Dataset_settings::asyncStartIsSet() const
{
return m_Async_startIsSet;
}
void Dataset_settings::unsetAsync_start()
{
m_Async_startIsSet = false;
}
org::openapitools::server::model::Dataset_settings_xray_fluorescence_spectrum Dataset_settings::getXrayFluorescenceSpectrum() const
{
return m_Xray_fluorescence_spectrum;
+21 -2
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,6 +21,7 @@
#include "Grid_scan.h"
#include <nlohmann/json.hpp>
#include "Dataset_settings_smargon.h"
#include "Rotation_axis.h"
#include "Unit_cell.h"
#include <string>
@@ -168,7 +169,7 @@ public:
bool gridScanIsSet() const;
void unsetGrid_scan();
/// <summary>
/// Header appendix, added as user_data/user to start ZeroMQ message (can be any valid JSON) In general, it is not saved in HDF5 file. However, if values are placed in \&quot;hdf5\&quot; object, &#x60;jfjoch_writer&#x60; will write them in /entry/data of the HDF5 file. This applies solely to string and number (double floating-point). No arrays/sub-objects is allowed. For example {\&quot;hdf5\&quot;: {\&quot;val1\&quot;:1, \&quot;val2\&quot;:\&quot;xyz\&quot;}}, will write /entry/user/val1 and /entry/user/val2.
/// Header appendix, added as user_data/user to start ZeroMQ message (can be any valid JSON) In general, it is not saved in HDF5 file. However, if values are placed in \&quot;hdf5\&quot; object, &#x60;jfjoch_writer&#x60; will write them in /entry/user of the HDF5 file. This applies solely to string and number (double floating-point). No arrays/sub-objects is allowed. For example {\&quot;hdf5\&quot;: {\&quot;val1\&quot;:1, \&quot;val2\&quot;:\&quot;xyz\&quot;}}, will write /entry/user/val1 and /entry/user/val2.
/// </summary>
nlohmann::json getHeaderAppendix() const;
void setHeaderAppendix(nlohmann::json const& value);
@@ -294,6 +295,13 @@ public:
bool spotFindingIsSet() const;
void unsetSpot_finding();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Dataset_settings_smargon getSmargon() const;
void setSmargon(org::openapitools::server::model::Dataset_settings_smargon const& value);
bool smargonIsSet() const;
void unsetSmargon();
/// <summary>
/// Maximum number of spots that are saved/used for indexing; spots with highest intensity are selected
/// </summary>
int32_t getMaxSpotCount() const;
@@ -308,6 +316,13 @@ public:
bool detectIceRingsIsSet() const;
void unsetDetect_ice_rings();
/// <summary>
/// When set to true, &#x60;/start&#x60; will not wait for detector and Jungfraujoch to be ready for the measurement.
/// </summary>
bool isAsyncStart() const;
void setAsyncStart(bool const value);
bool asyncStartIsSet() const;
void unsetAsync_start();
/// <summary>
///
/// </summary>
org::openapitools::server::model::Dataset_settings_xray_fluorescence_spectrum getXrayFluorescenceSpectrum() const;
@@ -386,10 +401,14 @@ protected:
bool m_Unit_cellIsSet;
bool m_Spot_finding;
bool m_Spot_findingIsSet;
org::openapitools::server::model::Dataset_settings_smargon m_Smargon;
bool m_SmargonIsSet;
int32_t m_Max_spot_count;
bool m_Max_spot_countIsSet;
bool m_Detect_ice_rings;
bool m_Detect_ice_ringsIsSet;
bool m_Async_start;
bool m_Async_startIsSet;
org::openapitools::server::model::Dataset_settings_xray_fluorescence_spectrum m_Xray_fluorescence_spectrum;
bool m_Xray_fluorescence_spectrumIsSet;
@@ -0,0 +1,242 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Dataset_settings_smargon.h"
#include "Helpers.h"
#include <sstream>
namespace org::openapitools::server::model
{
Dataset_settings_smargon::Dataset_settings_smargon()
{
m_Phi_deg = 0.0f;
m_Chi_deg = 0.0f;
m_Phi_axisIsSet = false;
m_Chi_axisIsSet = false;
}
void Dataset_settings_smargon::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Dataset_settings_smargon::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Dataset_settings_smargon::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Dataset_settings_smargon" : pathPrefix;
/* Chi_deg */ {
const float& value = m_Chi_deg;
const std::string currentValuePath = _pathPrefix + ".chiDeg";
if (value < static_cast<float>(0.0))
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 0.0;";
}
if (value > static_cast<float>(90.0))
{
success = false;
msg << currentValuePath << ": must be less than or equal to 90.0;";
}
}
if (phiAxisIsSet())
{
const std::vector<float>& value = m_Phi_axis;
const std::string currentValuePath = _pathPrefix + ".phiAxis";
if (value.size() < 3)
{
success = false;
msg << currentValuePath << ": must have at least 3 elements;";
}
if (value.size() > 3)
{
success = false;
msg << currentValuePath << ": must have at most 3 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const float& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
if (chiAxisIsSet())
{
const std::vector<float>& value = m_Chi_axis;
const std::string currentValuePath = _pathPrefix + ".chiAxis";
if (value.size() < 3)
{
success = false;
msg << currentValuePath << ": must have at least 3 elements;";
}
if (value.size() > 3)
{
success = false;
msg << currentValuePath << ": must have at most 3 elements;";
}
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const float& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
i++;
}
}
}
return success;
}
bool Dataset_settings_smargon::operator==(const Dataset_settings_smargon& rhs) const
{
return
(getPhiDeg() == rhs.getPhiDeg())
&&
(getChiDeg() == rhs.getChiDeg())
&&
((!phiAxisIsSet() && !rhs.phiAxisIsSet()) || (phiAxisIsSet() && rhs.phiAxisIsSet() && getPhiAxis() == rhs.getPhiAxis())) &&
((!chiAxisIsSet() && !rhs.chiAxisIsSet()) || (chiAxisIsSet() && rhs.chiAxisIsSet() && getChiAxis() == rhs.getChiAxis()))
;
}
bool Dataset_settings_smargon::operator!=(const Dataset_settings_smargon& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Dataset_settings_smargon& o)
{
j = nlohmann::json::object();
j["phi_deg"] = o.m_Phi_deg;
j["chi_deg"] = o.m_Chi_deg;
if(o.phiAxisIsSet() || !o.m_Phi_axis.empty())
j["phi_axis"] = o.m_Phi_axis;
if(o.chiAxisIsSet() || !o.m_Chi_axis.empty())
j["chi_axis"] = o.m_Chi_axis;
}
void from_json(const nlohmann::json& j, Dataset_settings_smargon& o)
{
j.at("phi_deg").get_to(o.m_Phi_deg);
j.at("chi_deg").get_to(o.m_Chi_deg);
if(j.find("phi_axis") != j.end())
{
j.at("phi_axis").get_to(o.m_Phi_axis);
o.m_Phi_axisIsSet = true;
}
if(j.find("chi_axis") != j.end())
{
j.at("chi_axis").get_to(o.m_Chi_axis);
o.m_Chi_axisIsSet = true;
}
}
float Dataset_settings_smargon::getPhiDeg() const
{
return m_Phi_deg;
}
void Dataset_settings_smargon::setPhiDeg(float const value)
{
m_Phi_deg = value;
}
float Dataset_settings_smargon::getChiDeg() const
{
return m_Chi_deg;
}
void Dataset_settings_smargon::setChiDeg(float const value)
{
m_Chi_deg = value;
}
std::vector<float> Dataset_settings_smargon::getPhiAxis() const
{
return m_Phi_axis;
}
void Dataset_settings_smargon::setPhiAxis(std::vector<float> const value)
{
m_Phi_axis = value;
m_Phi_axisIsSet = true;
}
bool Dataset_settings_smargon::phiAxisIsSet() const
{
return m_Phi_axisIsSet;
}
void Dataset_settings_smargon::unsetPhi_axis()
{
m_Phi_axisIsSet = false;
}
std::vector<float> Dataset_settings_smargon::getChiAxis() const
{
return m_Chi_axis;
}
void Dataset_settings_smargon::setChiAxis(std::vector<float> const value)
{
m_Chi_axis = value;
m_Chi_axisIsSet = true;
}
bool Dataset_settings_smargon::chiAxisIsSet() const
{
return m_Chi_axisIsSet;
}
void Dataset_settings_smargon::unsetChi_axis()
{
m_Chi_axisIsSet = false;
}
} // namespace org::openapitools::server::model
+102
View File
@@ -0,0 +1,102 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Dataset_settings_smargon.h
*
* Geometry of Smargon goniometer at SLS 2.0 / MX beamlines. Assuming that Smargon is used as static positioner and not moving during the scan, allowing to reconstruct geometry.
*/
#ifndef Dataset_settings_smargon_H_
#define Dataset_settings_smargon_H_
#include <vector>
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Geometry of Smargon goniometer at SLS 2.0 / MX beamlines. Assuming that Smargon is used as static positioner and not moving during the scan, allowing to reconstruct geometry.
/// </summary>
class Dataset_settings_smargon
{
public:
Dataset_settings_smargon();
virtual ~Dataset_settings_smargon() = default;
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Dataset_settings_smargon& rhs) const;
bool operator!=(const Dataset_settings_smargon& rhs) const;
/////////////////////////////////////////////
/// Dataset_settings_smargon members
/// <summary>
/// Phi angle in degrees
/// </summary>
float getPhiDeg() const;
void setPhiDeg(float const value);
/// <summary>
/// Chi angle in degrees
/// </summary>
float getChiDeg() const;
void setChiDeg(float const value);
/// <summary>
/// Phi rotation axis
/// </summary>
std::vector<float> getPhiAxis() const;
void setPhiAxis(std::vector<float> const value);
bool phiAxisIsSet() const;
void unsetPhi_axis();
/// <summary>
/// Chi rotation axis
/// </summary>
std::vector<float> getChiAxis() const;
void setChiAxis(std::vector<float> const value);
bool chiAxisIsSet() const;
void unsetChi_axis();
friend void to_json(nlohmann::json& j, const Dataset_settings_smargon& o);
friend void from_json(const nlohmann::json& j, Dataset_settings_smargon& o);
protected:
float m_Phi_deg;
float m_Chi_deg;
std::vector<float> m_Phi_axis;
bool m_Phi_axisIsSet;
std::vector<float> m_Chi_axis;
bool m_Chi_axisIsSet;
};
} // namespace org::openapitools::server::model
#endif /* Dataset_settings_smargon_H_ */
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+115 -61
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -33,13 +33,14 @@ Detector::Detector()
m_Module_syncIsSet = false;
m_Sensor_thickness_um = 320.0f;
m_Sensor_thickness_umIsSet = false;
m_Readout_time_us = 0L;
m_Readout_time_usIsSet = false;
m_Minimum_count_time_us = 0L;
m_Minimum_count_time_usIsSet = false;
m_Minimum_frame_time_us = 0L;
m_Minimum_frame_time_usIsSet = false;
m_Readout_time_ns = 0L;
m_Readout_time_nsIsSet = false;
m_Min_count_time_ns = 0L;
m_Min_count_time_nsIsSet = false;
m_Min_frame_time_ns = 0L;
m_Min_frame_time_nsIsSet = false;
m_Calibration_fileIsSet = false;
m_Trim_energies_eVIsSet = false;
m_HostnameIsSet = false;
m_Sensor_material = "Si";
m_Sensor_materialIsSet = false;
@@ -158,10 +159,10 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
if (readoutTimeUsIsSet())
if (readoutTimeNsIsSet())
{
const int64_t& value = m_Readout_time_us;
const std::string currentValuePath = _pathPrefix + ".readoutTimeUs";
const int64_t& value = m_Readout_time_ns;
const std::string currentValuePath = _pathPrefix + ".readoutTimeNs";
if (value < 1ll)
@@ -172,10 +173,10 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
if (minimumCountTimeUsIsSet())
if (minCountTimeNsIsSet())
{
const int64_t& value = m_Minimum_count_time_us;
const std::string currentValuePath = _pathPrefix + ".minimumCountTimeUs";
const int64_t& value = m_Min_count_time_ns;
const std::string currentValuePath = _pathPrefix + ".minCountTimeNs";
if (value < 0ll)
@@ -186,10 +187,10 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
if (minimumFrameTimeUsIsSet())
if (minFrameTimeNsIsSet())
{
const int64_t& value = m_Minimum_frame_time_us;
const std::string currentValuePath = _pathPrefix + ".minimumFrameTimeUs";
const int64_t& value = m_Min_frame_time_ns;
const std::string currentValuePath = _pathPrefix + ".minFrameTimeNs";
if (value < 0ll)
@@ -221,6 +222,32 @@ bool Detector::validate(std::stringstream& msg, const std::string& pathPrefix) c
}
if (trimEnergiesEVIsSet())
{
const std::vector<int32_t>& value = m_Trim_energies_eV;
const std::string currentValuePath = _pathPrefix + ".trimEnergiesEV";
{ // Recursive validation of array elements
const std::string oldValuePath = currentValuePath;
int i = 0;
for (const int32_t& value : value)
{
const std::string currentValuePath = oldValuePath + "[" + std::to_string(i) + "]";
if (value < 100)
{
success = false;
msg << currentValuePath << ": must be greater than or equal to 100;";
}
i++;
}
}
}
if (hostnameIsSet())
{
const std::vector<std::string>& value = m_Hostname;
@@ -333,18 +360,21 @@ bool Detector::operator==(const Detector& rhs) const
((!sensorThicknessUmIsSet() && !rhs.sensorThicknessUmIsSet()) || (sensorThicknessUmIsSet() && rhs.sensorThicknessUmIsSet() && getSensorThicknessUm() == rhs.getSensorThicknessUm())) &&
((!readoutTimeUsIsSet() && !rhs.readoutTimeUsIsSet()) || (readoutTimeUsIsSet() && rhs.readoutTimeUsIsSet() && getReadoutTimeUs() == rhs.getReadoutTimeUs())) &&
((!readoutTimeNsIsSet() && !rhs.readoutTimeNsIsSet()) || (readoutTimeNsIsSet() && rhs.readoutTimeNsIsSet() && getReadoutTimeNs() == rhs.getReadoutTimeNs())) &&
((!minimumCountTimeUsIsSet() && !rhs.minimumCountTimeUsIsSet()) || (minimumCountTimeUsIsSet() && rhs.minimumCountTimeUsIsSet() && getMinimumCountTimeUs() == rhs.getMinimumCountTimeUs())) &&
((!minCountTimeNsIsSet() && !rhs.minCountTimeNsIsSet()) || (minCountTimeNsIsSet() && rhs.minCountTimeNsIsSet() && getMinCountTimeNs() == rhs.getMinCountTimeNs())) &&
((!minimumFrameTimeUsIsSet() && !rhs.minimumFrameTimeUsIsSet()) || (minimumFrameTimeUsIsSet() && rhs.minimumFrameTimeUsIsSet() && getMinimumFrameTimeUs() == rhs.getMinimumFrameTimeUs())) &&
((!minFrameTimeNsIsSet() && !rhs.minFrameTimeNsIsSet()) || (minFrameTimeNsIsSet() && rhs.minFrameTimeNsIsSet() && getMinFrameTimeNs() == rhs.getMinFrameTimeNs())) &&
((!calibrationFileIsSet() && !rhs.calibrationFileIsSet()) || (calibrationFileIsSet() && rhs.calibrationFileIsSet() && getCalibrationFile() == rhs.getCalibrationFile())) &&
((!trimEnergiesEVIsSet() && !rhs.trimEnergiesEVIsSet()) || (trimEnergiesEVIsSet() && rhs.trimEnergiesEVIsSet() && getTrimEnergiesEV() == rhs.getTrimEnergiesEV())) &&
((!hostnameIsSet() && !rhs.hostnameIsSet()) || (hostnameIsSet() && rhs.hostnameIsSet() && getHostname() == rhs.getHostname())) &&
@@ -398,14 +428,16 @@ void to_json(nlohmann::json& j, const Detector& o)
j["module_sync"] = o.m_Module_sync;
if(o.sensorThicknessUmIsSet())
j["sensor_thickness_um"] = o.m_Sensor_thickness_um;
if(o.readoutTimeUsIsSet())
j["readout_time_us"] = o.m_Readout_time_us;
if(o.minimumCountTimeUsIsSet())
j["minimum_count_time_us"] = o.m_Minimum_count_time_us;
if(o.minimumFrameTimeUsIsSet())
j["minimum_frame_time_us"] = o.m_Minimum_frame_time_us;
if(o.readoutTimeNsIsSet())
j["readout_time_ns"] = o.m_Readout_time_ns;
if(o.minCountTimeNsIsSet())
j["min_count_time_ns"] = o.m_Min_count_time_ns;
if(o.minFrameTimeNsIsSet())
j["min_frame_time_ns"] = o.m_Min_frame_time_ns;
if(o.calibrationFileIsSet() || !o.m_Calibration_file.empty())
j["calibration_file"] = o.m_Calibration_file;
if(o.trimEnergiesEVIsSet() || !o.m_Trim_energies_eV.empty())
j["trim_energies_eV"] = o.m_Trim_energies_eV;
if(o.hostnameIsSet() || !o.m_Hostname.empty())
j["hostname"] = o.m_Hostname;
if(o.sensorMaterialIsSet())
@@ -462,26 +494,31 @@ void from_json(const nlohmann::json& j, Detector& o)
j.at("sensor_thickness_um").get_to(o.m_Sensor_thickness_um);
o.m_Sensor_thickness_umIsSet = true;
}
if(j.find("readout_time_us") != j.end())
if(j.find("readout_time_ns") != j.end())
{
j.at("readout_time_us").get_to(o.m_Readout_time_us);
o.m_Readout_time_usIsSet = true;
j.at("readout_time_ns").get_to(o.m_Readout_time_ns);
o.m_Readout_time_nsIsSet = true;
}
if(j.find("minimum_count_time_us") != j.end())
if(j.find("min_count_time_ns") != j.end())
{
j.at("minimum_count_time_us").get_to(o.m_Minimum_count_time_us);
o.m_Minimum_count_time_usIsSet = true;
j.at("min_count_time_ns").get_to(o.m_Min_count_time_ns);
o.m_Min_count_time_nsIsSet = true;
}
if(j.find("minimum_frame_time_us") != j.end())
if(j.find("min_frame_time_ns") != j.end())
{
j.at("minimum_frame_time_us").get_to(o.m_Minimum_frame_time_us);
o.m_Minimum_frame_time_usIsSet = true;
j.at("min_frame_time_ns").get_to(o.m_Min_frame_time_ns);
o.m_Min_frame_time_nsIsSet = true;
}
if(j.find("calibration_file") != j.end())
{
j.at("calibration_file").get_to(o.m_Calibration_file);
o.m_Calibration_fileIsSet = true;
}
if(j.find("trim_energies_eV") != j.end())
{
j.at("trim_energies_eV").get_to(o.m_Trim_energies_eV);
o.m_Trim_energies_eVIsSet = true;
}
if(j.find("hostname") != j.end())
{
j.at("hostname").get_to(o.m_Hostname);
@@ -645,56 +682,56 @@ void Detector::unsetSensor_thickness_um()
{
m_Sensor_thickness_umIsSet = false;
}
int64_t Detector::getReadoutTimeUs() const
int64_t Detector::getReadoutTimeNs() const
{
return m_Readout_time_us;
return m_Readout_time_ns;
}
void Detector::setReadoutTimeUs(int64_t const value)
void Detector::setReadoutTimeNs(int64_t const value)
{
m_Readout_time_us = value;
m_Readout_time_usIsSet = true;
m_Readout_time_ns = value;
m_Readout_time_nsIsSet = true;
}
bool Detector::readoutTimeUsIsSet() const
bool Detector::readoutTimeNsIsSet() const
{
return m_Readout_time_usIsSet;
return m_Readout_time_nsIsSet;
}
void Detector::unsetReadout_time_us()
void Detector::unsetReadout_time_ns()
{
m_Readout_time_usIsSet = false;
m_Readout_time_nsIsSet = false;
}
int64_t Detector::getMinimumCountTimeUs() const
int64_t Detector::getMinCountTimeNs() const
{
return m_Minimum_count_time_us;
return m_Min_count_time_ns;
}
void Detector::setMinimumCountTimeUs(int64_t const value)
void Detector::setMinCountTimeNs(int64_t const value)
{
m_Minimum_count_time_us = value;
m_Minimum_count_time_usIsSet = true;
m_Min_count_time_ns = value;
m_Min_count_time_nsIsSet = true;
}
bool Detector::minimumCountTimeUsIsSet() const
bool Detector::minCountTimeNsIsSet() const
{
return m_Minimum_count_time_usIsSet;
return m_Min_count_time_nsIsSet;
}
void Detector::unsetMinimum_count_time_us()
void Detector::unsetMin_count_time_ns()
{
m_Minimum_count_time_usIsSet = false;
m_Min_count_time_nsIsSet = false;
}
int64_t Detector::getMinimumFrameTimeUs() const
int64_t Detector::getMinFrameTimeNs() const
{
return m_Minimum_frame_time_us;
return m_Min_frame_time_ns;
}
void Detector::setMinimumFrameTimeUs(int64_t const value)
void Detector::setMinFrameTimeNs(int64_t const value)
{
m_Minimum_frame_time_us = value;
m_Minimum_frame_time_usIsSet = true;
m_Min_frame_time_ns = value;
m_Min_frame_time_nsIsSet = true;
}
bool Detector::minimumFrameTimeUsIsSet() const
bool Detector::minFrameTimeNsIsSet() const
{
return m_Minimum_frame_time_usIsSet;
return m_Min_frame_time_nsIsSet;
}
void Detector::unsetMinimum_frame_time_us()
void Detector::unsetMin_frame_time_ns()
{
m_Minimum_frame_time_usIsSet = false;
m_Min_frame_time_nsIsSet = false;
}
std::vector<std::string> Detector::getCalibrationFile() const
{
@@ -713,6 +750,23 @@ void Detector::unsetCalibration_file()
{
m_Calibration_fileIsSet = false;
}
std::vector<int32_t> Detector::getTrimEnergiesEV() const
{
return m_Trim_energies_eV;
}
void Detector::setTrimEnergiesEV(std::vector<int32_t> const value)
{
m_Trim_energies_eV = value;
m_Trim_energies_eVIsSet = true;
}
bool Detector::trimEnergiesEVIsSet() const
{
return m_Trim_energies_eVIsSet;
}
void Detector::unsetTrim_energies_eV()
{
m_Trim_energies_eVIsSet = false;
}
std::vector<std::string> Detector::getHostname() const
{
return m_Hostname;
+29 -20
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -111,26 +111,26 @@ public:
bool sensorThicknessUmIsSet() const;
void unsetSensor_thickness_um();
/// <summary>
/// Minimum difference between frame time and count time in microseconds Defaults are 3 us for EIGER and 20 us for JUNGFRAU
/// Minimum difference between frame time and count time in microseconds Defaults are 3&#39;000 ns for EIGER and 20&#39;000 ns for JUNGFRAU
/// </summary>
int64_t getReadoutTimeUs() const;
void setReadoutTimeUs(int64_t const value);
bool readoutTimeUsIsSet() const;
void unsetReadout_time_us();
int64_t getReadoutTimeNs() const;
void setReadoutTimeNs(int64_t const value);
bool readoutTimeNsIsSet() const;
void unsetReadout_time_ns();
/// <summary>
/// Minimum count time available for the detector.
/// </summary>
int64_t getMinimumCountTimeUs() const;
void setMinimumCountTimeUs(int64_t const value);
bool minimumCountTimeUsIsSet() const;
void unsetMinimum_count_time_us();
int64_t getMinCountTimeNs() const;
void setMinCountTimeNs(int64_t const value);
bool minCountTimeNsIsSet() const;
void unsetMin_count_time_ns();
/// <summary>
/// Minimum frame time available for the detector.
/// </summary>
int64_t getMinimumFrameTimeUs() const;
void setMinimumFrameTimeUs(int64_t const value);
bool minimumFrameTimeUsIsSet() const;
void unsetMinimum_frame_time_us();
int64_t getMinFrameTimeNs() const;
void setMinFrameTimeNs(int64_t const value);
bool minFrameTimeNsIsSet() const;
void unsetMin_frame_time_ns();
/// <summary>
/// Can be empty for all detectors - default calibration used. For JUNGFRAU: list of gain files, one entry per module. For EIGER: one directory (with detector settings) or list of trim bit files, one entry per half-module.
/// </summary>
@@ -139,6 +139,13 @@ public:
bool calibrationFileIsSet() const;
void unsetCalibration_file();
/// <summary>
/// List of energies at which trimming calibration is provided. Only needed for PSI EIGER and compulsory in this case
/// </summary>
std::vector<int32_t> getTrimEnergiesEV() const;
void setTrimEnergiesEV(std::vector<int32_t> const value);
bool trimEnergiesEVIsSet() const;
void unsetTrim_energies_eV();
/// <summary>
/// Hostname for detector module. One entry per module One entry per module. Either empty or number of module entries.
/// </summary>
std::vector<std::string> getHostname() const;
@@ -226,14 +233,16 @@ protected:
bool m_Module_syncIsSet;
float m_Sensor_thickness_um;
bool m_Sensor_thickness_umIsSet;
int64_t m_Readout_time_us;
bool m_Readout_time_usIsSet;
int64_t m_Minimum_count_time_us;
bool m_Minimum_count_time_usIsSet;
int64_t m_Minimum_frame_time_us;
bool m_Minimum_frame_time_usIsSet;
int64_t m_Readout_time_ns;
bool m_Readout_time_nsIsSet;
int64_t m_Min_count_time_ns;
bool m_Min_count_time_nsIsSet;
int64_t m_Min_frame_time_ns;
bool m_Min_frame_time_nsIsSet;
std::vector<std::string> m_Calibration_file;
bool m_Calibration_fileIsSet;
std::vector<int32_t> m_Trim_energies_eV;
bool m_Trim_energies_eVIsSet;
std::vector<std::string> m_Hostname;
bool m_HostnameIsSet;
std::string m_Sensor_material;
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+25 -25
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -31,9 +31,9 @@ Detector_list_element::Detector_list_element()
m_Height = 0L;
m_Pixel_size_mm = 0.0f;
m_Pixel_size_mmIsSet = false;
m_Readout_time_us = 0L;
m_Min_frame_time_us = 0L;
m_Min_count_time_us = 0L;
m_Readout_time_ns = 0L;
m_Min_frame_time_ns = 0L;
m_Min_count_time_ns = 0L;
m_TypeIsSet = false;
}
@@ -107,13 +107,13 @@ bool Detector_list_element::operator==(const Detector_list_element& rhs) const
((!pixelSizeMmIsSet() && !rhs.pixelSizeMmIsSet()) || (pixelSizeMmIsSet() && rhs.pixelSizeMmIsSet() && getPixelSizeMm() == rhs.getPixelSizeMm())) &&
(getReadoutTimeUs() == rhs.getReadoutTimeUs())
(getReadoutTimeNs() == rhs.getReadoutTimeNs())
&&
(getMinFrameTimeUs() == rhs.getMinFrameTimeUs())
(getMinFrameTimeNs() == rhs.getMinFrameTimeNs())
&&
(getMinCountTimeUs() == rhs.getMinCountTimeUs())
(getMinCountTimeNs() == rhs.getMinCountTimeNs())
&&
@@ -140,9 +140,9 @@ void to_json(nlohmann::json& j, const Detector_list_element& o)
j["height"] = o.m_Height;
if(o.pixelSizeMmIsSet())
j["pixel_size_mm"] = o.m_Pixel_size_mm;
j["readout_time_us"] = o.m_Readout_time_us;
j["min_frame_time_us"] = o.m_Min_frame_time_us;
j["min_count_time_us"] = o.m_Min_count_time_us;
j["readout_time_ns"] = o.m_Readout_time_ns;
j["min_frame_time_ns"] = o.m_Min_frame_time_ns;
j["min_count_time_ns"] = o.m_Min_count_time_ns;
if(o.typeIsSet())
j["type"] = o.m_Type;
@@ -163,9 +163,9 @@ void from_json(const nlohmann::json& j, Detector_list_element& o)
j.at("pixel_size_mm").get_to(o.m_Pixel_size_mm);
o.m_Pixel_size_mmIsSet = true;
}
j.at("readout_time_us").get_to(o.m_Readout_time_us);
j.at("min_frame_time_us").get_to(o.m_Min_frame_time_us);
j.at("min_count_time_us").get_to(o.m_Min_count_time_us);
j.at("readout_time_ns").get_to(o.m_Readout_time_ns);
j.at("min_frame_time_ns").get_to(o.m_Min_frame_time_ns);
j.at("min_count_time_ns").get_to(o.m_Min_count_time_ns);
if(j.find("type") != j.end())
{
j.at("type").get_to(o.m_Type);
@@ -255,29 +255,29 @@ void Detector_list_element::unsetPixel_size_mm()
{
m_Pixel_size_mmIsSet = false;
}
int64_t Detector_list_element::getReadoutTimeUs() const
int64_t Detector_list_element::getReadoutTimeNs() const
{
return m_Readout_time_us;
return m_Readout_time_ns;
}
void Detector_list_element::setReadoutTimeUs(int64_t const value)
void Detector_list_element::setReadoutTimeNs(int64_t const value)
{
m_Readout_time_us = value;
m_Readout_time_ns = value;
}
int64_t Detector_list_element::getMinFrameTimeUs() const
int64_t Detector_list_element::getMinFrameTimeNs() const
{
return m_Min_frame_time_us;
return m_Min_frame_time_ns;
}
void Detector_list_element::setMinFrameTimeUs(int64_t const value)
void Detector_list_element::setMinFrameTimeNs(int64_t const value)
{
m_Min_frame_time_us = value;
m_Min_frame_time_ns = value;
}
int64_t Detector_list_element::getMinCountTimeUs() const
int64_t Detector_list_element::getMinCountTimeNs() const
{
return m_Min_count_time_us;
return m_Min_count_time_ns;
}
void Detector_list_element::setMinCountTimeUs(int64_t const value)
void Detector_list_element::setMinCountTimeNs(int64_t const value)
{
m_Min_count_time_us = value;
m_Min_count_time_ns = value;
}
org::openapitools::server::model::Detector_type Detector_list_element::getType() const
{
+10 -10
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -109,18 +109,18 @@ public:
/// <summary>
///
/// </summary>
int64_t getReadoutTimeUs() const;
void setReadoutTimeUs(int64_t const value);
int64_t getReadoutTimeNs() const;
void setReadoutTimeNs(int64_t const value);
/// <summary>
///
/// </summary>
int64_t getMinFrameTimeUs() const;
void setMinFrameTimeUs(int64_t const value);
int64_t getMinFrameTimeNs() const;
void setMinFrameTimeNs(int64_t const value);
/// <summary>
///
/// </summary>
int64_t getMinCountTimeUs() const;
void setMinCountTimeUs(int64_t const value);
int64_t getMinCountTimeNs() const;
void setMinCountTimeNs(int64_t const value);
/// <summary>
///
/// </summary>
@@ -150,11 +150,11 @@ protected:
float m_Pixel_size_mm;
bool m_Pixel_size_mmIsSet;
int64_t m_Readout_time_us;
int64_t m_Readout_time_ns;
int64_t m_Min_frame_time_us;
int64_t m_Min_frame_time_ns;
int64_t m_Min_count_time_us;
int64_t m_Min_count_time_ns;
org::openapitools::server::model::Detector_type m_Type;
bool m_TypeIsSet;
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -78,6 +78,9 @@ void to_json(nlohmann::json& j, const Geom_refinement_algorithm& o)
case Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER:
j = "BeamCenter";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY:
j = "OrientationOnly";
break;
case Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE:
j = "None";
break;
@@ -91,6 +94,9 @@ void from_json(const nlohmann::json& j, Geom_refinement_algorithm& o)
if (s == "BeamCenter") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::BEAMCENTER);
}
else if (s == "OrientationOnly") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::ORIENTATIONONLY);
}
else if (s == "None") {
o.setValue(Geom_refinement_algorithm::eGeom_refinement_algorithm::NONE);
} else {
+4 -3
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -12,7 +12,7 @@
/*
* Geom_refinement_algorithm.h
*
* Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center.
* Selection of an post-indexing least-square diffraction geometry refinement algorithm used by Jungfraujoch. BeamCenter - This option is refining both beam center and lattice (restricted to a chosen/detected Bravais lattice). OrientationOnly - This option is refining only orientation of the lattice.
*/
#ifndef Geom_refinement_algorithm_H_
@@ -25,7 +25,7 @@ namespace org::openapitools::server::model
{
/// <summary>
/// Selection of an post-indexing detector geometry refinement algorithm used by Jungfraujoch. This option is using non-linear least squares optimization to find unit cell and beam center.
/// Selection of an post-indexing least-square diffraction geometry refinement algorithm used by Jungfraujoch. BeamCenter - This option is refining both beam center and lattice (restricted to a chosen/detected Bravais lattice). OrientationOnly - This option is refining only orientation of the lattice.
/// </summary>
class Geom_refinement_algorithm
{
@@ -39,6 +39,7 @@ public:
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
BEAMCENTER,
ORIENTATIONONLY,
NONE
};
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+1 -1
View File
@@ -2,7 +2,7 @@
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.137
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+122
View File
@@ -0,0 +1,122 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Integration_model.h"
#include "Helpers.h"
#include <stdexcept>
#include <sstream>
namespace org::openapitools::server::model
{
Integration_model::Integration_model()
{
}
void Integration_model::validate() const
{
std::stringstream msg;
if (!validate(msg))
{
throw org::openapitools::server::helpers::ValidationException(msg.str());
}
}
bool Integration_model::validate(std::stringstream& msg) const
{
return validate(msg, "");
}
bool Integration_model::validate(std::stringstream& msg, const std::string& pathPrefix) const
{
bool success = true;
const std::string _pathPrefix = pathPrefix.empty() ? "Integration_model" : pathPrefix;
if (m_value == Integration_model::eIntegration_model::INVALID_VALUE_OPENAPI_GENERATED)
{
success = false;
msg << _pathPrefix << ": has no value;";
}
return success;
}
bool Integration_model::operator==(const Integration_model& rhs) const
{
return
getValue() == rhs.getValue()
;
}
bool Integration_model::operator!=(const Integration_model& rhs) const
{
return !(*this == rhs);
}
void to_json(nlohmann::json& j, const Integration_model& o)
{
j = nlohmann::json::object();
switch (o.getValue())
{
case Integration_model::eIntegration_model::INVALID_VALUE_OPENAPI_GENERATED:
j = "INVALID_VALUE_OPENAPI_GENERATED";
break;
case Integration_model::eIntegration_model::PROFILEGAUSSIAN:
j = "ProfileGaussian";
break;
case Integration_model::eIntegration_model::PROFILEEMPIRICAL:
j = "ProfileEmpirical";
break;
case Integration_model::eIntegration_model::BOXSUM:
j = "BoxSum";
break;
}
}
void from_json(const nlohmann::json& j, Integration_model& o)
{
auto s = j.get<std::string>();
if (s == "ProfileGaussian") {
o.setValue(Integration_model::eIntegration_model::PROFILEGAUSSIAN);
}
else if (s == "ProfileEmpirical") {
o.setValue(Integration_model::eIntegration_model::PROFILEEMPIRICAL);
}
else if (s == "BoxSum") {
o.setValue(Integration_model::eIntegration_model::BOXSUM);
} else {
std::stringstream ss;
ss << "Unexpected value " << s << " in json"
<< " cannot be converted to enum of type"
<< " Integration_model::eIntegration_model";
throw std::invalid_argument(ss.str());
}
}
Integration_model::eIntegration_model Integration_model::getValue() const
{
return m_value;
}
void Integration_model::setValue(Integration_model::eIntegration_model value)
{
m_value = value;
}
} // namespace org::openapitools::server::model
+80
View File
@@ -0,0 +1,80 @@
/**
* Jungfraujoch
* API to control Jungfraujoch developed by the Paul Scherrer Institute (Switzerland). Jungfraujoch is a data acquisition and analysis system for pixel array detectors, primarly PSI JUNGFRAU. Jungfraujoch uses FPGA boards to acquire data at high data rates. # License Clarification While this API definition is licensed under GPL-3.0, **the GPL copyleft provisions do not apply** when this file is used solely to generate OpenAPI clients or when implementing applications that interact with the API. Generated client code and applications using this API definition are not subject to the GPL license requirements and may be distributed under terms of your choosing. This exception is similar in spirit to the Linux Kernel's approach to userspace API headers and the GCC Runtime Library Exception. The Linux Kernel developers have explicitly stated that user programs that merely use the kernel interfaces (syscalls, ioctl definitions, etc.) are not derivative works of the kernel and are not subject to the terms of the GPL. This exception is intended to allow wider use of this API specification without imposing GPL requirements on applications that merely interact with the API, regardless of whether they communicate through network calls or other mechanisms.
*
* The version of the OpenAPI document: 1.0.0-rc.156
* Contact: filip.leonarski@psi.ch
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Integration_model.h
*
* Bragg spot integration model. ProfileGaussian - profile fit with a measured-width Gaussian (Kabsch-style), the default; more accurate intensities than box summation. ProfileEmpirical - profile fit with a per-resolution-shell empirical profile learned from strong spots. BoxSum - classical uniform box summation minus a ring-mean background; the simpler, faster fallback.
*/
#ifndef Integration_model_H_
#define Integration_model_H_
#include <nlohmann/json.hpp>
namespace org::openapitools::server::model
{
/// <summary>
/// Bragg spot integration model. ProfileGaussian - profile fit with a measured-width Gaussian (Kabsch-style), the default; more accurate intensities than box summation. ProfileEmpirical - profile fit with a per-resolution-shell empirical profile learned from strong spots. BoxSum - classical uniform box summation minus a ring-mean background; the simpler, faster fallback.
/// </summary>
class Integration_model
{
public:
Integration_model();
virtual ~Integration_model() = default;
enum class eIntegration_model {
// To have a valid default value.
// Avoiding name clashes with user defined
// enum values
INVALID_VALUE_OPENAPI_GENERATED = 0,
PROFILEGAUSSIAN,
PROFILEEMPIRICAL,
BOXSUM
};
/// <summary>
/// Validate the current data in the model. Throws a ValidationException on failure.
/// </summary>
void validate() const;
/// <summary>
/// Validate the current data in the model. Returns false on error and writes an error
/// message into the given stringstream.
/// </summary>
bool validate(std::stringstream& msg) const;
/// <summary>
/// Helper overload for validate. Used when one model stores another model and calls it's validate.
/// Not meant to be called outside that case.
/// </summary>
bool validate(std::stringstream& msg, const std::string& pathPrefix) const;
bool operator==(const Integration_model& rhs) const;
bool operator!=(const Integration_model& rhs) const;
/////////////////////////////////////////////
/// Integration_model members
Integration_model::eIntegration_model getValue() const;
void setValue(Integration_model::eIntegration_model value);
friend void to_json(nlohmann::json& j, const Integration_model& o);
friend void from_json(const nlohmann::json& j, Integration_model& o);
protected:
Integration_model::eIntegration_model m_value = Integration_model::eIntegration_model::INVALID_VALUE_OPENAPI_GENERATED;
};
} // namespace org::openapitools::server::model
#endif /* Integration_model_H_ */

Some files were not shown because too many files have changed in this diff Show More