SumThreshold.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2018 by Paul Demorest
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9#ifndef __Pulsar_SumThreshold_h
10#define __Pulsar_SumThreshold_h
11
12#include "Pulsar/Algorithm.h"
13#include "Pulsar/Archive.h"
14#include "Pulsar/TimeFrequencyMask.h"
15
16namespace Pulsar {
17
19
22 class SumThreshold : public TimeFrequencyMask
23 {
24
25 public:
26
27 SumThreshold();
28
30
33 unsigned update_mask (std::vector<float> &mask,
34 std::vector<float> &stat,
35 std::vector<float> &model,
36 unsigned nsubint, unsigned nchan, unsigned npol);
37
38 void set_nlevel ( unsigned n ) { nlevel = n; }
39 unsigned get_nlevel () const { return nlevel; }
40
41 // Text interface to the SumThreshold class
42 class Interface : public TextInterface::To<SumThreshold> {
43 public:
44 Interface (SumThreshold* = 0);
45 std::string get_interface_name () const { return "sumthresh"; }
46 };
47
50
51 // Return new instance
52 SumThreshold* clone () const { return new SumThreshold(); }
53
54 protected:
55
57 unsigned nlevel;
58
59 };
60
61}
62
63#endif
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition SumThreshold.C:188
unsigned update_mask(std::vector< float > &mask, std::vector< float > &stat, std::vector< float > &model, unsigned nsubint, unsigned nchan, unsigned npol)
Smooth the data given in raw, output to smoothed.
Definition SumThreshold.C:42
unsigned nlevel
Number of levels.
Definition SumThreshold.h:57
SumThreshold * clone() const
Derived types must also define clone method.
Definition SumThreshold.h:52
virtual std::string get_interface_name() const
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0