Pedestal

template<typename SUM_TYPE = double>
class Pedestal

Calculate the pedestal of a series of frames. Can be used as standalone but mostly used in the ClusterFinder.

Template Parameters:

SUM_TYPE – type of the sum

Public Functions

inline Pedestal(uint32_t rows, uint32_t cols, uint32_t n_samples = 1000)
~Pedestal() = default
inline NDArray<SUM_TYPE, 2> mean()
inline SUM_TYPE mean(const uint32_t row, const uint32_t col) const
inline SUM_TYPE std(const uint32_t row, const uint32_t col) const
inline SUM_TYPE variance(const uint32_t row, const uint32_t col) const
inline NDArray<SUM_TYPE, 2> variance()
inline NDArray<SUM_TYPE, 2> std()
inline void clear()
inline void clear(const uint32_t row, const uint32_t col)
template<typename T>
inline void push(NDView<T, 2> frame)
template<typename T>
inline void push_no_update(NDView<T, 2> frame)

Push but don’t update the cached mean. Speeds up the process when intitializing the pedestal.

template<typename T>
inline void push(Frame &frame)
inline uint32_t rows() const
inline uint32_t cols() const
inline uint32_t n_samples() const
inline NDArray<uint32_t, 2> cur_samples() const
inline NDArray<SUM_TYPE, 2> get_sum() const
inline NDArray<SUM_TYPE, 2> get_sum2() const
template<typename T>
inline void push(const uint32_t row, const uint32_t col, const T val_)
template<typename T>
inline void push_no_update(const uint32_t row, const uint32_t col, const T val_)
inline void update_mean()

Update the mean of the pedestal. This is used after having done push_no_update. It is not necessary to call this function after push.

template<typename T>
inline void push_fast(const uint32_t row, const uint32_t col, const T val_)

Private Members

uint32_t m_rows
uint32_t m_cols
uint32_t m_samples
NDArray<uint32_t, 2> m_cur_samples
NDArray<SUM_TYPE, 2> m_sum
NDArray<SUM_TYPE, 2> m_sum2
NDArray<SUM_TYPE, 2> m_mean