v1.0.0-rc.166 (#76)
Build Packages / Unit tests (push) Successful in 1h22m15s
Build Packages / build:windows:nocuda (push) Successful in 18m0s
Build Packages / build:windows:cuda (push) Successful in 20m30s
Build Packages / build:viewer-tgz:cpu (push) Successful in 10m32s
Build Packages / build:viewer-tgz:cuda (push) Successful in 11m39s
Build Packages / build:rugnux-tgz (x86_64) (push) Successful in 8m55s
Build Packages / build:rugnux:windows (push) Successful in 11m25s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 20m6s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 16m27s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 20m19s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 15m34s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 20m25s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 19m36s
Build Packages / build:rpm (rocky8) (push) Successful in 17m43s
Build Packages / build:rpm (rocky9) (push) Successful in 13m34s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 21m28s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 18m19s
Build Packages / DIALS test (push) Successful in 12m36s
Build Packages / XDS test (durin plugin) (push) Successful in 6m56s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 6m48s
Build Packages / XDS test (neggia plugin) (push) Successful in 6m7s
Build Packages / Generate python client (push) Successful in 11s
Build Packages / Build documentation (push) Successful in 36s
Build Packages / Create release (push) Skipped
Build Packages / build:rugnux:aarch64 (cross) (push) Successful in 5m11s

* `rugnux --mode calibration` writes `<prefix>.json` beside the `.poni`, whose `dataset_settings` member is a `jfjoch_broker` `dataset_settings` body as it stands.
* `rugnux` and `jfjoch_viewer` read PILATUS miniCBF sweeps natively, without conversion.
* Masters written by other facilities open, including Eiger 1.x and third-party NXmx variants.
* `rugnux` measures the beam centre on every run, and indexes with it when the file's value indexes nothing.
* A detector swung out on a 2theta arm is placed where the file says it stands, and the calibration can hold the tilt fixed.
* `rugnux` writes the unmerged MTZ by default, and a P1 merge beside it, so a wrong space group can be re-merged without reprocessing.
* Significant improvements to symmetry handling in `rugnux`: the lattice, the point group, the setting and the systematic absences.
* The `rugnux` report gives the resolution the CC1/2 fit reached, beside the range the reflections were written to.
* The `rugnux` report gives the twinning statistics measured before the space group was decided, beside the ones measured after.
* The `rugnux` report gives the strong-direction diffraction limit, and warns when CC1/2 is not monotone with resolution.
* `rugnux` ranks screw axes on the evidence their absences carry, rather than on how many control reflections a candidate happens to have.
* Twinning is no longer reported when the L-test contradicts it.
* The `rugnux` report gives the detector tilt, the measured tilt and the direct beam beside the beam centre, and a post-refined beam centre is judged against the run's own measurement rather than the file's.
* `--no-refine-tilt` holds the detector tilt at the value in the file, instead of zeroing it, when the calibration starts from the spots.
* The `jfjoch_viewer` grid scan view draws the cells in the proportion of the scan steps, so the map has the shape of the scanned area.

Reviewed-on: #76
Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #76.
This commit is contained in:
2026-09-02 21:17:31 +02:00
committed by leonarski_f
parent 511be0c366
commit 680c36c20d
383 changed files with 20910 additions and 3936 deletions
+46 -10
View File
@@ -198,6 +198,11 @@ DiffractionExperiment &DiffractionExperiment::SpaceGroupNumber(std::optional<int
return *this;
}
DiffractionExperiment &DiffractionExperiment::SetSpaceGroup(const std::optional<gemmi::SpaceGroup> &input) {
dataset.SetSpaceGroup(input);
return *this;
}
DiffractionExperiment &DiffractionExperiment::StorageCells(int64_t input) {
detector_settings.StorageCells(input);
return *this;
@@ -649,6 +654,9 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
message.images_per_file = GetImagesPerFile();
message.beam_center_x = GetBeamX_pxl();
message.beam_center_y = GetBeamY_pxl();
const auto direct_beam = GetDiffractionGeometry().GetDirectBeam_pxl();
message.direct_beam_x = direct_beam.first;
message.direct_beam_y = direct_beam.second;
message.detector_distance = GetDetectorDistance_mm() * 1e-3f;
message.incident_wavelength = GetWavelength_A();
// NXmx incident_wavelength_spread is the FWHM of the wavelength distribution,
@@ -657,9 +665,17 @@ void DiffractionExperiment::FillMessage(StartMessage &message) const {
if (const auto bw = GetBandwidthFWHM())
message.incident_wavelength_spread = bw.value() * GetWavelength_A();
message.incident_energy = GetIncidentEnergy_keV() * 1e3f;
// NXmx incident_beam_size is a length like every other in this message, so micrometres in
// the settings become metres here.
if (const auto beam_size_x = GetBeamSizeX_um())
message.beam_size_x = beam_size_x.value() * 1e-6f;
if (const auto beam_size_y = GetBeamSizeY_um())
message.beam_size_y = beam_size_y.value() * 1e-6f;
message.image_size_x = GetXPixelsNum();
message.image_size_y = GetYPixelsNum();
message.mirror_y = IsDetectorMirroredY();
message.detector_orientation_mirror_y = detector.GetImageOrientation().IsMirrorY();
message.detector_orientation_quarter_turns = detector.GetImageOrientation().GetQuarterTurns();
message.saturation_value = SaturationValueFromLimit(GetSaturationLimit());
// The marker actually stored in the pixels: UINTx_MAX unsigned, INTx_MIN signed. GetUnderflow()
// was written here, which is -1 for an unsigned image and so matches no pixel it can contain.
@@ -910,6 +926,16 @@ DiffractionExperiment &DiffractionExperiment::TotalFlux(const std::optional<floa
return *this;
}
DiffractionExperiment &DiffractionExperiment::BeamSizeX_um(const std::optional<float> &input) {
dataset.BeamSizeX_um(input);
return *this;
}
DiffractionExperiment &DiffractionExperiment::BeamSizeY_um(const std::optional<float> &input) {
dataset.BeamSizeY_um(input);
return *this;
}
std::optional<float> DiffractionExperiment::GetAttenuatorTransmission() const {
return dataset.GetAttenuatorTransmission();
}
@@ -918,6 +944,14 @@ std::optional<float> DiffractionExperiment::GetTotalFlux() const {
return dataset.GetTotalFlux();
}
std::optional<float> DiffractionExperiment::GetBeamSizeX_um() const {
return dataset.GetBeamSizeX_um();
}
std::optional<float> DiffractionExperiment::GetBeamSizeY_um() const {
return dataset.GetBeamSizeY_um();
}
DiffractionExperiment &DiffractionExperiment::Goniometer(const std::optional<GoniometerAxis> &input) {
dataset.Goniometer(input);
return *this;
@@ -1501,8 +1535,10 @@ std::vector<DetectorTransformation> DiffractionExperiment::BuildTransformationCh
axis.Value(goniometer->GetStart_deg());
add(std::move(axis));
} else if (GetGridScan().has_value()) {
// A grid scan still sits on a spindle that simply does not turn. NXmx cannot say "there is no
// rotation", and a sample chain of translations alone is not something readers accept.
// A grid scan still sits on a spindle that simply does not turn, and 0 is a placeholder for
// an angle nobody told us: send the axis with step 0 and the position it really stood at is
// written instead. NXmx does allow a sample with no goniometer at all (depends_on "."), but
// a sample chain of translations alone is not something readers accept - dxtbx raises on it.
add(DetectorTransformation("omega", TransformationType::Rotation, {-1, 0, 0}).Value(0.0f));
}
@@ -1598,6 +1634,7 @@ DiffractionGeometry DiffractionExperiment::GetDiffractionGeometry() const {
.PoniRot1_rad(dataset.GetPoniRot1_rad())
.PoniRot2_rad(dataset.GetPoniRot2_rad())
.PoniRot3_rad(dataset.GetPoniRot3_rad())
.Orientation(detector.GetImageOrientation())
.Rotation(dataset.GetGoniometer());
return g;
}
@@ -1789,14 +1826,13 @@ std::string DiffractionExperiment::GetSpaceGroupName() const {
return sg->short_name();
}
std::optional<gemmi::SpaceGroup> DiffractionExperiment::GetGemmiSpaceGroup() const {
auto sg = GetSpaceGroupNumber();
if (!sg)
return std::nullopt;
const gemmi::SpaceGroup *g = gemmi::find_spacegroup_by_number(sg.value());
if (g == nullptr)
return std::nullopt;
return *g;
const std::optional<gemmi::SpaceGroup> &DiffractionExperiment::GetGemmiSpaceGroup() const {
return dataset.GetSpaceGroup();
}
const gemmi::SpaceGroup &DiffractionExperiment::GetSpaceGroupOrP1() const {
const auto &sg = dataset.GetSpaceGroup();
return sg ? *sg : *gemmi::find_spacegroup_by_number(1);
}
char DiffractionExperiment::GetCentering() const {