v1.0.0-rc.153 #63
Reference in New Issue
Block a user
Delete Branch "2606-pixel-refine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
Replace the unmaintained openapi-typescript-codegen generator with @hey-api/openapi-ts. - openapi-ts.config.ts generates src/client from ../broker/jfjoch_api.yaml (client-fetch + typescript + sdk plugins; enums as const objects via mode: 'javascript', type names preserved) - npm "openapi" script now runs openapi-ts; drop openapi-typescript-codegen - migrate all imports from src/openapi to src/client - DefaultService.foo() -> standalone foo({ body|query, throwOnError }) - OpenAPI.BASE='' -> client.setConfig({ baseUrl: '' }); ButtonWithSnackbar uses the relative path directly - adapt hey-api's inlined enums: broker_status.state/message_severity and bit_depth_image/eiger_bit_depth become string/number literal unions; file_writer_format NXMX_* -> N_XMX_* - remove generated src/openapi Build (tsc + vite) passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Replace all class components with function components and move server-state polling to @tanstack/react-query. - add @tanstack/react-query; generate query helpers via the hey-api @tanstack/react-query plugin (src/client/@tanstack) - QueryClientProvider + one-time client.setConfig({ baseUrl: '' }) in index.tsx - App polls statistics with useQuery(getStatisticsOptions, refetchInterval), DataProcessingPlot uses getPreviewPlotOptions; manual setInterval polling gone - memo() on presentational children; with TanStack structural sharing this re-renders a child only when its own statistics slice changes - PreviewImage stays imperative (binary JPEG -> object URL) using useEffect + a ref for the object-URL lifecycle - fix AzIntSettings correction checkboxes that mutated state in place (relied on the poll re-render); they now use setState - drop dead code uncovered during the port (unused upload/deactivate handlers and imports in ImageFormatSettings, DetectorSettings, ROI) Build (tsc + vite) passes; dev server transforms all entry modules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Address portability issues found building jfjoch_viewer with MSVC: - common/{ADUHistogram,AzimuthalIntegrationProfile}.h and image_analysis/spot_finding/StrongPixelSet.h only need DeviceOutput, so include fpga/pcie_driver/jfjoch_fpga.h (plain-C, self-contained) directly instead of acquisition_device/AcquisitionDevice.h, which dragged <unistd.h> into the viewer tree. - common/time_utc.h: guard gmtime_r/timegm/localtime_r with the MSVC equivalents (gmtime_s/_mkgmtime/localtime_s) under _WIN32; drop the duplicated includes and add the headers used directly. - gemmi_gph/gemmi/utf.hpp: vendor the upstream gemmi header; fileutil.hpp includes it on Windows for UTF8_to_wchar but it was never vendored. - writer/HDF5Objects.cpp: ExtractFilename returns path.filename().string() (std::filesystem::path has no implicit conversion to std::string on Windows, where it is wchar_t-based). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Two spots used POSIX-only path logic that breaks on Windows: - dataset_name() located the basename with rfind('/'), which misses backslash separators, so a C:\...\foo_master.h5 file prefix kept the whole directory. Use std::filesystem::path::filename() instead. - Legacy-format data-file resolution joined paths with fmt::format("{}/{}", ...), producing mixed \/ separators and prepending the master directory even to absolute link targets. Reuse the existing ResolveRelativeToMaster() helper, which joins via std::filesystem and leaves absolute targets untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>- CUDA: append sm_121 (Blackwell GB10 / DGX Spark) to CMAKE_CUDA_ARCHITECTURES when nvcc >= 12.9 knows it. The static list tops out at sm_120 and embeds no PTX, so without this a build would fail to launch on Spark ("no kernel image available"); guarded so CUDA 12.8 (which predates sm_121) is unaffected. - FFTW: enable NEON codelets on aarch64 (Grace), mirroring the x86 SSE2/AVX/AVX2 branch, so single-precision FFT is SIMD-accelerated instead of scalar on ARM. Both are inert on x86 / CUDA 12.8; verified configure still succeeds there. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>cuFFT is the only CUDA component linked dynamically (cudart and the fast-feedback indexer are static), so the prior Windows installer would fail to launch the GPU path on a host without a CUDA toolkit. Ship cufft64_*.dll next to the viewer (CUDA 13 keeps it in bin/x64, earlier toolkits in bin); the DLL is self-contained, so the installed app needs only an NVIDIA driver. Tag the variant where it matters and nowhere else: the installer filename (-cuda<major> / -cpu) and the Add/Remove Programs entry ("Jungfraujoch (CUDA)" / "(CPU)") advertise it, while the install folder and Start Menu group stay plain "Jungfraujoch" -- the CUDA build is a strict superset, so the two variants share a location and replace each other. Docs: SOFTWARE.md + JFJOCH_VIEWER.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Complete the image/metadata decoupling. JFJochHDF5Reader is now a thin JFJochReader facade composing one shared HDF5ImageSource (raw pixels) with a name->HDF5MetadataSource map and an active selection ("snapshots"). - HDF5MetadataSource owns one master file: dataset-level parse (Open, ex-ReadFile), per-image metadata (FillPerImage, ex-LoadImage_i), ReadSpots/ReadReflections/ ReadCalibration, and the master-first helpers. It locates per-image metadata either via the shared image source (original file: metadata co-located with pixels) or in its own master at the global index (integrated _process.h5 snapshot) - so switching snapshots never reloads pixels. - Facade adds RegisterSnapshot/SetActiveSnapshot/SnapshotNames/ActiveSnapshot; ReadFile registers the original as "Original". All existing JFJochReader callers are unchanged. - The global hdf5_mutex is taken once in the facade; the sources assume it is held. Adds JFJochReader_Snapshots test (original _master.h5 + a reprocessing _process.h5 over the same images: pixels stay from the original, metadata follows the active snapshot). Verified: tests/jfjoch_test [HDF5] (80 cases / 1810 assertions), plus jfjoch_process/ azint/extract_hkl/scale and jfjoch_viewer all build against the refactored reader. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>The full processing workflow no longer lives in the CLIs. New process/JFJochProcess encapsulates it for jfjoch_process, jfjoch_azint and (later) the viewer: - ProcessMode {AzimuthalIntegration, FullAnalysis}; ProcessConfig carries run control (range, threads, output prefix, spot finding, rotation + scaling options, reference data) while the DiffractionExperiment carries all algorithm settings. - Run() executes setup -> optional two-pass rotation pre-pass -> parallel per-image loop (std::thread) -> optional scaling/merging post-pass -> NXmxIntegrated _process.h5 that links back to the original images. ProcessResult returns stats + merge text. - Cancel() / std::atomic<bool> (receiver style), checked between images; the CLIs install a SIGINT handler that calls it (fixes the previous Ctrl+C gap), the viewer will use the same hook. JFJochProcessObserver streams progress / per-image results for a live GUI. jfjoch_process.cpp and jfjoch_azint.cpp are now thin: argument parsing + experiment configuration, then JFJochProcess::Run + stats printing. Behaviour and usage messages are unchanged. Adds JFJochProcessTest (azimuthal integration round-trip, no-output run, pre-cancel) over a small generated dataset. Verified: tests/jfjoch_test [HDF5] (83 cases / 1854 assertions); jfjoch_azint and jfjoch_process run end-to-end on lyso_test (azint 20 images; full analysis recovers the lysozyme cell at 25% indexing). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>- The Indexing tab now shows what the selected algorithm resolves to on this machine/dataset ("Effective on this system: ..."), mirroring DiffractionExperiment::GetIndexingAlgorithm() so Auto is no longer ambiguous (GPU present? unit cell known?). Cell-known state is forwarded from the loaded dataset via JFJochSettingsWindow::datasetLoaded. - FFBIDX and FFT (GPU) radio options are disabled on builds without CUDA, where only the FFTW CPU indexer exists. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Replace the ambiguous "Images" count with explicit "Start image" and "End image" spinboxes (end 0 = to the last image). buildConfig sets config.start_image / end_image; the table shows the range ("start-end" / "all") and the progress bar expects end-start images. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Build jfjoch_hdf5_test once in a new build-hdf5-test job and hand the binary to dials-test as an artifact, instead of recompiling it from scratch in every rocky9 processing job. Uses the christopherhx gitea-{upload,download}-artifact fork (mirrored under gitea.psi.ch/actions) to avoid the stock v4 action's GHESNotSupportedError. Probe scope: dials-test only; xds-* still self-build until the round-trip is confirmed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>- Fusion fills QGroupBox interiors with a flat light colour, so the settings window lost its salmon look. A tiny app stylesheet (QGroupBox { background: transparent }) makes them show the salmon window background again; entry widgets stay white via the palette. - The dataset-info chart now fixes the x-axis to the whole dataset [0, n) (the largest run = the original file), so a subset run is drawn at its real image positions instead of being stretched to fill the plot. Subsets with binning bin by ordinal and place each point at its mapped image number (correct for the common contiguous sub-range). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>Eigen is an external find_package(Eigen3 3.4) dependency. Eigen's same-major-version rule means a bare 3.4 request only accepts 3.x, so 5.x cannot be used without changing every requester (jfjoch, Ceres, and the upstream ffbidx). Standardise on Eigen 3.4.x: - docs: correct the Windows Eigen install recipe to 3.4.0 and note the same-major constraint; SOFTWARE.md now says 3.4.x (not "3.4 or newer"). - docker/{rocky8,rocky9,ubuntu2204,ubuntu2404}: actually install Eigen 3.4.0 from source to /opt/eigen-3.4 (header-only) and add it to CMAKE_PREFIX_PATH. The images previously installed no Eigen at all, relying on the obsolete "CMake fetches it" assumption; a rebuild would have failed at configure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>