diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index cb0b67ca..0bbf48a4 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -7,8 +7,8 @@ This is an UNSTABLE release. The release has significant modifications and bug f * jfjoch_broker: Allow for asynchronous start to allow overlapping detector configuration with other beamline preparations * jfjoch_broker: Goniometer axis name is converted to lowercase * jfjoch_broker: Fix bug, where wrong HTTP error codes were returned -* jfjoch_broker: Improve sigma estimation during merging (K. Takaba) - +* jfjoch_process: Improve sigma estimation during merging (K. Takaba) +* jfjoch_process: Modify spot finding thresholds ### 1.0.0-rc.137 This is an UNSTABLE release. The release has significant modifications and bug fixes, if things go wrong, it is better to revert to 1.0.0-rc.132. diff --git a/image_analysis/spot_finding/SpotFindingSettings.h b/image_analysis/spot_finding/SpotFindingSettings.h index 743efae3..a3d55f84 100644 --- a/image_analysis/spot_finding/SpotFindingSettings.h +++ b/image_analysis/spot_finding/SpotFindingSettings.h @@ -5,6 +5,7 @@ #define JUNGFRAUJOCH_SPOTFINDINGSETTINGS_H #include +#include struct SpotFindingSettings { bool enable = true; diff --git a/tools/jfjoch_process.cpp b/tools/jfjoch_process.cpp index 409a1bcf..b0ac07e3 100644 --- a/tools/jfjoch_process.cpp +++ b/tools/jfjoch_process.cpp @@ -51,6 +51,7 @@ void print_usage(Logger &logger) { logger.Info(" -c Max spot count (default: 250)"); logger.Info(" -W HDF5 file with analysis results is written"); logger.Info(" -T Noise sigma level for spot finding (default: 3.0)"); + logger.Info(" -t Photon count threshold for spot finding (default: 10)"); } void trim_in_place(std::string& t) { @@ -135,6 +136,8 @@ int main(int argc, char **argv) { bool write_output = false; std::optional max_spot_count_override; float sigma_spot_finding = 3.0; + int64_t photon_count_threshold_spot_finding = 10; + IndexingAlgorithmEnum indexing_algorithm = IndexingAlgorithmEnum::Auto; ScaleMergeOptions::PartialityModel partiality_model = ScaleMergeOptions::PartialityModel::Fixed; @@ -148,7 +151,7 @@ int main(int argc, char **argv) { } int opt; - while ((opt = getopt(argc, argv, "o:N:s:e:vc:R::FX:xd:S:MP:AD:C:T:W")) != -1) { + while ((opt = getopt(argc, argv, "o:N:s:e:vc:R::FX:xd:S:MP:AD:C:T:t:W")) != -1) { switch (opt) { case 'o': output_prefix = optarg; @@ -223,6 +226,10 @@ int main(int argc, char **argv) { sigma_spot_finding = atof(optarg); logger.Info("Noise threshold level for spot finding set to {:.2f} sigma", sigma_spot_finding); break; + case 't': + photon_count_threshold_spot_finding = atoi(optarg); + logger.Info("Photon-count threshold level for spot finding set to {:d}", photon_count_threshold_spot_finding); + break; case 'C': { auto uc = parse_unit_cell_arg(optarg); if (!uc.has_value()) { @@ -328,6 +335,7 @@ int main(int argc, char **argv) { spot_settings.indexing = true; spot_settings.high_resolution_limit = d_min_spot_finding; spot_settings.signal_to_noise_threshold = sigma_spot_finding; + spot_settings.photon_count_threshold = photon_count_threshold_spot_finding; if (d_min_scale_merge > 0) spot_settings.high_resolution_limit = d_min_spot_finding;