7 #define _R "\033[1;31m"
8 #define _B "\033[1;34m"
9 #define _G "\033[1;32m"
10 #define _N "\033[22;30m"
39 const int approxOffset =
static_cast<int>(
offset );
46 ( negativity < -1000. ) ||
68 const int approxOffset =
static_cast<int>(
offset );
84 ( negativity > -1000. ) &&
86 !( isNegativePeaks ) &&
103 std::cerr <<
" [LASProfileJudge::EnableZeroFilter] ** WARNING: Zero filter has been disabled." << std::endl;
137 const unsigned int meanPosition = 256 +
offset;
139 const unsigned int halfWindowSize = 33;
141 const unsigned int sumHalfRange = 128;
146 for(
unsigned int i = meanPosition - sumHalfRange;
i < meanPosition - halfWindowSize; ++
i ) {
150 for(
unsigned int i = meanPosition + halfWindowSize;
i < meanPosition + sumHalfRange; ++
i ) {
168 const unsigned int meanPosition = 256 +
offset;
170 const unsigned int halfWindowSize = 33;
172 bool returnValue =
false;
175 double average = 0., counterD = 0.;
176 for(
unsigned int strip = 0; strip < 512; ++strip ) {
177 if( strip < meanPosition - halfWindowSize || strip > meanPosition + halfWindowSize ) {
185 const double noiseLevel = 2.;
186 for(
unsigned int strip = meanPosition - halfWindowSize; strip < meanPosition + halfWindowSize; ++strip ) {
194 return( returnValue );
208 const unsigned int meanPosition = 256 +
offset;
210 const unsigned int halfWindowSize = 33;
212 bool returnValue =
false;
215 double average = 0., counterD = 0.;
216 for(
unsigned int strip = 0; strip < 512; ++strip ) {
217 if( strip < meanPosition - halfWindowSize || strip > meanPosition + halfWindowSize ) {
225 const double noiseLevel = 2.;
226 for(
unsigned int strip = 0; strip < 512; ++strip ) {
234 return( returnValue );
250 const unsigned int meanPosition = 256 +
offset;
252 const unsigned int halfWindowSize = 33;
255 for(
unsigned int strip = meanPosition - halfWindowSize; strip < meanPosition + halfWindowSize; ++strip ) {
bool IsSignalIn(const LASModuleProfile &, double)
bool IsNegativePeaksInProfile(int)
double GetValue(unsigned int theStripNumber) const
bool IsPeaksInProfile(int)
bool JudgeProfile(const LASModuleProfile &, double)
std::pair< unsigned int, double > thePeak
unsigned int overdriveThreshold
void SetOverdriveThreshold(unsigned int)
double GetNegativity(int)
void EnableZeroFilter(bool)