v1.0.0-rc.160 (#70)
Build Packages / Unit tests (push) Skipped
Build Packages / build:windows:cuda (push) Successful in 18m44s
Build Packages / build:viewer-tgz:cpu (push) Successful in 6m11s
Build Packages / build:viewer-tgz:cuda (push) Successful in 6m54s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m40s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m41s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m10s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m4s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m5s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 12m23s
Build Packages / build:rpm (rocky8) (push) Successful in 11m30s
Build Packages / build:rpm (rocky9) (push) Successful in 12m51s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m8s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m21s
Build Packages / DIALS test (push) Successful in 13m22s
Build Packages / XDS test (durin plugin) (push) Successful in 9m2s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m55s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m57s
Build Packages / Generate python client (push) Successful in 23s
Build Packages / Build documentation (push) Successful in 57s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 10m24s
Build Packages / Unit tests (push) Skipped
Build Packages / build:windows:cuda (push) Successful in 18m44s
Build Packages / build:viewer-tgz:cpu (push) Successful in 6m11s
Build Packages / build:viewer-tgz:cuda (push) Successful in 6m54s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 9m40s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 10m41s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 10m10s
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m4s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 11m5s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 12m23s
Build Packages / build:rpm (rocky8) (push) Successful in 11m30s
Build Packages / build:rpm (rocky9) (push) Successful in 12m51s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 12m8s
Build Packages / build:rpm (ubuntu2404) (push) Successful in 11m21s
Build Packages / DIALS test (push) Successful in 13m22s
Build Packages / XDS test (durin plugin) (push) Successful in 9m2s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 7m55s
Build Packages / XDS test (neggia plugin) (push) Successful in 5m57s
Build Packages / Generate python client (push) Successful in 23s
Build Packages / Build documentation (push) Successful in 57s
Build Packages / Create release (push) Skipped
Build Packages / build:windows:nocuda (push) Successful in 10m24s
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. * rugnux: Add `--model model.pdb` - score the merged data against an atomic model and compute initial maps. It reports R-work/R-free (scaling the model to the observed amplitudes with an overall scale, an anisotropic B and a flat bulk solvent - the standard few-parameter model, so a batch of maps stays directly comparable) and writes 2Fo-Fc / Fo-Fc electron-density maps (CCP4) plus a map-coefficient MTZ. The structure itself is not refined; the model is only re-fractionalised into the data cell. * rugnux: The merged reflection output now carries French-Wilson amplitudes (|F| and its sigma) next to the intensities - MTZ `F`/`SIGF`, mmCIF `_refln.F_meas_au`, and the text HKL - computed with the correct centric/acentric Wilson prior and epsilon multiplicity, so a downstream program (e.g. phenix.refine) can refine against amplitudes. The intensity columns are unchanged. * rugnux: R-free test-set flags are now assigned deterministically and consistently across symmetry - a Bijvoet pair I(+)/I(-) is never split between the work and free sets, and the assignment is a reproducible per-hkl hash that depends only on the reflection index, so every dataset of one crystal form gets the same ~5% free set (what a multi-dataset campaign such as PanDDA needs). On small data the fraction is floored so the test set stays large enough for a stable R-free (~500 reflections, capped at 10%); it stays flat at 5% on ordinary data. When a reference MTZ carries a `FreeR_flag` column its test set is imported instead, letting a whole campaign inherit one shared free set. * rugnux: A reference MTZ (`--reference-mtz`) can now fix the space group and cell for rotation data too (previously rejected), without being used to scale - the rotation merge stays self-consistent. When the crystal has an indexing (merohedral) ambiguity - a lattice symmetry higher than its Laue symmetry, e.g. P3/P4/P6/C2 - the reference also resolves it: each candidate reindexing (identity plus the twin-law cosets of the metric symmetry) is scored by its intensity correlation against the reference and the data are re-merged in the best-correlating one. This is a metric-preserving relabelling of hkl (the cell is unchanged) and a no-op for a holohedral crystal such as lysozyme. * rugnux: `--model` validation now aligns the data to the model before scoring - the observed reflections are reindexed into the model's enantiomorph when the two differ only by hand (indistinguishable from merged intensities). A merohedral indexing ambiguity is resolved against the reference MTZ when one is given (so a whole campaign shares one indexing convention); only with a model and no reference does validation fall back to fitting each candidate reindexing and keeping the lowest R-free. * rugnux: De-novo symmetry - recover a genuine high-symmetry group whose data are imperfectly scaled. Such a merge's within-orbit chi² lands just past the self-consistency bound (each real symmetry step adds a little systematic scatter), right where a merohedral twin also lands, so the chi² ratio alone cannot separate them. The candidate is now rescued when the extra intensity-proportional systematic error it invokes stays small relative to the confirmed subgroup - a genuine symmetry step gains multiplicity without inflating the merge error model's b, whereas a twin forces non-equivalent reflections together and b balloons. Fixes cubic insulin (I23 instead of I222) with no change to any other crystal in the test battery, including the twins that must stay in their lower symmetry. * Docs: Document the French-Wilson amplitude estimation, R-free flagging, reference-based space-group/ambiguity resolution, and model-based validation/maps in CPU_DATA_ANALYSIS.md. * Frontend: The status-bar pill now shows a progress bar during detector calibration (previously only during measurement), and the calibration state and its button are labelled "Calibration"/"CALIBRATE" (the internal `Pedestal` state name is unchanged for back-compatibility).Reviewed-on: #70 Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch>
This commit was merged in pull request #70.
This commit is contained in:
+2
-2
@@ -40,8 +40,8 @@ TEST_CASE("CBORSerialize_Start", "[CBOR]") {
|
||||
.storage_cell_delay_ns = 15345,
|
||||
.pixel_mask_enabled = true,
|
||||
.arm_date = "abc",
|
||||
.sample_name = "lyso",
|
||||
.file_prefix = "lyso1/dir/file",
|
||||
.sample_name = "test_sample",
|
||||
.file_prefix = "test_sample/dir/file",
|
||||
.images_per_file = 12345,
|
||||
.channels = {"default", "sc2"},
|
||||
.detector_description = "EIGER 16M",
|
||||
|
||||
@@ -365,8 +365,8 @@ TEST_CASE("DiffractionExperiment_SampleName", "[DiffractionExperiment]") {
|
||||
REQUIRE_NOTHROW(x.SampleName(""));
|
||||
REQUIRE(x.GetSampleName().empty());
|
||||
|
||||
REQUIRE_NOTHROW(x.SampleName("lyso1"));
|
||||
REQUIRE(x.GetSampleName() == "lyso1");
|
||||
REQUIRE_NOTHROW(x.SampleName("test_sample"));
|
||||
REQUIRE(x.GetSampleName() == "test_sample");
|
||||
}
|
||||
|
||||
TEST_CASE("DiffractionExperiment_SaveCalibration", "[DiffractionExperiment]") {
|
||||
|
||||
+5
-100
@@ -514,10 +514,10 @@ TEST_CASE("HDF5Writer_Socket", "[HDF5][Full]") {
|
||||
x.FrameTime(std::chrono::microseconds(1000), std::chrono::microseconds(100));
|
||||
|
||||
DatasetSettings d;
|
||||
d.FilePrefix("run0345_lysozyme_acq").ImagesPerTrigger(5).ImagesPerFile(2).Compression(CompressionAlgorithm::NO_COMPRESSION)
|
||||
d.FilePrefix("run0345_acq").ImagesPerTrigger(5).ImagesPerFile(2).Compression(CompressionAlgorithm::NO_COMPRESSION)
|
||||
.HeaderAppendix(R"({"z":567})"_json).DetectorDistance_mm(155).BeamX_pxl(1606.62).BeamY_pxl(1669.59)
|
||||
.PhotonEnergy_keV(12.07).SetUnitCell(UnitCell{.a = 97, .b = 97, .c = 38, .alpha= 90, .beta = 90, .gamma = 90})
|
||||
.SpaceGroupNumber(96).RunNumber(345).ExperimentGroup("p12345").SampleName("lysozyme").RunName("run1");
|
||||
.SpaceGroupNumber(96).RunNumber(345).ExperimentGroup("p12345").SampleName("test_sample").RunName("run1");
|
||||
|
||||
x.ImportDatasetSettings(d).OverwriteExistingFiles(true);
|
||||
std::vector<SpotToSave> spots;
|
||||
@@ -550,7 +550,7 @@ TEST_CASE("HDF5Writer_Socket", "[HDF5][Full]") {
|
||||
REQUIRE(s.Receive(msg, true));
|
||||
|
||||
j = nlohmann::json::parse(std::string((char *) msg.data(), msg.size()));
|
||||
REQUIRE(j["filename"] == "run0345_lysozyme_acq_data_000001.h5");
|
||||
REQUIRE(j["filename"] == "run0345_acq_data_000001.h5");
|
||||
REQUIRE(j["file_number"] == 1);
|
||||
REQUIRE(j["nimages"] == 2);
|
||||
REQUIRE(j["incident_energy_eV"] == Catch::Approx(x.GetIncidentEnergy_keV() * 1000.0));
|
||||
@@ -564,7 +564,7 @@ TEST_CASE("HDF5Writer_Socket", "[HDF5][Full]") {
|
||||
|
||||
REQUIRE(s.Receive(msg, true));
|
||||
j = nlohmann::json::parse(std::string((char *) msg.data(), msg.size()));
|
||||
REQUIRE(j["filename"] == "run0345_lysozyme_acq_data_000002.h5");
|
||||
REQUIRE(j["filename"] == "run0345_acq_data_000002.h5");
|
||||
REQUIRE(j["file_number"] == 2);
|
||||
REQUIRE(j["nimages"] == 2);
|
||||
REQUIRE(j.contains("user_data"));
|
||||
@@ -572,7 +572,7 @@ TEST_CASE("HDF5Writer_Socket", "[HDF5][Full]") {
|
||||
|
||||
REQUIRE(s.Receive(msg, true));
|
||||
j = nlohmann::json::parse(std::string((char *) msg.data(), msg.size()));
|
||||
REQUIRE(j["filename"] == "run0345_lysozyme_acq_data_000003.h5");
|
||||
REQUIRE(j["filename"] == "run0345_acq_data_000003.h5");
|
||||
REQUIRE(j["file_number"] == 3);
|
||||
REQUIRE(j["nimages"] == 1);
|
||||
REQUIRE(j.contains("user_data"));
|
||||
@@ -1255,101 +1255,6 @@ TEST_CASE("HDF5Writer_Link_zero_images", "[HDF5][Full]") {
|
||||
REQUIRE (H5Fget_obj_count(H5F_OBJ_ALL, H5F_OBJ_ALL) == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("FileWriter_CBF_16bit", "[HDF5][Full]") {
|
||||
{
|
||||
DetectorSetup det = DetJF4M("DET1");
|
||||
det.SerialNumber("1");
|
||||
DiffractionExperiment x(det);
|
||||
std::vector<SpotToSave> spots;
|
||||
|
||||
x.FilePrefix("lyso_cbf_16").ImagesPerTrigger(5).ImagesPerFile(2).Compression(CompressionAlgorithm::NO_COMPRESSION);
|
||||
x.PixelSigned(true).BitDepthImage(16);
|
||||
x.SetFileWriterFormat(FileWriterFormat::CBF);
|
||||
StartMessage start_message;
|
||||
x.FillMessage(start_message);
|
||||
|
||||
FileWriter file_set(start_message);
|
||||
std::vector<int16_t> image(x.GetPixelsNum(), 45);
|
||||
|
||||
for (int i = 0; i < x.GetImageNum(); i++) {
|
||||
DataMessage message{};
|
||||
message.image = CompressedImage(image, x.GetXPixelsNum(), x.GetYPixelsNum());
|
||||
message.spots = spots;
|
||||
message.number = i;
|
||||
|
||||
REQUIRE_NOTHROW(file_set.Write(message));
|
||||
}
|
||||
|
||||
auto v = file_set.Finalize();
|
||||
|
||||
REQUIRE(!file_set.GetZMQAddr());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("FileWriter_CBF", "[HDF5][Full]") {
|
||||
{
|
||||
DetectorSetup det = DetJF4M("DET1");
|
||||
det.SerialNumber("1");
|
||||
DiffractionExperiment x(det);
|
||||
std::vector<SpotToSave> spots;
|
||||
|
||||
x.FilePrefix("lyso_cbf").ImagesPerTrigger(5).ImagesPerFile(2).Compression(CompressionAlgorithm::NO_COMPRESSION);
|
||||
x.PixelSigned(false).BitDepthImage(32);
|
||||
x.SetFileWriterFormat(FileWriterFormat::CBF);
|
||||
StartMessage start_message;
|
||||
x.FillMessage(start_message);
|
||||
|
||||
FileWriter file_set(start_message);
|
||||
std::vector<uint32_t> image(x.GetPixelsNum());
|
||||
|
||||
for (int i = 0; i < image.size(); i++)
|
||||
image[i] = i;
|
||||
|
||||
for (int i = 0; i < x.GetImageNum(); i++) {
|
||||
DataMessage message{};
|
||||
message.image = CompressedImage(image, x.GetXPixelsNum(), x.GetYPixelsNum());
|
||||
message.spots = spots;
|
||||
message.number = i;
|
||||
|
||||
REQUIRE_NOTHROW(file_set.Write(message));
|
||||
}
|
||||
|
||||
auto v = file_set.Finalize();
|
||||
|
||||
REQUIRE(!file_set.GetZMQAddr());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("FileWriter_TIFF", "[HDF5][Full]") {
|
||||
{
|
||||
DetectorSetup det = DetJF4M("DET1");
|
||||
det.SerialNumber("1");
|
||||
DiffractionExperiment x(det);
|
||||
std::vector<SpotToSave> spots;
|
||||
|
||||
x.FilePrefix("lyso_tiff").ImagesPerTrigger(5).ImagesPerFile(2).Compression(CompressionAlgorithm::NO_COMPRESSION);
|
||||
x.SetFileWriterFormat(FileWriterFormat::TIFF);
|
||||
StartMessage start_message;
|
||||
x.FillMessage(start_message);
|
||||
|
||||
FileWriter file_set(start_message);
|
||||
std::vector<int16_t> image(x.GetPixelsNum(), 45);
|
||||
|
||||
for (int i = 0; i < x.GetImageNum(); i++) {
|
||||
DataMessage message{};
|
||||
message.image = CompressedImage(image, x.GetXPixelsNum(), x.GetYPixelsNum());
|
||||
message.spots = spots;
|
||||
message.number = i;
|
||||
|
||||
REQUIRE_NOTHROW(file_set.Write(message));
|
||||
}
|
||||
|
||||
auto v = file_set.Finalize();
|
||||
|
||||
REQUIRE(!file_set.GetZMQAddr());
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("HDF5Objects_VDS_reverse_contiguous", "[HDF5][Unit]") {
|
||||
{
|
||||
RegisterHDF5Filter();
|
||||
|
||||
+43
-43
@@ -246,14 +246,14 @@ TEST_CASE("FFTIndexer","[Indexing]") {
|
||||
logger.Info("Time: {} ms", std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count());
|
||||
}
|
||||
|
||||
TEST_CASE("PostIndexingRefinement_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]") {
|
||||
Logger logger("PostIndexingRefinement_MultiLattice_TwoLysozymes_BraggPrediction");
|
||||
TEST_CASE("PostIndexingRefinement_MultiLattice_TwoCrystals_BraggPrediction","[Indexing]") {
|
||||
Logger logger("PostIndexingRefinement_MultiLattice_TwoCrystals_BraggPrediction");
|
||||
|
||||
UnitCell lysozyme_uc{36.9, 78.95, 78.95, 90.0, 90.0, 90.0};
|
||||
CrystalLattice lysozyme_base(lysozyme_uc);
|
||||
UnitCell tetragonal_uc{36.9, 78.95, 78.95, 90.0, 90.0, 90.0};
|
||||
CrystalLattice tetragonal_base(tetragonal_uc);
|
||||
|
||||
CrystalLattice lysozyme_rot_1 = RotateLattice(lysozyme_base, MakeRotation(10.0f, 18.0f, 27.0f));
|
||||
CrystalLattice lysozyme_rot_2 = RotateLattice(lysozyme_base, MakeRotation(66.0f, -14.0f, 101.0f));
|
||||
CrystalLattice crystal_rot_1 = RotateLattice(tetragonal_base, MakeRotation(10.0f, 18.0f, 27.0f));
|
||||
CrystalLattice crystal_rot_2 = RotateLattice(tetragonal_base, MakeRotation(66.0f, -14.0f, 101.0f));
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.DetectorDistance_mm(75)
|
||||
@@ -272,8 +272,8 @@ TEST_CASE("PostIndexingRefinement_MultiLattice_TwoLysozymes_BraggPrediction","[I
|
||||
.mosaicity_multiplier = 4.0f
|
||||
};
|
||||
|
||||
const auto spots_1 = BuildPredictedReciprocalSpots(experiment, lysozyme_rot_1, pred_settings);
|
||||
const auto spots_2 = BuildPredictedReciprocalSpots(experiment, lysozyme_rot_2, pred_settings);
|
||||
const auto spots_1 = BuildPredictedReciprocalSpots(experiment, crystal_rot_1, pred_settings);
|
||||
const auto spots_2 = BuildPredictedReciprocalSpots(experiment, crystal_rot_2, pred_settings);
|
||||
|
||||
logger.Info("Predicted spots lattice 1: {}", spots_1.size());
|
||||
logger.Info("Predicted spots lattice 2: {}", spots_2.size());
|
||||
@@ -300,9 +300,9 @@ TEST_CASE("PostIndexingRefinement_MultiLattice_TwoLysozymes_BraggPrediction","[I
|
||||
oCell(idx * 3 + 2, 2) = lattice.Vec2().z;
|
||||
};
|
||||
|
||||
put_lattice(0, lysozyme_rot_1);
|
||||
put_lattice(1, lysozyme_rot_2);
|
||||
put_lattice(2, lysozyme_rot_1); // duplicate to verify overlap rejection
|
||||
put_lattice(0, crystal_rot_1);
|
||||
put_lattice(1, crystal_rot_2);
|
||||
put_lattice(2, crystal_rot_1); // duplicate to verify overlap rejection
|
||||
|
||||
// Keep bootstrap scores tiny to disable candidate drift in iterative re-fitting.
|
||||
scores(0) = 1e-6f;
|
||||
@@ -324,12 +324,12 @@ TEST_CASE("PostIndexingRefinement_MultiLattice_TwoLysozymes_BraggPrediction","[I
|
||||
|
||||
REQUIRE(refined.size() >= 2);
|
||||
|
||||
int lysozyme_count = 0;
|
||||
int crystal_count = 0;
|
||||
for (const auto &lattice : refined) {
|
||||
if (MatchesCellLengths(lattice.GetUnitCell(), lysozyme_uc))
|
||||
++lysozyme_count;
|
||||
if (MatchesCellLengths(lattice.GetUnitCell(), tetragonal_uc))
|
||||
++crystal_count;
|
||||
}
|
||||
CHECK(lysozyme_count >= 2);
|
||||
CHECK(crystal_count >= 2);
|
||||
|
||||
int64_t count_0 = 0;
|
||||
int64_t count_1 = 0;
|
||||
@@ -346,14 +346,14 @@ TEST_CASE("PostIndexingRefinement_MultiLattice_TwoLysozymes_BraggPrediction","[I
|
||||
}
|
||||
|
||||
/*
|
||||
TEST_CASE("FFTIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]") {
|
||||
Logger logger("FFTIndexer_MultiLattice_TwoLysozymes_BraggPrediction");
|
||||
TEST_CASE("FFTIndexer_MultiLattice_TwoCrystals_BraggPrediction","[Indexing]") {
|
||||
Logger logger("FFTIndexer_MultiLattice_TwoCrystals_BraggPrediction");
|
||||
|
||||
UnitCell lysozyme_uc{36.9, 78.95, 78.95, 90.0, 90.0, 90.0};
|
||||
CrystalLattice lysozyme_base(lysozyme_uc);
|
||||
UnitCell tetragonal_uc{36.9, 78.95, 78.95, 90.0, 90.0, 90.0};
|
||||
CrystalLattice tetragonal_base(tetragonal_uc);
|
||||
|
||||
CrystalLattice lysozyme_rot_1 = RotateLattice(lysozyme_base, MakeRotation(10.0f, 18.0f, 27.0f));
|
||||
CrystalLattice lysozyme_rot_2 = RotateLattice(lysozyme_base, MakeRotation(66.0f, -14.0f, 101.0f));
|
||||
CrystalLattice crystal_rot_1 = RotateLattice(tetragonal_base, MakeRotation(10.0f, 18.0f, 27.0f));
|
||||
CrystalLattice crystal_rot_2 = RotateLattice(tetragonal_base, MakeRotation(66.0f, -14.0f, 101.0f));
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.DetectorDistance_mm(75)
|
||||
@@ -372,8 +372,8 @@ TEST_CASE("FFTIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]") {
|
||||
.mosaicity_multiplier = 4.0f
|
||||
};
|
||||
|
||||
auto spots_1 = BuildPredictedReciprocalSpots(experiment, lysozyme_rot_1, pred_settings);
|
||||
auto spots_2 = BuildPredictedReciprocalSpots(experiment, lysozyme_rot_2, pred_settings);
|
||||
auto spots_1 = BuildPredictedReciprocalSpots(experiment, crystal_rot_1, pred_settings);
|
||||
auto spots_2 = BuildPredictedReciprocalSpots(experiment, crystal_rot_2, pred_settings);
|
||||
|
||||
logger.Info("Predicted spots lattice 1: {}", spots_1.size());
|
||||
logger.Info("Predicted spots lattice 2: {}", spots_2.size());
|
||||
@@ -389,7 +389,7 @@ TEST_CASE("FFTIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]") {
|
||||
.FFT_HighResolution_A(2.0f)
|
||||
.FFT_NumVectors(1024);
|
||||
experiment.ImportIndexingSettings(settings)
|
||||
.SetUnitCell(lysozyme_uc);
|
||||
.SetUnitCell(tetragonal_uc);
|
||||
|
||||
REQUIRE(experiment.GetIndexingAlgorithm() == IndexingAlgorithmEnum::FFT);
|
||||
|
||||
@@ -404,20 +404,20 @@ TEST_CASE("FFTIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]") {
|
||||
|
||||
const float tolerance = experiment.GetIndexingSettings().GetTolerance();
|
||||
|
||||
int lysozyme_count = 0;
|
||||
int crystal_count = 0;
|
||||
for (size_t i = 0; i < result.lattice.size(); ++i) {
|
||||
auto uc = result.lattice[i].GetUnitCell();
|
||||
int64_t indexed_count = 0;
|
||||
BuildIndexedMask(spots, result.lattice[i], tolerance, indexed_count);
|
||||
logger.Info("Lattice {} cell ({:.1f} {:.1f} {:.1f}) indexes {} spots",
|
||||
i, uc.a, uc.b, uc.c, indexed_count);
|
||||
if (MatchesCellLengths(uc, lysozyme_uc))
|
||||
++lysozyme_count;
|
||||
if (MatchesCellLengths(uc, tetragonal_uc))
|
||||
++crystal_count;
|
||||
}
|
||||
|
||||
CHECK(lysozyme_count >= 2);
|
||||
CHECK(crystal_count >= 2);
|
||||
|
||||
// Verify the two best lysozyme lattices are distinct (low overlap)
|
||||
// Verify the two best crystal lattices are distinct (low overlap)
|
||||
if (result.lattice.size() >= 2) {
|
||||
int64_t count_0 = 0, count_1 = 0;
|
||||
auto mask_0 = BuildIndexedMask(spots, result.lattice[0], tolerance, count_0);
|
||||
@@ -429,14 +429,14 @@ TEST_CASE("FFTIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("FFBIDXIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]") {
|
||||
Logger logger("FFBIDXIndexer_MultiLattice_TwoLysozymes_BraggPrediction");
|
||||
TEST_CASE("FFBIDXIndexer_MultiLattice_TwoCrystals_BraggPrediction","[Indexing]") {
|
||||
Logger logger("FFBIDXIndexer_MultiLattice_TwoCrystals_BraggPrediction");
|
||||
|
||||
UnitCell lysozyme_uc{36.9, 78.95, 78.95, 90.0, 90.0, 90.0};
|
||||
CrystalLattice lysozyme_base(lysozyme_uc);
|
||||
UnitCell tetragonal_uc{36.9, 78.95, 78.95, 90.0, 90.0, 90.0};
|
||||
CrystalLattice tetragonal_base(tetragonal_uc);
|
||||
|
||||
CrystalLattice lysozyme_rot_1 = RotateLattice(lysozyme_base, MakeRotation(10.0f, 18.0f, 27.0f));
|
||||
CrystalLattice lysozyme_rot_2 = RotateLattice(lysozyme_base, MakeRotation(66.0f, -14.0f, 101.0f));
|
||||
CrystalLattice crystal_rot_1 = RotateLattice(tetragonal_base, MakeRotation(10.0f, 18.0f, 27.0f));
|
||||
CrystalLattice crystal_rot_2 = RotateLattice(tetragonal_base, MakeRotation(66.0f, -14.0f, 101.0f));
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.DetectorDistance_mm(75)
|
||||
@@ -455,8 +455,8 @@ TEST_CASE("FFBIDXIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]"
|
||||
.mosaicity_multiplier = 4.0f
|
||||
};
|
||||
|
||||
auto spots_1 = BuildPredictedReciprocalSpots(experiment, lysozyme_rot_1, pred_settings);
|
||||
auto spots_2 = BuildPredictedReciprocalSpots(experiment, lysozyme_rot_2, pred_settings);
|
||||
auto spots_1 = BuildPredictedReciprocalSpots(experiment, crystal_rot_1, pred_settings);
|
||||
auto spots_2 = BuildPredictedReciprocalSpots(experiment, crystal_rot_2, pred_settings);
|
||||
|
||||
logger.Info("Predicted spots lattice 1: {}", spots_1.size());
|
||||
logger.Info("Predicted spots lattice 2: {}", spots_2.size());
|
||||
@@ -466,7 +466,7 @@ TEST_CASE("FFBIDXIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]"
|
||||
spots.insert(spots.end(), spots_1.begin(), spots_1.end());
|
||||
spots.insert(spots.end(), spots_2.begin(), spots_2.end());
|
||||
|
||||
experiment.SetUnitCell(lysozyme_uc);
|
||||
experiment.SetUnitCell(tetragonal_uc);
|
||||
experiment.IndexingAlgorithm(IndexingAlgorithmEnum::FFBIDX);
|
||||
|
||||
REQUIRE(experiment.GetIndexingAlgorithm() == IndexingAlgorithmEnum::FFBIDX);
|
||||
@@ -482,20 +482,20 @@ TEST_CASE("FFBIDXIndexer_MultiLattice_TwoLysozymes_BraggPrediction","[Indexing]"
|
||||
|
||||
const float tolerance = experiment.GetIndexingSettings().GetTolerance();
|
||||
|
||||
int lysozyme_count = 0;
|
||||
int crystal_count = 0;
|
||||
for (size_t i = 0; i < result.lattice.size(); ++i) {
|
||||
auto uc = result.lattice[i].GetUnitCell();
|
||||
int64_t indexed_count = 0;
|
||||
BuildIndexedMask(spots, result.lattice[i], tolerance, indexed_count);
|
||||
logger.Info("Lattice {} cell ({:.1f} {:.1f} {:.1f}) indexes {} spots",
|
||||
i, uc.a, uc.b, uc.c, indexed_count);
|
||||
if (MatchesCellLengths(uc, lysozyme_uc))
|
||||
++lysozyme_count;
|
||||
if (MatchesCellLengths(uc, tetragonal_uc))
|
||||
++crystal_count;
|
||||
}
|
||||
|
||||
CHECK(lysozyme_count >= 2);
|
||||
CHECK(crystal_count >= 2);
|
||||
|
||||
// Verify the two best lysozyme lattices are distinct (low overlap)
|
||||
// Verify the two best crystal lattices are distinct (low overlap)
|
||||
if (result.lattice.size() >= 2) {
|
||||
int64_t count_0 = 0, count_1 = 0;
|
||||
auto mask_0 = BuildIndexedMask(spots, result.lattice[0], tolerance, count_0);
|
||||
|
||||
@@ -1473,7 +1473,7 @@ TEST_CASE("JFJochReader_InstrumentMetadata_Sample_RingCurrent", "[HDF5][Full]")
|
||||
|
||||
InstrumentMetadata metadata;
|
||||
metadata.InstrumentName("PXI").SourceName("SLS");
|
||||
x.ImportInstrumentMetadata(metadata).SampleName("Lysozyme").RingCurrent_mA(399.5); // 0.3995 A
|
||||
x.ImportInstrumentMetadata(metadata).SampleName("test_sample").RingCurrent_mA(399.5); // 0.3995 A
|
||||
x.TotalFlux(1e7).AttenuatorTransmission(0.56);
|
||||
x.DetectIceRings(false);
|
||||
|
||||
@@ -1511,7 +1511,7 @@ TEST_CASE("JFJochReader_InstrumentMetadata_Sample_RingCurrent", "[HDF5][Full]")
|
||||
CHECK(dataset->experiment.GetTotalFlux() == Catch::Approx(1e7));
|
||||
|
||||
// Sample name
|
||||
CHECK(dataset->experiment.GetSampleName() == "Lysozyme");
|
||||
CHECK(dataset->experiment.GetSampleName() == "test_sample");
|
||||
|
||||
// Ring current read back in mA; allow small fp tolerance
|
||||
CHECK(dataset->experiment.GetRingCurrent_mA().has_value());
|
||||
|
||||
@@ -21,7 +21,7 @@ TEST_CASE("JFJochReceiverLite", "[JFJochReceiver]") {
|
||||
DiffractionExperiment experiment(DetDECTRIS(2068, 2164, "Test", {}));
|
||||
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_lite").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
.FilePrefix("crystal_test_lite").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
@@ -99,7 +99,7 @@ TEST_CASE("JFJochReceiverLite", "[JFJochReceiver]") {
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochReceiverLite_Cancel", "[JFJochReceiver]") {
|
||||
Logger logger("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index");
|
||||
Logger logger("JFJochReceiverLite_Cancel");
|
||||
|
||||
RegisterHDF5Filter();
|
||||
|
||||
@@ -108,7 +108,7 @@ TEST_CASE("JFJochReceiverLite_Cancel", "[JFJochReceiver]") {
|
||||
DiffractionExperiment experiment(DetDECTRIS(2068, 2164, "Test", {}));
|
||||
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_lite").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
.FilePrefix("crystal_test_lite").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "../image_pusher/TCPStreamPusher.h"
|
||||
#include "../image_puller/TCPImagePuller.h"
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -26,7 +26,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index", "[JFJochReceiver]
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
experiment.SampleTemperature_K(123.0).RingCurrent_mA(115);
|
||||
@@ -92,7 +92,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index", "[JFJochReceiver]
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -107,7 +107,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index", "[JFJochReceiver]
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_refinement", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -116,7 +116,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement", "[JFJo
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_refinement").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
.FilePrefix("crystal_test_refinement").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90})
|
||||
@@ -184,7 +184,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement", "[JFJo
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -199,7 +199,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement", "[JFJo
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement_tetragonal", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_refinement_tetragonal", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -208,7 +208,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement_tetragon
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_refinement_tetragonal").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
.FilePrefix("crystal_test_refinement_tetragonal").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 78.95, .b = 78.95, .c = 36.9, .alpha = 90, .beta = 90, .gamma = 90})
|
||||
@@ -277,7 +277,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement_tetragon
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -292,7 +292,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_refinement_tetragon
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_index_and_integrate", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_index_and_integrate", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -301,7 +301,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_index_and_integrate", "[JFJoc
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
PixelMask pixel_mask(experiment);
|
||||
@@ -366,7 +366,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_index_and_integrate", "[JFJoc
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -388,7 +388,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_index_and_integrate", "[JFJoc
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_index_and_integrate_no_spots", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_index_and_integrate_no_spots", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -397,7 +397,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_index_and_integrate_no_spots"
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
PixelMask pixel_mask(experiment);
|
||||
@@ -465,7 +465,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_index_and_integrate_no_spots"
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_azint_2d", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_azint_2d", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -474,7 +474,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_azint_2d", "[JFJochReceiver]") {
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_azim_2d").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test_azim_2d").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
PixelMask pixel_mask(experiment);
|
||||
@@ -542,7 +542,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_azint_2d", "[JFJochReceiver]") {
|
||||
REQUIRE(azim_plot.GetPlots()[0].z.size() == 120 * 16);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_FFT", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -551,7 +551,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT", "[JFJochRecei
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_fft").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.FilePrefix("crystal_test_fft").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.IndexingAlgorithm(IndexingAlgorithmEnum::FFT);
|
||||
@@ -616,7 +616,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT", "[JFJochRecei
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -631,7 +631,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT", "[JFJochRecei
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFTW", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_FFTW", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -640,7 +640,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFTW", "[JFJochRece
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_fftw").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.FilePrefix("crystal_test_fftw").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.IndexingAlgorithm(IndexingAlgorithmEnum::FFTW);
|
||||
@@ -705,7 +705,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFTW", "[JFJochRece
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -720,7 +720,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFTW", "[JFJochRece
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_reference", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_FFT_reference", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -729,7 +729,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_reference", "[J
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_fft_ref").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.FilePrefix("crystal_test_fft_ref").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.IndexingAlgorithm(IndexingAlgorithmEnum::FFT)
|
||||
@@ -795,7 +795,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_reference", "[J
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -810,7 +810,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_reference", "[J
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_wrong_reference", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_FFT_wrong_reference", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -819,7 +819,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_wrong_reference
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_fft_wrongref").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.FilePrefix("crystal_test_fft_wrongref").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS)
|
||||
.OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.IndexingAlgorithm(IndexingAlgorithmEnum::FFT)
|
||||
@@ -885,7 +885,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_wrong_reference
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -900,7 +900,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_FFT_wrong_reference
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_grid", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_grid", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -916,7 +916,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_grid", "[JFJochRece
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.UseInternalPacketGenerator(true).ImagesPerFile(2).ImportDatasetSettings(dataset_settings)
|
||||
.FilePrefix("lyso_test_grid").JungfrauConvPhotonCnt(false)
|
||||
.FilePrefix("crystal_test_grid").JungfrauConvPhotonCnt(false)
|
||||
.SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true);
|
||||
PixelMask pixel_mask(experiment);
|
||||
|
||||
@@ -1010,7 +1010,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_grid", "[JFJochRece
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_32", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_32", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -1019,7 +1019,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_32", "[JFJochReceiv
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_32").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxLegacy).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test_32").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxLegacy).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4).BitDepthImage(32).PixelSigned(true)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
PixelMask pixel_mask(experiment);
|
||||
@@ -1082,7 +1082,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_32", "[JFJochReceiv
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_1.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
@@ -1097,7 +1097,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_32", "[JFJochReceiv
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_min_pix_2", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_ZMQ_crystal_spot_and_index_min_pix_2", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -1106,7 +1106,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_min_pix_2", "[JFJoc
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).OverwriteExistingFiles(true)
|
||||
.FilePrefix("lyso_test_min_pix_2").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
.FilePrefix("crystal_test_min_pix_2").JungfrauConvPhotonCnt(false).SetFileWriterFormat(
|
||||
FileWriterFormat::NXmxVDS)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90})
|
||||
@@ -1164,7 +1164,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_min_pix_2", "[JFJoc
|
||||
};
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_min_pix_2.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_min_pix_2.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
REQUIRE_NOTHROW(jpeg_indexed = service.GetJPEGFromBuffer(jpeg_settings, ImageBuffer::MaxIndexedImage));
|
||||
@@ -1181,7 +1181,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_lysozyme_spot_and_index_min_pix_2", "[JFJoc
|
||||
TEST_CASE("GenerateResolutionMap") {
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true)
|
||||
.FilePrefix("lyso_test").JungfrauConvPhotonCnt(false)
|
||||
.FilePrefix("crystal_test").JungfrauConvPhotonCnt(false)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
|
||||
@@ -1211,7 +1211,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_ROI", "[JFJochReceiver]") {
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true)
|
||||
.FilePrefix("lyso_test_roi").JungfrauConvPhotonCnt(false)
|
||||
.FilePrefix("crystal_test_roi").JungfrauConvPhotonCnt(false)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90})
|
||||
.SetFileWriterFormat(FileWriterFormat::NXmxVDS).PixelSigned(true).OverwriteExistingFiles(true);
|
||||
@@ -1297,7 +1297,7 @@ TEST_CASE("JFJochIntegrationTest_ZMQ_ROI", "[JFJochReceiver]") {
|
||||
REQUIRE_NOTHROW(jpeg = service.GetJPEGFromBuffer(jpeg_settings));
|
||||
|
||||
REQUIRE(!jpeg.empty());
|
||||
std::ofstream f("lyso_processing_test_roi.jpeg", std::ios::binary);
|
||||
std::ofstream f("crystal_processing_test_roi.jpeg", std::ios::binary);
|
||||
f.write(jpeg.data(), jpeg.size());
|
||||
|
||||
auto plot = service.GetDataProcessingPlot(PlotRequest{.type = PlotType::ROISum, .binning = 1});
|
||||
@@ -1543,41 +1543,6 @@ TEST_CASE("JFJochIntegrationTest_HDF5FilePusher_republish", "[JFJochReceiver]")
|
||||
REQUIRE(!pull_socket.Receive(msg, true));
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_HDF5FilePusher_cbf", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
|
||||
const uint16_t nthreads = 4;
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true)
|
||||
.FilePrefix("cbf_test").JungfrauConvPhotonCnt(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetFileWriterFormat(FileWriterFormat::CBF);
|
||||
|
||||
JFCalibration calibration(experiment);
|
||||
PixelMask pixel_mask(experiment);
|
||||
|
||||
// Setup acquisition device
|
||||
AcquisitionDeviceGroup aq_devices;
|
||||
aq_devices.Add(std::make_unique<HLSSimulatedDevice>(0, 64));
|
||||
|
||||
HDF5FilePusher pusher;
|
||||
|
||||
JFJochReceiverService service(aq_devices, logger, pusher);
|
||||
service.NumThreads(nthreads);
|
||||
service.Indexing(experiment.GetIndexingSettings());
|
||||
|
||||
service.Start(experiment, pixel_mask, &calibration);
|
||||
auto receiver_out = service.Stop();
|
||||
|
||||
CHECK(receiver_out.efficiency == 1.0);
|
||||
CHECK(receiver_out.status.images_collected == 5);
|
||||
CHECK(receiver_out.status.images_sent == 5);
|
||||
CHECK(!receiver_out.status.cancelled);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_HDF5FilePusher_Raw", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
@@ -1612,7 +1577,7 @@ TEST_CASE("JFJochIntegrationTest_HDF5FilePusher_Raw", "[JFJochReceiver]") {
|
||||
CHECK(!receiver_out.status.cancelled);
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_TCP_lysozyme_no_processing", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_TCP_crystal_no_processing", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -1621,7 +1586,7 @@ TEST_CASE("JFJochIntegrationTest_TCP_lysozyme_no_processing", "[JFJochReceiver]"
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_tcp_no_processing").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test_tcp_no_processing").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
experiment.SampleTemperature_K(123.0).RingCurrent_mA(115);
|
||||
@@ -1689,7 +1654,7 @@ TEST_CASE("JFJochIntegrationTest_TCP_lysozyme_no_processing", "[JFJochReceiver]"
|
||||
CHECK(ack == experiment.GetImageNum());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_TCP_lysozyme_spot_and_index", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_TCP_crystal_spot_and_index", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -1698,7 +1663,7 @@ TEST_CASE("JFJochIntegrationTest_TCP_lysozyme_spot_and_index", "[JFJochReceiver]
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_tcp").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test_tcp").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxVDS).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
experiment.SampleTemperature_K(123.0).RingCurrent_mA(115);
|
||||
@@ -1831,7 +1796,7 @@ TEST_CASE("JFJochIntegrationTest_TCP_calibration", "[JFJochReceiver]") {
|
||||
REQUIRE_NOTHROW(writer_future.get());
|
||||
}
|
||||
|
||||
TEST_CASE("JFJochIntegrationTest_TCP_lysozyme_spot_and_index_single_file", "[JFJochReceiver]") {
|
||||
TEST_CASE("JFJochIntegrationTest_TCP_crystal_spot_and_index_single_file", "[JFJochReceiver]") {
|
||||
Logger logger(Catch::getResultCapture().getCurrentTestName());
|
||||
|
||||
RegisterHDF5Filter();
|
||||
@@ -1840,7 +1805,7 @@ TEST_CASE("JFJochIntegrationTest_TCP_lysozyme_spot_and_index_single_file", "[JFJ
|
||||
|
||||
DiffractionExperiment experiment(DetJF4M());
|
||||
experiment.ImagesPerTrigger(5).NumTriggers(1).UseInternalPacketGenerator(true).ImagesPerFile(2)
|
||||
.FilePrefix("lyso_test_tcp_single_file").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxIntegrated).OverwriteExistingFiles(true)
|
||||
.FilePrefix("crystal_test_tcp_single_file").JungfrauConvPhotonCnt(false).SetFileWriterFormat(FileWriterFormat::NXmxIntegrated).OverwriteExistingFiles(true)
|
||||
.DetectorDistance_mm(75).BeamY_pxl(1136).BeamX_pxl(1090).IncidentEnergy_keV(12.4)
|
||||
.SetUnitCell(UnitCell{.a = 36.9, .b = 78.95, .c = 78.95, .alpha =90, .beta = 90, .gamma = 90});
|
||||
experiment.SampleTemperature_K(123.0).RingCurrent_mA(115);
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace {
|
||||
public:
|
||||
using Catch::EventListenerBase::EventListenerBase;
|
||||
void testRunStarting(Catch::TestRunInfo const &) override {
|
||||
const bool rot = jfjoch_test::LargeDataFile("lyso_rotation_master.h5").has_value();
|
||||
const bool rot = jfjoch_test::LargeDataFile("rotation_master.h5").has_value();
|
||||
std::cout << "[jfjoch_test] large dataset in " << jfjoch_test::LargeDataDir()
|
||||
<< ": rotation=" << (rot ? "yes" : "no")
|
||||
<< " ([large] tests skip when absent)" << std::endl;
|
||||
@@ -40,10 +40,10 @@ namespace {
|
||||
|
||||
CATCH_REGISTER_LISTENER(LargeDataListener)
|
||||
|
||||
TEST_CASE("Rugnux_LysoRotation", "[large]") {
|
||||
const auto master = jfjoch_test::LargeDataFile("lyso_rotation_master.h5");
|
||||
TEST_CASE("Rugnux_Rotation", "[large]") {
|
||||
const auto master = jfjoch_test::LargeDataFile("rotation_master.h5");
|
||||
if (!master)
|
||||
SKIP("lyso_rotation_master.h5 not available (git-lfs data not pulled)");
|
||||
SKIP("rotation_master.h5 not available (git-lfs data not pulled)");
|
||||
|
||||
RegisterHDF5Filter();
|
||||
JFJochHDF5Reader reader;
|
||||
|
||||
@@ -151,7 +151,7 @@ TEST_CASE("RugnuxCommandLine_Full", "[process]") {
|
||||
config.rotation_indexing_image_count = 30;
|
||||
config.spot_finding = DiffractionExperiment::DefaultDataProcessingSettings();
|
||||
|
||||
const std::string cmd = RugnuxCommandLine(config, x, "/data/lyso_master.h5");
|
||||
const std::string cmd = RugnuxCommandLine(config, x, "/data/test_master.h5");
|
||||
CHECK(cmd.rfind("rugnux", 0) == 0);
|
||||
CHECK(cmd.find("-N 8") != std::string::npos);
|
||||
CHECK(cmd.find("-e 500") != std::string::npos);
|
||||
@@ -162,7 +162,7 @@ TEST_CASE("RugnuxCommandLine_Full", "[process]") {
|
||||
// would not re-parse (getopt would leave 30 as a positional and drop the count).
|
||||
CHECK(cmd.find("-R30") != std::string::npos);
|
||||
CHECK(cmd.find("-R 30") == std::string::npos);
|
||||
CHECK(cmd.find("/data/lyso_master.h5") != std::string::npos);
|
||||
CHECK(cmd.find("/data/test_master.h5") != std::string::npos);
|
||||
}
|
||||
|
||||
TEST_CASE("RugnuxCommandLine_AzInt", "[process]") {
|
||||
|
||||
@@ -150,7 +150,7 @@ TEST_CASE("SearchSpaceGroup detects synthetic space groups") {
|
||||
|
||||
// Regression: a real screw axis whose systematically-absent reflections carry a genuinely weak
|
||||
// intensity but an UNDER-estimated sigma (so their I/sigma clears the "present" cut) must still be
|
||||
// found. Reproduces the monoclinic 2_1 miss on EP_cs_02-10 / EP_cs_01-17, where the merged sigmas on
|
||||
// found. Reproduces a monoclinic 2_1 miss on weakly-diffracting monoclinic data, where the merged sigmas on
|
||||
// the 0k0-odd reflections were ~2x too small and faked screw-axis violations. The E^2 intensity gate
|
||||
// (present_e_squared) is what keeps those reflections classified absent.
|
||||
TEST_CASE("SearchSpaceGroup finds a screw axis despite under-estimated sigmas on absent reflections") {
|
||||
|
||||
@@ -538,10 +538,14 @@ TEST_CASE("XtalOptimizer_rotation") {
|
||||
}
|
||||
}
|
||||
|
||||
// Seed slightly perturbed geometry and lattice; provide rotation axis for refinement
|
||||
// Seed slightly perturbed geometry and lattice; provide rotation axis for refinement.
|
||||
// The beam-centre component PARALLEL to the spindle (here X, the rotation axis) is a gauge-weak
|
||||
// direction that XtalOptimizer now deliberately restrains toward the header rather than refining
|
||||
// freely (see the BeamComponentPrior in XtalOptimizer.cpp). So only the perpendicular component
|
||||
// (Y) is seeded off-truth to exercise beam-centre recovery; X is seeded at its true value.
|
||||
XtalOptimizerData xtal_opt{};
|
||||
xtal_opt.latt = CrystalLattice(39.7f, 50.6f, 79.6f, 90.0f, 94.5f, 90.5f);
|
||||
xtal_opt.geom.BeamX_pxl(1003).BeamY_pxl(997).DetectorDistance_mm(203.0)
|
||||
xtal_opt.geom.BeamX_pxl(1000).BeamY_pxl(997).DetectorDistance_mm(203.0)
|
||||
.PoniRot1_rad(0.01).PoniRot2_rad(0.02);
|
||||
xtal_opt.crystal_system = gemmi::CrystalSystem::Monoclinic;
|
||||
xtal_opt.axis = axis;
|
||||
|
||||
@@ -366,7 +366,7 @@ TEST_CASE("ZstdHuff_MaskLike", "[ZSTD]") {
|
||||
RequireHuffRoundTrip(image);
|
||||
}
|
||||
|
||||
TEST_CASE("ZstdHuff_LysoImage", "[ZSTD]") {
|
||||
TEST_CASE("ZstdHuff_BenchmarkImage", "[ZSTD]") {
|
||||
RegisterHDF5Filter(); // bitshuffle filter, needed to read the compressed benchmark dataset
|
||||
HDF5ReadOnlyFile data("../../tests/test_data/compression_benchmark.h5");
|
||||
HDF5DataSet dataset(data, "/entry/data/data");
|
||||
|
||||
@@ -17,7 +17,7 @@ Go back to main directory and:
|
||||
cd crystfel
|
||||
HDF5DATASET_WRITE_TEST_SWMR=1 ../build/tests/HDF5DatasetWriteTest ../tests/test_data/compression_benchmark.h5 100
|
||||
```
|
||||
This will generate HDF5 with lysozyme data measured with JUNGFRAU 4 Mpixel long time ago.
|
||||
This will generate HDF5 with protein diffraction data measured with JUNGFRAU 4 Mpixel long time ago.
|
||||
|
||||
## Analyze with CrystFEL
|
||||
To process the generated file with CrystFEL, you need to run the following command:
|
||||
@@ -30,5 +30,5 @@ Final: 100 images processed, 100 hits (100.0%), 100 indexable (100.0% of hits, 1
|
||||
```
|
||||
In case of issues, you can also try providing unit cell information:
|
||||
```
|
||||
indexamajig -g jf4m.geom -i writing_test.lst -o writing_test.stream --indexing=xgandalf -p 6G8A.pdb
|
||||
indexamajig -g jf4m.geom -i writing_test.lst -o writing_test.stream --indexing=xgandalf -p cell.pdb
|
||||
```
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
REMARK Unit-cell reference for the optional CrystFEL indexing hint (see README.md).
|
||||
REMARK Contains only the cell of the benchmark diffraction data - no model.
|
||||
CRYST1 78.903 78.903 36.941 90.00 90.00 90.00 P 43 21 2 8
|
||||
END
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,10 +20,10 @@ git lfs pull # or: git lfs pull --include "tests/data/*.h5"
|
||||
|
||||
| File | Dataset | Shipped |
|
||||
|----------------------------|-----------------------------------------|-----------|
|
||||
| `lyso_rotation_master.h5` | lysozyme rotation series (~1800 images) | yes (LFS) |
|
||||
| `rotation_master.h5` | protein rotation series (~1800 images) | yes (LFS) |
|
||||
|
||||
`lyso_rotation_master.h5` (plus its `_data_NNNNNN.h5` files) is fetched by `git lfs pull` and
|
||||
drives `Rugnux_LysoRotation`. A separate serial dataset is intentionally **not** shipped
|
||||
`rotation_master.h5` (plus its `_data_NNNNNN.h5` files) is fetched by `git lfs pull` and
|
||||
drives `Rugnux_Rotation`. A separate serial dataset is intentionally **not** shipped
|
||||
to keep the repository small — the rotation series can be run in serial mode (full analysis
|
||||
without rotation indexing) to exercise that path. To add your own dataset, drop the master + its
|
||||
data files here as real files (not symlinks, if you intend to commit them via LFS); the master
|
||||
|
||||
@@ -17,10 +17,10 @@ start_input = {
|
||||
"beam_y_pxl":1136,
|
||||
"detector_distance_mm":75,
|
||||
"incident_energy_keV":12.4,
|
||||
"sample_name":"lyso",
|
||||
"sample_name":"test_sample",
|
||||
"unit_cell":{"a":36.9, "b":78.95, "c":78.95, "alpha":90, "beta":90, "gamma":90},
|
||||
"images_per_trigger":18,
|
||||
"file_prefix":"lyso_test_grid",
|
||||
"file_prefix":"test_grid",
|
||||
"grid_scan": {
|
||||
"n_fast":3,
|
||||
"step_x_um": 5.0,
|
||||
|
||||
Reference in New Issue
Block a user