Build Packages / build:rpm (rocky9_sls9) (push) Successful in 18m57s
Build Packages / Unit tests (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 16m55s
Build Packages / build:windows:cuda (push) Successful in 18m48s
Build Packages / build:viewer-tgz:cpu (push) Successful in 13m10s
Build Packages / build:viewer-tgz:cuda (push) Successful in 14m45s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 22m23s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 20m12s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 23m7s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 20m43s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 23m9s
Build Packages / XDS test (durin plugin) (push) Successful in 12m26s
Build Packages / build:rpm (rocky9) (push) Successful in 24m58s
Build Packages / Generate python client (push) Successful in 50s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 23m20s
Build Packages / Create release (push) Skipped
Build Packages / XDS test (JFJoch plugin) (push) Successful in 12m37s
Build Packages / build:rpm (rocky8) (push) Successful in 27m58s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 25m38s
Build Packages / Build documentation (push) Successful in 59s
Build Packages / DIALS test (push) Successful in 23m16s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m38s
**Files written by Jungfraujoch now import correctly in DIALS, XDS and pyFAI.** A tilted detector, a grid scan, a still recorded at a goniometer position, and saturated or unreadable pixels were each described in a way that a third-party program acted on wrongly. If you process Jungfraujoch data outside Jungfraujoch, prefer this release to any earlier one. * HDF5: the detector tilt (`rot1`/`rot2`/`rot3`) is exported correctly in the NXmx transformation chain; untilted geometries are unaffected. * HDF5: a still recorded at a goniometer position is no longer read back as a single image, and a grid scan records a stationary spindle so a program that requires a rotation axis can open it. * HDF5: the sample transformation chain is written in mounting order, with a Smargon head position told apart from the spindle, one entry per image, `module_offset` as a float unit vector, and `offset_units` on every offset. * HDF5: saturated, underloaded and unreadable pixels are described so a downstream program masks them - `saturation_value`, `underload_value`, `error_value` and `bit_depth_readout` are written correctly, and a data file missing next to a VDS master reads as the error marker rather than as zero counts. * HDF5: the rotation axis is read back under whatever name it carries, and `mirror_y` records whether the assembled image is mirrored in Y relative to the detector's raw readout. * A grid scan and a goniometer axis can both be set; they are no longer alternatives. * `images_per_file` is chosen from the acquisition when it is not given: a rotation sweep of at most 20000 images goes into a single data file, a grid scan splits on whole fast-axis rows, and stills and serial keep 1000. * The writer refuses a stream whose start message declares a different pixel format than its images carry, and a DECTRIS detector sending signed images is no longer declared unsigned. * The image stream can carry the sample transformation chain (`transformations`, in the END message); a producer that does not send it gets the same chain built by the writer. * rugnux: fixing the space group with `-S` no longer prevents the lattice from being found - a lattice indexed in a different setting is reindexed into that group's own setting, and a run whose crystal does not have that group's lattice stops and names the cell it indexed as, rather than reporting statistics that cannot describe it. * rugnux: the per-image resolution estimate now predicts the resolution the merged data reach rather than the highest-resolution spot found, and is reported as `SPOT_RESOLUTION_ESTIMATE`. * rugnux: two runs of the same command on the same images produce the same merged intensities; the azimuthal profile written alongside them is not yet reproducible in the same way. * rugnux: the offline lattice refinement is bounded by iterations rather than by a wall clock, so a loaded machine can no longer refine to a different lattice; a live acquisition keeps its real-time bound. * rugnux: the detector-frame modulation correction is fitted on a grid spanning the detector, so whether it is applied no longer depends on how far integration reached. * rugnux: the geometry pre-pass no longer writes `<prefix>_01.mtz`, `_01.cif`, `_01.hkl` and `_01_image.dat`; the refined second pass writes those files under `<prefix>`, and that is the result to use. * rugnux: `_process.h5` describes the pixel format of the images it links to, and is written on a thread of its own. * rugnux: the detector geometry is also logged in XDS's convention (`ORGX`/`ORGY`, detector axis vectors, rotation axis), so it can be compared with an XDS refinement. * rugnux: an image integrated in pyFAI through the `.poni` file written by `--mode calibration` comes out with the correct azimuth, and the file declares pyFAI's `orientation`, which needs pyFAI 2024.01 or newer. Radial integration is unchanged. * rugnux: a rotation run is substantially faster throughout - beam-stop detection, first-pass indexing, geometry refinement, integration, scaling and merging - and observations outside the scaling resolution range are dropped as they are ingested. The refined geometry, the space group chosen and the merged statistics are unchanged. * Faster spot finding and indexing, on the broker as well as in rugnux; the spots found and the lattices indexed are unchanged. * A run reserves substantially less GPU memory: nothing is allocated for buffers that are never read, and a worker builds only the engines it uses. * rugnux: with `-N` left at its default the per-image loop of `--mode mx` uses at most 16 workers per GPU, rather than one per hardware thread; an explicit `-N` is obeyed as given. * CUDA 12 builds now contain device code for Volta, so the RHEL 8 packages and the portable Linux `.tgz` run on a V100; the CUDA 13 artefacts (RHEL 9, Ubuntu, Windows) remain Turing and newer. * The build resolves a single Eigen for the whole project, and refuses to configure if Ceres picks up a different one; a build that mixed two Eigen versions was undefined behaviour and crashed at -O2. * Documentation: a security page, and the supported GPU generations and minimum NVIDIA driver version of every released artefact. **Breaking change to OpenAPI** - regenerate the client (`jfjoch-client` 1.0.0-rc.162, `frontend/src/client`): * `dataset_settings.images_per_file` is no longer `default: 1000` and no longer accepts `0`; it is optional, and its minimum is 1. A client sending `0` (previously "one file for the whole run") is now rejected - omit the field instead, which for a rotation sweep gives the same single file. * `file_writer_format` now defaults to `NXmxVDS`, matching the server's own default and the layout recommended for DIALS, XDS and CrystFEL. A generated client that fills in schema defaults and does not set the format explicitly will write VDS masters where it previously wrote legacy ones; set `NXmxLegacy` explicitly to keep them. --------- Co-authored-by: jungfrau <jungfrau@mx-aare-test.psi.ch> Reviewed-on: #72 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
451 lines
18 KiB
C++
451 lines
18 KiB
C++
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
// SPDX-License-Identifier: GPL-3.0-only
|
|
|
|
#pragma once
|
|
|
|
#include <chrono>
|
|
#include <exception>
|
|
#include <optional>
|
|
|
|
#include "../compression/CompressionAlgorithmEnum.h"
|
|
|
|
#include "UnitCell.h"
|
|
#include "Coord.h"
|
|
#include "Definitions.h"
|
|
#include "JFJochMessages.h"
|
|
#include "DetectorSetup.h"
|
|
#include "../image_analysis/spot_finding/SpotFindingSettings.h"
|
|
#include "DatasetSettings.h"
|
|
#include "ROIMap.h"
|
|
|
|
// Jungfraujoch's saturation limit is EXCLUSIVE: it is the first value that is no longer a real
|
|
// count. A saturated pixel is set to the type maximum, which IS that limit when no detector cutoff
|
|
// is configured, so the highest value that is still a measurement is one below it.
|
|
// NXmx saturation_value is the opposite convention - the highest value that IS valid - and the XDS
|
|
// OVERLOAD parameter and the DIALS trusted_range read it the same way, inclusively. So the two are
|
|
// exactly one apart. Convert with these both ways round: the pair had drifted apart, the write side
|
|
// subtracting one and the read side not adding it back, which cost a count on every
|
|
// write-read-write cycle and compounded without bound.
|
|
constexpr int64_t SaturationValueFromLimit(int64_t limit) { return limit - 1; }
|
|
constexpr int64_t SaturationLimitFromValue(int64_t saturation_value) { return saturation_value + 1; }
|
|
#include "InstrumentMetadata.h"
|
|
#include "ImageFormatSettings.h"
|
|
#include "DetectorSettings.h"
|
|
#include "AzimuthalIntegrationSettings.h"
|
|
#include "FileWriterSettings.h"
|
|
#include "DiffractionGeometry.h"
|
|
#include "CompressedImage.h"
|
|
#include "IndexingSettings.h"
|
|
#include "BraggIntegrationSettings.h"
|
|
#include "ScalingSettings.h"
|
|
|
|
#include <gemmi/symmetry.hpp>
|
|
|
|
enum class DetectorMode {
|
|
Standard, PedestalG0, PedestalG1, PedestalG2, DarkMask
|
|
};
|
|
|
|
struct AcquisitionDeviceNetConfig {
|
|
std::string mac_addr;
|
|
std::string ipv4_addr;
|
|
uint64_t udp_port;
|
|
};
|
|
|
|
struct DetectorModuleConfig {
|
|
uint64_t udp_dest_port_1;
|
|
uint64_t udp_dest_port_2;
|
|
std::string ipv4_src_addr_1;
|
|
std::string ipv4_src_addr_2;
|
|
std::string ipv4_dest_addr_1;
|
|
std::string ipv4_dest_addr_2;
|
|
std::string mac_addr_dest_1;
|
|
std::string mac_addr_dest_2;
|
|
uint32_t module_id_in_data_stream;
|
|
uint32_t data_stream;
|
|
};
|
|
|
|
class DiffractionExperiment {
|
|
|
|
int64_t ndatastreams;
|
|
|
|
std::optional<std::chrono::microseconds> zmq_preview_period = std::chrono::seconds(1);
|
|
|
|
DetectorMode mode;
|
|
|
|
uint64_t series_id;
|
|
|
|
// Dataset settings
|
|
DatasetSettings dataset;
|
|
InstrumentMetadata instrument;
|
|
ImageFormatSettings image_format_settings;
|
|
DetectorSettings detector_settings;
|
|
AzimuthalIntegrationSettings az_integration_settings;
|
|
DetectorSetup detector;
|
|
FileWriterSettings file_writer;
|
|
IndexingSettings indexing;
|
|
BraggIntegrationSettings bragg_integration_settings;
|
|
ScalingSettings scaling_settings;
|
|
|
|
DarkMaskSettings dark_mask_settings;
|
|
|
|
ROIMap roi_mask;
|
|
int64_t summation;
|
|
bool cpu_summation;
|
|
|
|
std::string detector_update_zmq_addr;
|
|
public:
|
|
// Public methods are atomic
|
|
DiffractionExperiment();
|
|
DiffractionExperiment(const DetectorSetup& geom);
|
|
|
|
// Methods below can be chained together
|
|
DiffractionExperiment& Detector(const DetectorSetup& input);
|
|
DiffractionExperiment& Mode(DetectorMode input);
|
|
DiffractionExperiment& DataStreams(int64_t input);
|
|
|
|
DiffractionExperiment& PedestalG0Frames(int64_t input);
|
|
DiffractionExperiment& PedestalG1Frames(int64_t input);
|
|
DiffractionExperiment& PedestalG2Frames(int64_t input);
|
|
DiffractionExperiment& FrameTime(std::chrono::nanoseconds frame_time,
|
|
std::chrono::nanoseconds in_count_time = std::chrono::nanoseconds(0));
|
|
|
|
DiffractionExperiment& ZMQPreviewPeriod(const std::optional<std::chrono::microseconds> &input);
|
|
|
|
DiffractionExperiment& UseInternalPacketGenerator(bool input);
|
|
DiffractionExperiment& InternalPacketGeneratorImages(int64_t input);
|
|
DiffractionExperiment& MaskModuleEdges(bool input);
|
|
DiffractionExperiment& MaskChipEdges(bool input);
|
|
|
|
DiffractionExperiment& QRangeForAzimInt_recipA(float low, std::optional<float> high);
|
|
DiffractionExperiment& BkgEstimateQRange_recipA(float low, float high);
|
|
DiffractionExperiment& QSpacingForAzimInt_recipA(float input);
|
|
|
|
DiffractionExperiment& StorageCells(int64_t input);
|
|
DiffractionExperiment& StorageCellStart(int64_t input = 15);
|
|
|
|
DiffractionExperiment& UsingGainHG0(bool input);
|
|
DiffractionExperiment& FixedGainG1(bool input);
|
|
DiffractionExperiment& IncrementRunNumber();
|
|
DiffractionExperiment& JungfrauConvPhotonCnt(bool input);
|
|
DiffractionExperiment& PulsedSource(bool input);
|
|
|
|
DiffractionExperiment& ImagesPerTrigger(int64_t input);
|
|
DiffractionExperiment& NumTriggers(int64_t triggers);
|
|
DiffractionExperiment& IncidentEnergy_keV(float input);
|
|
DiffractionExperiment& BeamX_pxl(float input);
|
|
DiffractionExperiment& BeamY_pxl(float input);
|
|
DiffractionExperiment& DetectorDistance_mm(float input);
|
|
DiffractionExperiment& FilePrefix(std::string input);
|
|
DiffractionExperiment& FilePrefixTrusted(std::string input); // offline/local: no CheckPath guard (absolute allowed)
|
|
DiffractionExperiment& Compression(CompressionAlgorithm input);
|
|
DiffractionExperiment& SetUnitCell(const std::optional<UnitCell> &cell);
|
|
DiffractionExperiment& SpaceGroupNumber(std::optional<int64_t> input);
|
|
DiffractionExperiment& SampleName(const std::string &input);
|
|
DiffractionExperiment& AttenuatorTransmission(const std::optional<float> &input);
|
|
DiffractionExperiment& TotalFlux(const std::optional<float> &input);
|
|
DiffractionExperiment& Goniometer(const std::optional<GoniometerAxis> &input);
|
|
DiffractionExperiment& Smargon(const std::optional<SmargonPosition> &input);
|
|
DiffractionExperiment& HeaderAppendix(const nlohmann::json& input);
|
|
DiffractionExperiment& ImageAppendix(const nlohmann::json& input);
|
|
DiffractionExperiment& Summation(int64_t input);
|
|
DiffractionExperiment& MaxSpotCount(int64_t input);
|
|
DiffractionExperiment& ImagesPerFile(const std::optional<int64_t> &input);
|
|
DiffractionExperiment& LossyCompressionSerialMX(float input);
|
|
DiffractionExperiment& LossyCompressionPoisson(const std::optional<int64_t> &input);
|
|
DiffractionExperiment& SaveCalibration(const std::optional<bool> &input);
|
|
DiffractionExperiment& ImportDatasetSettings(const DatasetSettings& input);
|
|
DiffractionExperiment& EigerBitDepth(const std::optional<int64_t> &input);
|
|
DiffractionExperiment& ImportInstrumentMetadata(const InstrumentMetadata& input);
|
|
DiffractionExperiment& ApplyPixelMask(bool input);
|
|
DiffractionExperiment& ElectronSource(bool input);
|
|
DiffractionExperiment& OverwriteExistingFiles(bool input);
|
|
DiffractionExperiment& SetFileWriterFormat(FileWriterFormat input);
|
|
DiffractionExperiment& IndexingAlgorithm(IndexingAlgorithmEnum input);
|
|
DiffractionExperiment& GeomRefinementAlgorithm(GeomRefinementAlgorithmEnum input);
|
|
DiffractionExperiment& IndexingTolerance(float input);
|
|
DiffractionExperiment& GridScan(const std::optional<GridScanSettings>& input);
|
|
DiffractionExperiment& RingCurrent_mA(const std::optional<float>& input);
|
|
DiffractionExperiment& SampleTemperature_K(const std::optional<float> &input);
|
|
DiffractionExperiment& PoniRot1_rad(float input);
|
|
DiffractionExperiment& PoniRot2_rad(float input);
|
|
DiffractionExperiment& PoniRot3_rad(float input);
|
|
DiffractionExperiment& FluorescenceSpectrum(const XrayFluorescenceSpectrum& input);
|
|
DiffractionExperiment& DetectIceRings(bool input);
|
|
DiffractionExperiment& RunNumber(uint64_t input);
|
|
|
|
IndexingSettings GetIndexingSettings() const;
|
|
DiffractionExperiment& ImportIndexingSettings(const IndexingSettings &input);
|
|
|
|
InstrumentMetadata GetInstrumentMetadata() const;
|
|
|
|
DiffractionExperiment& ImportImageFormatSettings(const ImageFormatSettings& input);
|
|
ImageFormatSettings GetImageFormatSettings() const;
|
|
|
|
DiffractionExperiment& ImportDetectorSettings(const DetectorSettings& input);
|
|
DetectorSettings GetDetectorSettings() const;
|
|
|
|
DiffractionExperiment& ImportAzimuthalIntegrationSettings(const AzimuthalIntegrationSettings& input);
|
|
AzimuthalIntegrationSettings GetAzimuthalIntegrationSettings() const;
|
|
|
|
// Highest q (2*pi/d) any pixel of the detector reaches, from the current geometry, and the same
|
|
// limit as a resolution in Angstrom. This is what an unset azimuthal-integration high q and an unset
|
|
// spot-finding high-resolution limit resolve to.
|
|
[[nodiscard]] float GetDetectorMaxQ_recipA() const;
|
|
[[nodiscard]] float GetDetectorMaxResolution_A() const;
|
|
|
|
DiffractionExperiment& ImportBraggIntegrationSettings(const BraggIntegrationSettings& input);
|
|
BraggIntegrationSettings GetBraggIntegrationSettings() const;
|
|
|
|
DiffractionExperiment& ImportFileWriterSettings(const FileWriterSettings& input);
|
|
FileWriterSettings GetFileWriterSettings() const;
|
|
|
|
DiffractionExperiment &ImportDarkMaskSettings(const DarkMaskSettings &input);
|
|
DarkMaskSettings GetDarkMaskSettings() const;
|
|
|
|
DiffractionExperiment &ImportScalingSettings(const ScalingSettings& input);
|
|
ScalingSettings GetScalingSettings() const;
|
|
|
|
DatasetSettings GetDatasetSettings() const;
|
|
|
|
void FillMessage(StartMessage &message) const;
|
|
|
|
static void CheckDataProcessingSettings(const SpotFindingSettings& settings);
|
|
static SpotFindingSettings DefaultDataProcessingSettings();
|
|
|
|
DetectorMode GetDetectorMode() const;
|
|
|
|
int64_t GetBitDepthReadout() const; // 12 bit is OK :)
|
|
|
|
int64_t GetSaturationLimit() const;
|
|
int64_t GetOverflow() const;
|
|
int64_t GetUnderflow() const;
|
|
|
|
int64_t GetPedestalG0Frames() const;
|
|
int64_t GetPedestalG1Frames() const;
|
|
int64_t GetPedestalG2Frames() const;
|
|
|
|
int64_t GetImageNum() const;
|
|
|
|
int64_t GetFrameNum() const;
|
|
int64_t GetFrameNumPerTrigger() const;
|
|
|
|
std::chrono::nanoseconds GetFrameTime() const;
|
|
std::chrono::nanoseconds GetDetectorPeriod() const;
|
|
std::chrono::nanoseconds GetImageTime() const;
|
|
|
|
std::chrono::nanoseconds GetImageCountTime() const;
|
|
std::chrono::nanoseconds GetFrameCountTime() const;
|
|
bool GetFrameCountTimeAuto() const;
|
|
|
|
DiffractionExperiment& StorageCellDelay(std::chrono::nanoseconds input);
|
|
std::chrono::nanoseconds GetStorageCellDelay() const;
|
|
|
|
DiffractionExperiment& DetectorDelay(std::chrono::nanoseconds input);
|
|
std::chrono::nanoseconds GetDetectorDelay() const;
|
|
|
|
int64_t GetMaxCompressedSize() const;
|
|
int64_t GetImageBufferLocationSize() const;
|
|
|
|
// Room reserved in every image-buffer slot for the per-image CBOR metadata, on top of the
|
|
// compressed image. CBORSerialize_Image_MetadataHeadroom holds it against the largest metadata
|
|
// the serializer can produce, so change the two together.
|
|
static constexpr int64_t kImageMetadataHeadroom = 4 * 1024 * 1024;
|
|
|
|
int64_t GetDataStreamsNum() const;
|
|
int64_t GetModulesNum(uint16_t data_stream) const;
|
|
int64_t GetModulesNum() const;
|
|
int64_t GetFirstModuleOfDataStream(uint16_t data_stream) const;
|
|
|
|
int64_t GetPixelsNum() const;
|
|
int64_t GetYPixelsNum() const;
|
|
int64_t GetXPixelsNum() const;
|
|
|
|
int64_t GetPixelsNumConv() const; // This is actual / converted number
|
|
int64_t GetYPixelsNumConv() const;
|
|
int64_t GetXPixelsNumConv() const;
|
|
|
|
int64_t GetPixel0OfModuleConv(uint16_t module_number) const;
|
|
int64_t GetModuleFastDirectionStep(uint16_t module_number) const;
|
|
int64_t GetModuleSlowDirectionStep(uint16_t module_number) const;
|
|
|
|
Coord GetModuleFastDirection(uint16_t module_number) const;
|
|
Coord GetModuleSlowDirection(uint16_t module_number) const;
|
|
|
|
std::optional<std::chrono::microseconds> GetZMQPreviewPeriod() const;
|
|
|
|
int64_t GetDefaultPlotBinning() const;
|
|
|
|
bool IsUsingInternalPacketGen() const;
|
|
int64_t GetInternalPacketGeneratorImages() const;
|
|
|
|
uint32_t GetSrcIPv4Address(uint32_t data_stream, uint32_t half_module) const;
|
|
|
|
bool GetMaskModuleEdges() const;
|
|
bool GetMaskChipEdges() const;
|
|
|
|
float GetLowQForAzimInt_recipA() const;
|
|
float GetHighQForAzimInt_recipA() const;
|
|
float GetQSpacingForAzimInt_recipA() const;
|
|
|
|
float GetLowQForBkgEstimate_recipA() const;
|
|
float GetHighQForBkgEstimate_recipA() const;
|
|
|
|
int64_t GetStorageCellNumber() const;
|
|
int64_t GetStorageCellStart() const;
|
|
|
|
int64_t GetMaxSpotCount() const;
|
|
|
|
float GetPixelSize_mm() const;
|
|
std::string GetSourceName() const;
|
|
std::string GetSourceType() const;
|
|
std::string GetInstrumentName() const;
|
|
std::string GetDetectorDescription() const;
|
|
|
|
std::vector<std::string> GetDetectorModuleHostname() const;
|
|
|
|
DiffractionExperiment& ApplySolidAngleCorr(bool input);
|
|
DiffractionExperiment& PolarizationFactor(const std::optional<float> &input);
|
|
DiffractionExperiment& BandwidthFWHM(const std::optional<float> &input);
|
|
|
|
bool GetApplySolidAngleCorr() const;
|
|
std::optional<float> GetPolarizationFactor() const;
|
|
std::optional<float> GetBandwidthFWHM() const;
|
|
|
|
int64_t GetUDPInterfaceCount() const;
|
|
std::vector<DetectorModuleConfig> GetDetectorModuleConfig(const std::vector<AcquisitionDeviceNetConfig>& net_config) const;
|
|
|
|
bool IsFixedGainG1() const;
|
|
bool IsUsingGainHG0() const;
|
|
|
|
uint64_t GetRunNumber() const;
|
|
std::string GetRunName() const;
|
|
bool IsJungfrauConvPhotonCnt() const;
|
|
|
|
const DetectorSetup& GetDetectorSetup() const;
|
|
DetectorSetup& Detector();
|
|
|
|
bool IsPulsedSource() const;
|
|
bool IsElectronSource() const;
|
|
|
|
bool IsSpotFindingEnabled() const;
|
|
|
|
float GetPhotonEnergyForConversion_keV() const;
|
|
|
|
std::optional<float> GetAttenuatorTransmission() const;
|
|
std::optional<float> GetTotalFlux() const;
|
|
std::optional<GoniometerAxis> GetGoniometer() const;
|
|
std::optional<GridScanSettings> GetGridScan() const;
|
|
|
|
const nlohmann::json& GetHeaderAppendix() const;
|
|
const nlohmann::json& GetImageAppendix() const;
|
|
std::optional<UnitCell> GetUnitCell() const;
|
|
std::string GetUnitCellString() const;
|
|
std::optional<int64_t> GetSpaceGroupNumber() const;
|
|
bool GetSaveCalibration() const;
|
|
int64_t GetSummation() const;
|
|
int64_t GetFPGASummation() const;
|
|
std::string GetSampleName() const;
|
|
float GetIncidentEnergy_keV() const;
|
|
float GetWavelength_A() const;
|
|
float GetBeamX_pxl() const;
|
|
float GetBeamY_pxl() const;
|
|
float GetDetectorDistance_mm() const;
|
|
|
|
Coord GetScatteringVector() const;
|
|
|
|
std::string GetFilePrefix() const;
|
|
|
|
CompressionAlgorithm GetCompressionAlgorithm() const;
|
|
int64_t GetNumTriggers() const;
|
|
|
|
ROIMap& ROI();
|
|
const ROIMap& ROI() const;
|
|
std::vector<uint16_t> ExportROIMap() const;
|
|
int64_t GetImagesPerFile() const;
|
|
|
|
float GetLossyCompressionSerialMX() const;
|
|
std::optional<int64_t> GetLossyCompressionPoisson() const;
|
|
std::string GetExperimentGroup() const;
|
|
|
|
std::optional<int64_t> GetPixelValueLowThreshold() const;
|
|
DiffractionExperiment &PixelValueLowThreshold(const std::optional<int64_t>& input);
|
|
|
|
std::optional<int64_t> GetPixelValueHighThreshold() const;
|
|
DiffractionExperiment &PixelValueHighThreshold(const std::optional<int64_t>& input);
|
|
|
|
DiffractionExperiment& BitDepthImage(const std::optional<int64_t> &input);
|
|
DiffractionExperiment& PixelSigned(const std::optional<bool> &input);
|
|
|
|
bool IsGeometryTransformed() const;
|
|
DiffractionExperiment& GeometryTransformation(bool input);
|
|
int64_t GetImageFillValue() const;
|
|
|
|
DiffractionExperiment& JungfrauConversionFactor_keV(const std::optional<float> &input);
|
|
std::optional<float> GetJungfrauConversionFactor_keV() const;
|
|
DiffractionExperiment& AutoSummation(bool input);
|
|
bool GetAutoSummation() const;
|
|
|
|
int64_t GetByteDepthImage() const;
|
|
int64_t GetByteDepthFPGA() const;
|
|
bool IsPixelSigned() const;
|
|
|
|
bool IsPedestalRun() const;
|
|
|
|
DiffractionExperiment &Raw();
|
|
DiffractionExperiment &Conversion();
|
|
|
|
float GetPedestalG0RMSLimit() const;
|
|
uint32_t GetPedestalMinImageCount() const;
|
|
float GetEigerThreshold_keV() const;
|
|
int64_t GetEigerBitDepth() const;
|
|
DetectorTiming GetDetectorTiming() const;
|
|
|
|
bool IsDetectorModuleSync() const;
|
|
bool IsDetectorMirroredY() const;
|
|
// The sample transformation chain in mounting order, base first (see DetectorTransformation).
|
|
// image_num is needed because a moving axis carries one value per image.
|
|
[[nodiscard]] std::vector<DetectorTransformation> BuildTransformationChain(int64_t image_num) const;
|
|
|
|
[[nodiscard]] DetectorType GetDetectorType() const;
|
|
[[nodiscard]] bool IsMaskPixelsWithoutG0() const;
|
|
[[nodiscard]] bool IsApplyPixelMask() const;
|
|
|
|
DiffractionExperiment& CPUSummation(bool input);
|
|
[[nodiscard]] bool IsCPUSummation() const;
|
|
|
|
[[nodiscard]] FileWriterFormat GetFileWriterFormat() const;
|
|
|
|
DiffractionGeometry GetDiffractionGeometry() const;
|
|
void CalcAzIntCorrRawCoord(float *output, size_t module_number) const;
|
|
void CalcSpotFinderResolutionMap(float *data, size_t module_number) const;
|
|
CompressedImageMode GetImageMode() const;
|
|
|
|
// Resolves the configured algorithm to a concrete one from GPU availability and
|
|
// unit-cell presence: Auto -> FFTW/FFT/FFBIDX, and FFBIDX without a cell -> None.
|
|
// Never returns Auto - the indexer pool relies on this and cannot resolve Auto itself.
|
|
IndexingAlgorithmEnum GetIndexingAlgorithm() const;
|
|
GeomRefinementAlgorithmEnum GetGeomRefinementAlgorithm() const;
|
|
float GetIndexingTolerance() const;
|
|
|
|
std::optional<float> GetSampleTemperature_K() const;
|
|
std::optional<float> GetRingCurrent_mA() const;
|
|
|
|
float GetPoniRot1_rad() const;
|
|
float GetPoniRot2_rad() const;
|
|
float GetPoniRot3_rad() const;
|
|
|
|
std::optional<gemmi::SpaceGroup> GetGemmiSpaceGroup() const;
|
|
gemmi::CrystalSystem GetCrystalSystem() const;
|
|
std::string GetSpaceGroupName() const;
|
|
char GetCentering() const;
|
|
const XrayFluorescenceSpectrum &GetFluorescenceSpectrum() const;
|
|
|
|
bool IsDetectIceRings() const;
|
|
int64_t GetDarkMaskNumberOfFrames() const;
|
|
|
|
bool IsRotationIndexing() const;
|
|
|
|
std::optional<double> GetRotationWedgeForScaling() const;
|
|
bool GetRefineRotationWedgeInScaling() const;
|
|
};
|