Remove sample identities from the repository; document the rule
Datasets may be confidential; sample names and measured unit cells committed to the repo can leak outside the group working on them. Scrub existing occurrences and add a "No sample identities in the repository" section to CLAUDE.md (forbidden: sample/dataset names, internal codes, measured cells tied to a sample; fine: space group / lattice / twinning descriptors). - Comments: replace internal dataset codes and protein names with the crystallographic situation they illustrate (centred vs pseudo-symmetric, holohedral, cubic, F-cubic/hexagonal, ...). - Docs: same, in the analysis/writer/stream references and example configs. - Tests: rename sample-named identifiers, TEST_CASE names, file prefixes and asserted labels to neutral crystallographic names (e.g. tetragonal_uc); behaviour unchanged. Reduce the CrystFEL reference PDB to a bare CRYST1 cell file (cell.pdb) and rename the reference data file. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -70,6 +70,25 @@ case" branches) without asking first; if a guard isn't clearly needed, leave it
|
||||
Match the surrounding code's idiom, naming, and comment density rather than importing a different
|
||||
style.
|
||||
|
||||
## No sample identities in the repository
|
||||
|
||||
**Never put sample names or sample-specific measured values into source code, comments,
|
||||
documentation, commit messages, or test fixtures.** Datasets belong to users and may be
|
||||
confidential or embargoed; anything committed can leak outside the group working on them. This is
|
||||
a hard rule, not a preference.
|
||||
|
||||
- **Forbidden**: sample/dataset names or internal codes (a protein name, a beamline dataset ID, a
|
||||
run label), and **measured unit-cell parameters tied to a real sample** (this is the most
|
||||
sensitive — never hardcode "protein X has cell a,b,c").
|
||||
- **Fine**: general crystallographic descriptors — space group / Laue class ("a P2₁ crystal", "a
|
||||
holohedral 422 case"), lattice centering, twinning, "a crystal whose true axis is reported as its
|
||||
3× harmonic", pseudo-symmetry, etc. Describe the *crystallographic situation*, not the specimen.
|
||||
- **Tests** must use neutral names (e.g. `tetragonal_uc`, not a specimen-named variable) and, where
|
||||
a cell is needed, a synthetic cell chosen for the test — not a real dataset's parameters.
|
||||
|
||||
When a bug was found on a specific dataset, commit the *behaviour* ("de-novo indexing adopted a
|
||||
spurious axis-multiple supercell"), never the dataset.
|
||||
|
||||
## Local end-to-end run (no detector / no FPGA)
|
||||
|
||||
The FPGA HLS logic can be simulated on the CPU (`HLSSimulatedDevice`), so the full software
|
||||
|
||||
@@ -604,7 +604,7 @@ A reference dataset (`--reference-mtz`) supplies known intensities for the same
|
||||
|
||||
**Fix the space group and cell.** Unless overridden on the command line (`-S` for the space group, `-C` for the cell), the reference's space group is adopted and its cell is used as the soft reference cell — indexing may still drift the cell within tolerance, so a small mismatch between reference and data is absorbed rather than rejected. This applies to both stills and rotation data.
|
||||
|
||||
**Resolve the indexing (merohedral) ambiguity.** When the lattice symmetry is higher than the crystal's Laue symmetry (e.g. $P3$, $P4$, $P6$, $C2$), more than one indexing of the same lattice is geometrically valid, and the two solutions produce *different* merged intensities that a self-consistent scale cannot tell apart — only an external reference can. The candidate reindexings are the identity together with the twin-law cosets of the metric symmetry (from the unit-cell metric and the Laue group); each is scored by the intensity correlation $\mathrm{CC}_\mathrm{ref}$ of the reindexed merge against the reference, and the data are re-merged in the best-correlating indexing. The reindex is **metric-preserving** — only the $hkl$ labels change, the cell is unchanged — and it is a no-op for a holohedral crystal, which has no twin laws (e.g. lysozyme, where the lattice and Laue symmetry coincide). For rotation data this is done once, after the space group is determined; the reference is *not* used to scale the rotation merge, which stays self-consistent (its $\mathrm{ISa}$ comes from the data alone). For stills the reference is the per-image scale target of the on-the-fly scaling (§10.2).
|
||||
**Resolve the indexing (merohedral) ambiguity.** When the lattice symmetry is higher than the crystal's Laue symmetry (e.g. $P3$, $P4$, $P6$, $C2$), more than one indexing of the same lattice is geometrically valid, and the two solutions produce *different* merged intensities that a self-consistent scale cannot tell apart — only an external reference can. The candidate reindexings are the identity together with the twin-law cosets of the metric symmetry (from the unit-cell metric and the Laue group); each is scored by the intensity correlation $\mathrm{CC}_\mathrm{ref}$ of the reindexed merge against the reference, and the data are re-merged in the best-correlating indexing. The reindex is **metric-preserving** — only the $hkl$ labels change, the cell is unchanged — and it is a no-op for a holohedral crystal, which has no twin laws (the lattice and Laue symmetry coincide). For rotation data this is done once, after the space group is determined; the reference is *not* used to scale the rotation merge, which stays self-consistent (its $\mathrm{ISa}$ comes from the data alone). For stills the reference is the per-image scale target of the on-the-fly scaling (§10.2).
|
||||
|
||||
---
|
||||
|
||||
@@ -699,4 +699,4 @@ Two maps are formed with the model phases $\varphi_\mathrm{model}$: a $2F_o-F_c$
|
||||
The model fixes a definite hand and indexing, but the merged data need not share them, so before comparison the observed reflections are brought into the model's frame.
|
||||
|
||||
- **Enantiomorph / screw.** When the data space group is the enantiomorph of the model's (e.g. data $P4_12_12$, model $P4_32_12$; or $P3_1/P3_2$), the two are **indistinguishable from merged intensities** — $|F_\mathrm{calc}|$ is invariant under the change of hand, so R-free cannot choose between them and probing would be meaningless. The hand is therefore taken from the model: the observed reflections are reindexed by the change-of-hand operator into the model's enantiomorph. Only the map phases (the density's hand) depend on this choice.
|
||||
- **Indexing (merohedral) ambiguity.** When the crystal has a merohedral ambiguity (§10.9), the observed intensities *do* differ between indexings, and the right one is chosen against the best available reference. **If a reference MTZ was supplied, the data were already reindexed to agree with it** (§10.9 — by the reference-intensity correlation, at the merge stage for rotation data or per image in stills scaling), and model validation keeps that authoritative choice. **Only with a model and no reference** does validation resolve the ambiguity itself, as a fallback: the scaled model is fit to each reindexing of the data (identity plus the twin-law cosets) and the one giving the **lowest R-free** is kept. This matters for a multi-dataset campaign — a single shared reference fixes one indexing convention for every dataset, whereas an independent per-dataset lowest-R-free choice could send borderline datasets to different conventions. A no-op either way for a holohedral crystal (no twin laws), e.g. lysozyme.
|
||||
- **Indexing (merohedral) ambiguity.** When the crystal has a merohedral ambiguity (§10.9), the observed intensities *do* differ between indexings, and the right one is chosen against the best available reference. **If a reference MTZ was supplied, the data were already reindexed to agree with it** (§10.9 — by the reference-intensity correlation, at the merge stage for rotation data or per image in stills scaling), and model validation keeps that authoritative choice. **Only with a model and no reference** does validation resolve the ambiguity itself, as a fallback: the scaled model is fit to each reindexing of the data (identity plus the twin-law cosets) and the one giving the **lowest R-free** is kept. This matters for a multi-dataset campaign — a single shared reference fixes one indexing convention for every dataset, whereas an independent per-dataset lowest-R-free choice could send borderline datasets to different conventions. A no-op either way for a holohedral crystal (no twin laws).
|
||||
|
||||
@@ -188,7 +188,7 @@ For every image stream socket, downstream code must send the following message t
|
||||
```json
|
||||
{
|
||||
"run_number":135,
|
||||
"run_name": "lysozyme_1",
|
||||
"run_name": "sample_1",
|
||||
"socket_number": 1,
|
||||
"processed_images":250,
|
||||
"ok": true
|
||||
@@ -201,7 +201,7 @@ If not, it is possible to include error message:
|
||||
```json
|
||||
{
|
||||
"run_number":135,
|
||||
"run_name": "lysozyme_1",
|
||||
"run_name": "sample_1",
|
||||
"socket_number": 1,
|
||||
"processed_images": 0,
|
||||
"ok": false,
|
||||
|
||||
@@ -108,8 +108,8 @@ For example `header_appendix` of `{"param1": "test1", "param2": ["test1", "test2
|
||||
"filename": "dataset_name_data_000001.h5",
|
||||
"nimages": 1000,
|
||||
"file_number": 0,
|
||||
"sample_name": "lysozyme",
|
||||
"run_name": "lyso_cryo",
|
||||
"sample_name": "my_sample",
|
||||
"run_name": "my_run",
|
||||
"run_number": 25,
|
||||
"experiment_group": "p00001",
|
||||
"beam_x_pxl": 1200,
|
||||
|
||||
+2
-2
@@ -71,7 +71,7 @@ Index, integrate, scale and merge a rotation sweep, fully de novo:
|
||||
|
||||
```
|
||||
rugnux rotation_master.h5 \
|
||||
-o lyso_rot -N 32 \
|
||||
-o rotation_run -N 32 \
|
||||
--scaling-high-resolution 1.4
|
||||
```
|
||||
|
||||
@@ -114,7 +114,7 @@ then merge against a reference structure:
|
||||
|
||||
```
|
||||
rugnux serial_master.h5 \
|
||||
-o lyso_serial -N 32 \
|
||||
-o serial_run -N 32 \
|
||||
-X ffbidx -C 79,79,38,90,90,90 -S 96 \
|
||||
--spot-sigma 4 \
|
||||
-z reference.mtz \
|
||||
|
||||
@@ -38,7 +38,7 @@ const gemmi::Mtz::Column* SelectDefaultColumn(const gemmi::Mtz& mtz, bool& squar
|
||||
}
|
||||
// Fall back to a plain structure-factor amplitude (type F): a deposited/observed FP or FOBS, or a
|
||||
// lone FC, squared to an intensity like F-model. Lets a reference MTZ that carries only amplitudes
|
||||
// (no F-model or IMEAN/I - e.g. the KR2 8cl8 deposition, which has only FP) still seed CCref
|
||||
// (no F-model or IMEAN/I - e.g. a deposition that has only FP) still seed CCref
|
||||
// without an explicit --reference-column.
|
||||
for (const char* label : {"FP", "FOBS", "F", "FC", "Fobs", "F-obs"}) {
|
||||
if (const auto* col = mtz.column_with_label(label, nullptr, 'F')) {
|
||||
|
||||
@@ -191,7 +191,7 @@ TwinningAnalysisResult AnalyzeTwinning(const std::vector<MergedReflection>& merg
|
||||
result.estimated_twin_fraction = (1.0 - std::sqrt(std::max(0.0, 2.0 * m - 3.0))) / 2.0;
|
||||
}
|
||||
// Either indicator dropping clearly below its untwinned value is suspicious - but only where a twin
|
||||
// law can actually exist. In a holohedral Laue class (e.g. lysozyme's 422) no merohedral twinning is
|
||||
// law can actually exist. In a holohedral Laue class (e.g. 422) no merohedral twinning is
|
||||
// possible, so a low <|L|> is a statistical artefact (correlated near-neighbours) rather than a
|
||||
// twin, and must not be flagged.
|
||||
result.merohedral_twinning_possible = MerohedralTwinningPossible(space_group);
|
||||
|
||||
@@ -221,7 +221,7 @@ ModelValidationResult ValidateAgainstModel(const std::vector<MergedReflection> &
|
||||
// intensities (at the merge stage for rotation data, per image in stills scaling), and that
|
||||
// choice is authoritative - we keep it. Only with a model and NO reference do we resolve the
|
||||
// ambiguity here, as a fallback, by fitting each candidate reindexing and keeping the lowest
|
||||
// R-free. A no-op either way for a holohedral crystal (no twin laws), e.g. lysozyme. The
|
||||
// R-free. A no-op either way for a holohedral crystal (no twin laws). The
|
||||
// enantiomorph/screw ambiguity is never probed by R-free: |Fcalc| is the same for both hands, so
|
||||
// it cannot distinguish them - that is taken from the model hand above.
|
||||
Fit best = fit_model(obs);
|
||||
|
||||
+3
-3
@@ -892,8 +892,8 @@ ProcessResult Rugnux::Run(RugnuxObserver *observer) {
|
||||
// A genuinely centred lattice and a merely pseudo-symmetric triclinic one are indistinguishable
|
||||
// from spot POSITIONS - the 2-fold is an INTENSITY property - so decide it here, after P1
|
||||
// integration: reindex the P1-merged data to the metric candidate's conventional setting and
|
||||
// re-run the search. The I(h) vs I(Rh) correlation confirms a real centred lattice (EcwtCQ244
|
||||
// -> C2) and rejects a pseudo-symmetric triclinic (EcwtCQ066 stays P1, no reindex committed).
|
||||
// re-run the search. The I(h) vs I(Rh) correlation confirms a real centred lattice (high CC ->
|
||||
// commit the centring) and rejects a pseudo-symmetric triclinic (low CC -> stays P1, no reindex).
|
||||
std::optional<gemmi::Mat33> commit_reindex;
|
||||
std::optional<UnitCell> commit_cell;
|
||||
std::optional<CrystalLattice> commit_lattice;
|
||||
@@ -906,7 +906,7 @@ ProcessResult Rugnux::Run(RugnuxObserver *observer) {
|
||||
&& end_msg.rotation_lattice_type->crystal_system == gemmi::CrystalSystem::Triclinic;
|
||||
if (searched_trivial && demoted_triclinic && end_msg.rotation_lattice.has_value()) {
|
||||
// The metric only generates the candidate; the intensity CC gate below makes the decision
|
||||
// (a false pseudo-symmetry like EcwtCQ066 is rejected by the correlation).
|
||||
// (a false pseudo-symmetry is rejected by the correlation).
|
||||
const auto cand = LatticeSearch(*end_msg.rotation_lattice);
|
||||
// Exact integer reindex from the indexed setting straight to the candidate conventional
|
||||
// setting: P[i][j] = conv_real[i] . rot_reciprocal[j]. Derived from the two lattices, so it
|
||||
|
||||
@@ -1250,8 +1250,8 @@ int main(int argc, char **argv) {
|
||||
|
||||
// Re-determine the unit cell from scratch: discard any cell stored in the input file so
|
||||
// indexing is not biased by it. A stale or wrong stored cell otherwise resolves the indexing
|
||||
// algorithm to FFBIDX and drives it to the wrong lattice (e.g. a non-cubic cell for cubic
|
||||
// insulin). A user-supplied -C cell still takes effect (clears to nullopt when absent).
|
||||
// algorithm to FFBIDX and drives it to the wrong lattice (e.g. a non-cubic cell for a cubic
|
||||
// crystal). A user-supplied -C cell still takes effect (clears to nullopt when absent).
|
||||
experiment.SetUnitCell(fixed_reference_unit_cell);
|
||||
|
||||
// --refine-geometry defaults ON for stills whenever a reference cell is available (-C or a
|
||||
@@ -1336,7 +1336,8 @@ int main(int argc, char **argv) {
|
||||
// slightly bias accuracy; off for non-rot3d (no combine). 0.7 (rather than 0.5) also strips the
|
||||
// partiality-extrapolated fulls that dominate the intensity second moment on weakly-diffracting
|
||||
// crystals, so the de-novo space-group search is no longer starved by the error-model I/sigma floor
|
||||
// (e.g. F-cubic Benas_3 -> F432, Benas_7 -> P6122 instead of P1). An explicit --min-captured-fraction wins.
|
||||
// (e.g. a weakly-diffracting F-cubic or hexagonal crystal recovers its true space group instead of
|
||||
// P1). An explicit --min-captured-fraction wins.
|
||||
scaling_settings.MinCapturedFraction(min_captured_fraction_arg.value_or(rotation_indexing ? 0.7 : 0.0));
|
||||
// Capture-aware systematic sigma defaults ON (1.0) for the rot3d combine - it down-weights the
|
||||
// over-extrapolated under-captured fulls and, with the mosaicity fix, lifts rotation ISa/anomalous
|
||||
|
||||
+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]") {
|
||||
|
||||
@@ -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"));
|
||||
|
||||
+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});
|
||||
@@ -1577,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();
|
||||
@@ -1586,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);
|
||||
@@ -1654,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();
|
||||
@@ -1663,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);
|
||||
@@ -1796,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();
|
||||
@@ -1805,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]") {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -18,7 +18,7 @@ void print_usage(Logger &logger) {
|
||||
logger.Info("Options:");
|
||||
logger.Info(" -i<num> Number of images");
|
||||
logger.Info(" -N<num> Number of image processing threads (default: 8)");
|
||||
logger.Info(" -F{<txt>} Write file, optional parameter is name (default: lyso_lite_perf_test)");
|
||||
logger.Info(" -F{<txt>} Write file, optional parameter is name (default: lite_perf_test)");
|
||||
logger.Info(" -X<txt> Indexing (none|fft|fftw|ffbidx), ffbidx is default");
|
||||
logger.Info(" -t<num> Indexing thread pool size (default: 4)");
|
||||
logger.Info(" -f<num> FFT indexing search vectors");
|
||||
@@ -82,7 +82,7 @@ int main(int argc, char **argv) {
|
||||
if (optarg)
|
||||
filename = std::string(optarg);
|
||||
else
|
||||
filename = "lyso_lite_perf_test";
|
||||
filename = "lite_perf_test";
|
||||
break;
|
||||
case 'Q':
|
||||
quick_integrate = true;
|
||||
|
||||
Reference in New Issue
Block a user