spindle: the severity no longer rides on the indexing seed or on which indexer is configured
The score gated on 60 spots, but the seed escalation stops at the leanest seed that indexes - 30 spots on precisely the clean frames a grid scan produces - so the value was absent exactly where beamline automation most needs it, and absence maps to "engage": the protocol would have fired on every good frame, which degenerates the trigger into "always". The floor itself stays where it was calibrated; what changes is what it gates. When no escalation pass could answer, one severity-only pass runs over the full spot list - the row search alone, no reduction, no refinement - purely to produce the number. The same was true of the indexer choice: only the FFT family computes a row shortlist, so a deployment configured with the known-cell indexer - the ordinary online stills path - never produced the score at all. Where the severity-only pass has no row search to run, the severity is read off the rows of the winning lattice instead, which any indexer produces: the lattice's shortest few distinct directions, as many as the FFT shortlist resolves in practice, fed through the same window and scoring with equal magnitudes. The count parity is load-bearing - a worst case over every enumerable lattice direction fires on 100% of harmless mounts of a generic triclinic cell against 74% for this selection at theta_max = 15 deg, and an always-firing trigger decides nothing - while the diad-detection rate stays 1.00 on the monoclinic classes either way, a dropped axis row being recovered by the pair normals exactly as an invisible one is. A frame that neither indexed nor reached the spot floor still reports nothing, which is the honest answer and maps to the recoverable error. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFEJG6WBQv8th4UJFNe53N
This commit is contained in:
1 parent
0ee1e5e070
commit
89962574ef
11 files changed
+211
-21
No files matched your search
@@ -148,7 +148,7 @@ void IndexerThread::Worker(int threadid) {
|
||||
|
||||
Indexer &indexer = **slot;
|
||||
indexer.Setup(input->experiment);
|
||||
tmp_result = std::make_unique<IndexerResult>(indexer.Run(input->recip));
|
||||
tmp_result = std::make_unique<IndexerResult>(indexer.Run(input->recip, input->severity_only));
|
||||
} catch (std::exception &e) {
|
||||
// Hand the failure back as a result carrying the reason. A nullptr here was
|
||||
// indistinguishable from a worker that was never dispatched, and both then read
|
||||
@@ -178,7 +178,7 @@ void IndexerThread::Finalize() {
|
||||
}
|
||||
|
||||
std::unique_ptr<IndexerResult> IndexerThread::Run(const DiffractionExperiment &experiment,
|
||||
const std::vector<Coord> &recip) {
|
||||
const std::vector<Coord> &recip, bool severity_only) {
|
||||
std::unique_ptr<IndexerResult> tmp_result;
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(m);
|
||||
@@ -186,7 +186,7 @@ std::unique_ptr<IndexerResult> IndexerThread::Run(const DiffractionExperiment &e
|
||||
return nullptr;
|
||||
if (state != TaskState::IDLE)
|
||||
return nullptr;
|
||||
task_input = std::make_unique<TaskInput>(std::cref(experiment), std::cref(recip));
|
||||
task_input = std::make_unique<TaskInput>(std::cref(experiment), std::cref(recip), severity_only);
|
||||
state = TaskState::READY;
|
||||
}
|
||||
c_start.notify_one();
|
||||
@@ -231,7 +231,8 @@ int IndexerThreadPool::GetFreeWorker() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
IndexerResult IndexerThreadPool::Run(const DiffractionExperiment &experiment, const std::vector<Coord> &recip) {
|
||||
IndexerResult IndexerThreadPool::Run(const DiffractionExperiment &experiment, const std::vector<Coord> &recip,
|
||||
bool severity_only) {
|
||||
const auto algorithm = experiment.GetIndexingAlgorithm();
|
||||
if (algorithm == IndexingAlgorithmEnum::None)
|
||||
return IndexerResult{.lattice = {}, .indexing_time_s = 0, .executed = false};
|
||||
@@ -285,7 +286,7 @@ IndexerResult IndexerThreadPool::Run(const DiffractionExperiment &experiment, co
|
||||
std::unique_ptr<IndexerResult> result;
|
||||
if (task >= 0) {
|
||||
try {
|
||||
result = tasks[task]->Run(experiment, recip);
|
||||
result = tasks[task]->Run(experiment, recip, severity_only);
|
||||
} catch (const std::exception &e) {
|
||||
spdlog::error("Indexer thread failed: {}", e.what());
|
||||
result = std::make_unique<IndexerResult>(IndexerResult{
|
||||
|
||||
Reference in new issue
Block a user