24 #include "cheetah/sps_clustering/Config.h" 28 namespace sps_clustering {
32 : utils::Config(
"sps_clustering")
33 , _pulse_width_tolerance(5 * cheetah::data::milliseconds)
34 , _time_tolerance(100 * cheetah::data::milliseconds)
35 , _dm_tolerance(1 *
pss::astrotypes::units::parsecs_per_cube_cm)
36 , _linking_length(1.7)
45 void Config::add_options(OptionsDescriptionEasyInit& add_options )
48 (
"active", boost::program_options::value<bool>(&_active)->default_value(_active),
49 "perform SpsClustering if true" 51 (
"number_of_threads", boost::program_options::value<std::size_t>(&_num_threads)->default_value(1),
52 "number of threads to use for clustering" 54 (
"time_tolerance", boost::program_options::value<float>()->notifier(
57 _time_tolerance = MsecTimeType(f * cheetah::data::milliseconds);
58 }),
"start time tolerance in ms to cluster candidates in time space." 60 (
"dm_thresh", boost::program_options::value<float>()->notifier(
63 _dm_tolerance = f * pss::astrotypes::units::parsecs_per_cube_cm;
64 }),
"DM tolerance in cm^-3 pc to cluster candidates in DM space" 66 (
"pulse_width_tolerance", boost::program_options::value<float>()->notifier(
69 _pulse_width_tolerance = MsecTimeType(f * cheetah::data::milliseconds);
70 }),
"Pulse width tolerance in ms to cluster candidates in pulse width space." 72 (
"linking_length", boost::program_options::value<float>(&_linking_length)->default_value(1.7),
73 "Linking length for clustering. This is the Euclidean distance in our parameter space inside which all candidates are considered part of the same cluster." 77 typename Config::Dm Config::dm_tolerance()
const 82 void Config::dm_tolerance( Dm
const& dm_tolerance)
84 _dm_tolerance = dm_tolerance;
87 typename Config::MsecTimeType Config::pulse_width_tolerance()
const 89 return _pulse_width_tolerance;
92 void Config::pulse_width_tolerance(MsecTimeType
const& pulse_width_tolerance)
94 _pulse_width_tolerance = pulse_width_tolerance;
97 typename Config::MsecTimeType Config::time_tolerance()
const 99 return _time_tolerance;
102 void Config::time_tolerance(MsecTimeType
const& time_tolerance)
104 _time_tolerance = time_tolerance;
107 float Config::linking_length()
const 109 return _linking_length;
112 void Config::linking_length(
float const& l)
117 bool Config::active()
const 122 std::size_t Config::num_threads()
const 127 void Config::num_threads(std::size_t
const nt)
Some limits and constants for FLDO.