Bragg prediction: how far to walk the lattice is a setting, not a literal
max_hkl was hardcoded to 100 at the one place production builds the prediction settings, so the only way to change it was to edit and rebuild - and it is not a constant of the method, it is a property of the cell. An axis is truncated once a/d_min exceeds it: 100 covers a 150 A axis at 1.5 A, but the same axis at 1.0 A, or a 250 A axis anywhere, loses its outermost reflections with nothing said. Move it into BraggIntegrationSettings next to the other prediction/integration parameters and add rugnux --max-hkl (1..511, default 100 - no behaviour change). Like the integration radii and the background trim it stays out of the OpenAPI, so the broker keeps the default it has today and live analysis cannot be handed a range that would not finish; the offline front end, which knows its cell, can ask for more. RugnuxCommandLine emits it when it is not the default. Measured on five rotation crystals at --max-hkl 200: two are bit-identical at no cost, and three were being truncated - one gains 419k observations (+17%) and takes its high-shell CC1/2 from 15.1% to 25.8% for +14% wall clock, the other two gain 12k and 5.8k observations with CC1/2 76.6->82.4% and 52.1->55.3% for +9% and +1%. ISa is unchanged throughout, and no frame overflowed the prediction buffer. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -108,3 +108,16 @@ BraggIntegrationSettings &BraggIntegrationSettings::BackgroundTrimFraction(float
|
||||
float BraggIntegrationSettings::GetBackgroundTrimFraction() const {
|
||||
return bkg_trim_fraction;
|
||||
}
|
||||
|
||||
BraggIntegrationSettings &BraggIntegrationSettings::MaxHKL(int input) {
|
||||
check_min("Maximum hkl index", input, 1);
|
||||
// The GPU predictor launches one thread per candidate, so the cost is (2n+1)^3: 511 is 1.1e9
|
||||
// candidates per frame, already far past the point where prediction dominates a run.
|
||||
check_max("Maximum hkl index", input, 511);
|
||||
max_hkl = input;
|
||||
return *this;
|
||||
}
|
||||
|
||||
int BraggIntegrationSettings::GetMaxHKL() const {
|
||||
return max_hkl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user