pappso::FilterRescaleY Class Reference

rescales Y values into a dynamic range if the dynamic range is set to 0, this filter is ignored More...

`#include <filterpass.h>`

Inheritance diagram for pappso::FilterRescaleY:

## Public Member Functions

| FilterRescaleY (double dynamic)
| FilterRescaleY (const FilterRescaleY &other)
virtual | ~FilterRescaleY ()
FilterRescaleY & | operator= (const FilterRescaleY &other)
double | getDynamicRange () const
Trace & | filter (Trace &data_points) const override
Public Member Functions inherited from pappso::FilterInterface
virtual | ~FilterInterface ()

## Private Attributes

double | m_dynamic = 0

## Detailed Description

rescales Y values into a dynamic range if the dynamic range is set to 0, this filter is ignored

Definition at line 195 of file filterpass.h.

## Constructor & Destructor Documentation

## FilterRescaleY() [1/2]

FilterRescaleY::FilterRescaleY | ( | double | dynamic | ) |

Definition at line 361 of file filterpass.cpp.

: m_dynamic(dynamic)
{
}
pappso::FilterRescaleY::m_dynamic
double m_dynamic
Definition: filterpass.h:198

## FilterRescaleY() [2/2]

FilterRescaleY::FilterRescaleY | ( | const FilterRescaleY & | other | ) |

Definition at line 364 of file filterpass.cpp.

: m_dynamic(other.m_dynamic)
{
}

## ~FilterRescaleY()

virtual pappso::FilterRescaleY::~FilterRescaleY | ( |  | ) |

inline virtual

Definition at line 203 of file filterpass.h.

{};

## Member Function Documentation

## filter()

Trace & FilterRescaleY::filter | ( | Trace & | data_points | ) | const

override virtual

Implements pappso::FilterInterface.

Definition at line 369 of file filterpass.cpp.

{
if(m_dynamic == 0)
return data_points;
auto it_max = maxYDataPoint(data_points.begin(), data_points.end());
if(it_max == data_points.end())
return data_points;
double maximum = it_max->y;
for(auto &&dataPoint : data_points)
{
dataPoint.y = (dataPoint.y / maximum) * m_dynamic;
}
return data_points;
}
pappso::maxYDataPoint
std::vector< DataPoint >::const_iterator maxYDataPoint(std::vector< DataPoint >::const_iterator begin, std::vector< DataPoint >::const_iterator end)
Definition: trace.cpp:139

References m_dynamic, and pappso::maxYDataPoint().

Referenced by pappso::XtandemSpectrumProcess::process().

## getDynamicRange()

double FilterRescaleY::getDynamicRange | ( |  | ) | const

Definition at line 394 of file filterpass.cpp.

{
return m_dynamic;
}

References m_dynamic.

Referenced by pappso::XtandemSpectrumProcess::getDynamicRange().

## operator=()

FilterRescaleY & FilterRescaleY::operator= | ( | const FilterRescaleY & | other | ) |

Definition at line 385 of file filterpass.cpp.

{
m_dynamic = other.m_dynamic;
return *this;
}

References m_dynamic.

## Member Data Documentation

## m_dynamic

double pappso::FilterRescaleY::m_dynamic = 0

private

Definition at line 198 of file filterpass.h.

Referenced by filter(), getDynamicRange(), and operator=().

The documentation for this class was generated from the following files:

- pappsomspp/processing/filters/filterpass.h
- pappsomspp/processing/filters/filterpass.cpp