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
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:
@@ -7,6 +7,11 @@
|
||||
#include "../compression/JFJochCompressor.h"
|
||||
#include "../common/NetworkAddressConvert.h"
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "Dataset_settings.h"
|
||||
#include "Dataset_settings_smargon.h"
|
||||
#include "../broker/OpenAPIConvert.h"
|
||||
|
||||
using namespace std::literals::chrono_literals;
|
||||
|
||||
TEST_CASE("DiffractionExperiment_FilePath","[DiffractionExperiment]") {
|
||||
@@ -357,6 +362,31 @@ TEST_CASE("DiffractionExperiment_SpaceGroup", "[DiffractionExperiment]") {
|
||||
REQUIRE(x.GetCrystalSystem() == gemmi::CrystalSystem::Tetragonal);
|
||||
REQUIRE(x.GetGemmiSpaceGroup());
|
||||
REQUIRE(x.GetSpaceGroupName() == "P43212");
|
||||
REQUIRE(x.GetSpaceGroupOrP1().number == 96);
|
||||
|
||||
x.SpaceGroupNumber(std::nullopt);
|
||||
REQUIRE(!x.GetGemmiSpaceGroup());
|
||||
REQUIRE(x.GetSpaceGroupOrP1().number == 1);
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_SpaceGroupSetting", "[DiffractionExperiment]") {
|
||||
// The experiment carries the group itself, so a non-reference setting survives it. Set by number
|
||||
// the same groups come back as their reference settings, which is what the number can name.
|
||||
DiffractionExperiment x;
|
||||
for (const char *setting : {"P 1 1 2", "I 1 1 2", "R 3:R", "P 2 21 2"}) {
|
||||
const gemmi::SpaceGroup *sg = gemmi::find_spacegroup_by_name(setting);
|
||||
REQUIRE(sg != nullptr);
|
||||
x.SetSpaceGroup(*sg);
|
||||
CHECK(x.GetGemmiSpaceGroup()->xhm() == setting);
|
||||
CHECK(x.GetSpaceGroupNumber() == sg->number);
|
||||
CHECK(x.GetCentering() == sg->centring_type());
|
||||
|
||||
x.SpaceGroupNumber(sg->number);
|
||||
CHECK(x.GetGemmiSpaceGroup()->xhm() != setting);
|
||||
}
|
||||
|
||||
x.SetSpaceGroup(std::nullopt);
|
||||
CHECK(!x.GetGemmiSpaceGroup());
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_SampleName", "[DiffractionExperiment]") {
|
||||
@@ -1179,3 +1209,56 @@ TEST_CASE("DiffractionExperiment_SaturationAndErrorMarkers", "[DiffractionExperi
|
||||
CHECK(message.bit_depth_readout.has_value() == !c.is_signed);
|
||||
}
|
||||
}
|
||||
|
||||
// The Smargon reports its own axis positions with readout noise, so a chi parked at either end of
|
||||
// its arc comes back just outside it - a chi of zero as a small negative number. The API bounded chi
|
||||
// to [0, 90], which turned an ordinary "chi is at zero" setup into a rejected request. Chi is
|
||||
// carried out to NXmx and read back and nothing computes with it, so it is now unbounded, as phi
|
||||
// always was.
|
||||
TEST_CASE("DiffractionExperiment_SmargonChiReadoutNoise", "[DiffractionExperiment]") {
|
||||
auto validates = [](const char *body) {
|
||||
org::openapitools::server::model::Dataset_settings_smargon model;
|
||||
from_json(nlohmann::json::parse(body), model);
|
||||
std::stringstream msg;
|
||||
return model.validate(msg);
|
||||
};
|
||||
CHECK(validates(R"({"phi_deg": 0.0, "chi_deg": -1e-7})"));
|
||||
CHECK(validates(R"({"phi_deg": 0.0, "chi_deg": 90.0001})"));
|
||||
|
||||
auto chi_axis = [](float chi_deg) {
|
||||
DiffractionExperiment x;
|
||||
x.ImagesPerTrigger(1).Smargon(SmargonPosition{.phi_deg = 0.0f, .chi_deg = chi_deg});
|
||||
const auto chain = x.BuildTransformationChain(1);
|
||||
const auto chi = std::find_if(chain.begin(), chain.end(),
|
||||
[](const auto &t) { return t.GetName() == "chi"; });
|
||||
REQUIRE(chi != chain.end());
|
||||
return *chi;
|
||||
};
|
||||
const auto noisy = chi_axis(-1e-7f);
|
||||
const auto zero = chi_axis(0.0f);
|
||||
CHECK(noisy.GetVector() == zero.GetVector());
|
||||
REQUIRE(noisy.GetValues().size() == zero.GetValues().size());
|
||||
CHECK(noisy.GetValues().at(0) == Catch::Approx(zero.GetValues().at(0)).margin(1e-6));
|
||||
}
|
||||
|
||||
// A grid scan and a goniometer axis are not alternatives: a grid is collected at a stationary
|
||||
// spindle, and the axis sent with step 0 is what states the angle it stood at. The request used to
|
||||
// drop the grid scan whenever an axis was present, and nothing pinned it.
|
||||
TEST_CASE("DiffractionExperiment_GridScanAtStationaryAxis", "[DiffractionExperiment]") {
|
||||
org::openapitools::server::model::Dataset_settings model;
|
||||
from_json(nlohmann::json::parse(R"({
|
||||
"images_per_trigger": 12,
|
||||
"beam_x_pxl": 512.0, "beam_y_pxl": 256.0,
|
||||
"detector_distance_mm": 150.0, "incident_energy_keV": 12.4,
|
||||
"grid_scan": {"n_fast": 4, "step_x_um": 20.0, "step_y_um": 20.0},
|
||||
"goniometer": {"name": "omega", "start": 90.0, "step": 0.0, "vector": [-1, 0, 0]}
|
||||
})"), model);
|
||||
|
||||
const auto settings = Convert(model);
|
||||
REQUIRE(settings.GetGridScan().has_value());
|
||||
CHECK(settings.GetGridScan()->GetNFast() == 4);
|
||||
REQUIRE(settings.GetGoniometer().has_value());
|
||||
CHECK(settings.GetGoniometer()->GetName() == "omega");
|
||||
CHECK(!settings.GetGoniometer()->IsScanning());
|
||||
CHECK(settings.GetGoniometer()->GetStart_deg() == Catch::Approx(90.0f));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user