Fix tests + trim unnecessary variables in DataProcessingSettings
This commit is contained in:
@@ -702,8 +702,6 @@ void DiffractionExperiment::CheckDataProcessingSettings(const DataProcessingSett
|
||||
check_min("Photon count threshold", settings.photon_count_threshold, 0);
|
||||
check_min("Minimum pixels per spot", settings.min_pix_per_spot, 1);
|
||||
check_min("Maximum pixels per spot", settings.max_pix_per_spot, settings.min_pix_per_spot + 1);
|
||||
check_min("Local background size", settings.local_bkg_size, 2);
|
||||
check_max("Local background size", settings.local_bkg_size, 7);
|
||||
if (settings.high_resolution_limit > 0) {
|
||||
check_min("Spot finding high resolution limit", settings.high_resolution_limit, 0.5);
|
||||
check_max("Spot finding high resolution limit", settings.high_resolution_limit, 50.0);
|
||||
@@ -715,19 +713,14 @@ void DiffractionExperiment::CheckDataProcessingSettings(const DataProcessingSett
|
||||
check_min("Spot finding low resolution limit", settings.low_resolution_limit, 1.0);
|
||||
check_max("Spot finding low resolution limit", settings.low_resolution_limit, 50.0);
|
||||
}
|
||||
check_min("Background estimate lowQ", settings.bkg_estimate_low_q, 0.0);
|
||||
check_min("Background estimate highQ", settings.bkg_estimate_high_q, settings.bkg_estimate_low_q);
|
||||
}
|
||||
|
||||
DataProcessingSettings DiffractionExperiment::DefaultDataProcessingSettings() {
|
||||
DataProcessingSettings ret{};
|
||||
ret.local_bkg_size = 5;
|
||||
ret.signal_to_noise_threshold = 3;
|
||||
ret.photon_count_threshold = 16;
|
||||
ret.min_pix_per_spot = 1;
|
||||
ret.max_pix_per_spot = 50;
|
||||
ret.bkg_estimate_low_q = 2 * M_PI / 5.0;
|
||||
ret.bkg_estimate_high_q= 2 * M_PI / 3.0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -974,3 +967,11 @@ DiffractionExperiment::GetDetectorModuleConfig(const std::vector<AcquisitionDevi
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
float DiffractionExperiment::GetLowQForBkgEstimate_recipA() const {
|
||||
return 2 * static_cast<float>(M_PI) / 5.0;
|
||||
}
|
||||
|
||||
float DiffractionExperiment::GetHighQForBkgEstimate_recipA() const {
|
||||
return 2 * static_cast<float>(M_PI) / 3.0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user