24 #include "cheetah/fldo/cuda/Config.h" 25 #include "cheetah/fldo/cuda/CommonDefs.h" 35 static const int default_phases = fldo::o_phases;
36 static const unsigned default_nsubints = fldo::o_subints;
37 static const unsigned default_nsubbands = fldo::o_bands;
41 : BaseT(
"origami_cuda",
"use the origami cuda based algorithm")
43 , _nsubints(default_nsubints)
44 , _nsubbands(default_nsubbands)
45 , _phases(default_phases)
49 bool const &Config::enable_split()
const 54 size_t const& Config::phases()
const 59 size_t const& Config::nsubints()
const 64 size_t const& Config::nsubbands()
const 69 void Config::phases(
size_t n)
74 void Config::nsubbands(
size_t n)
79 void Config::nsubints(
size_t n)
84 void Config::add_options(OptionsDescriptionEasyInit& add_options)
89 BaseT::add_options(add_options);
90 add_options(
"help",
" FLDO receives a stream of filterbank data organized as a succession of measures, each comprising a number of frequency channels. \n\ 91 The folding algorithm consists in a synchronous summation of input data in order to improve the Signal/Noise. Input data is processed in sub-integrations blocks and in frequency group (sub-bands) and summed up coherently, following the pulsar period of the current candidate in an array of maximum length of phases phases. \n\ 92 doc/FldoParam.md describes the FLDO process and parameters meaning")
93 (
"enable_split", boost::program_options::value<bool>(&_enable_split)->default_value(_enable_split),
"enable folding phase shift")
99 (
"phases", boost::program_options::value<size_t>(&_phases)->default_value(default_phases),
100 "specify the max number of phases used in folding")
101 (
"nsubints",boost::program_options::value<size_t>(&_nsubints)->default_value(default_nsubints),
102 "specify the number of sub-integrations the whole scan is divided.")
103 (
"nsubbands",boost::program_options::value<size_t>(&_nsubbands)->default_value(default_nsubbands),
104 "specify the number of frequency sub-bands");
107 if (0 > fldo_input_check((*
this))) {
108 throw panda::Error(
"Wrong Param Config in FLDO");
124 PANDA_LOG_DEBUG <<
" fldo_input_check: input config parameters check " ;
127 size_t nsubints = config.
nsubints();
128 if ((fldo::max_subints < nsubints) || (fldo::min_subints > nsubints)) {
129 static constexpr
const char* err_msg =
"fldo_input_check: invalid nsubints ";
130 PANDA_LOG_ERROR << err_msg <<
" (" << nsubints <<
")" ;
133 PANDA_LOG_DEBUG <<
"fldo_input_check: nsubints (" << nsubints <<
")" ;
138 if ((fldo::max_bands < nsubbands) || (fldo::min_bands > nsubbands)) {
139 static constexpr
const char* err_msg =
"fldo_input_check: invalid nsubbands ";
140 PANDA_LOG_ERROR << err_msg <<
" (" << nsubbands <<
")" ;
144 PANDA_LOG_DEBUG <<
"fldo_input_check: nsubbands (" << nsubbands <<
")" ;
149 size_t phases = config.
phases();
151 if ((fldo::max_phases < phases) || (fldo::min_phases > phases)) {
152 static constexpr
const char* err_msg =
"fldo_input_check: invalid phases ";
153 PANDA_LOG_ERROR << err_msg <<
" (" << phases <<
")" ;
157 PANDA_LOG_DEBUG <<
"fldo_input_check: phases (" << phases <<
")" ;
size_t const & nsubints() const
return the number of sub-integrations used in the sum-up data
size_t const & nsubbands() const
return the number of frequency sub-bands summed up
size_t const & phases() const
return the number of phase bins
Some limits and constants for FLDO.