DoubleMedian.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_DoubleMedian_h
10#define __Pulsar_DoubleMedian_h
11
12#include "Pulsar/Algorithm.h"
13#include "Pulsar/Archive.h"
14#include "Pulsar/TimeFrequencySmooth.h"
15
16namespace Pulsar {
17
19
23 class DoubleMedian : public TimeFrequencySmooth
24 {
25
26 public:
27
28 DoubleMedian();
29
31
34 virtual void smooth (std::vector<float> &smoothed,
35 std::vector<float> &raw, std::vector<float> &weight,
36 std::vector<float> &freqs, std::vector<float> &times);
37
38 void set_freq_range ( float r ) { freq_range = r; }
39 float get_freq_range () const { return freq_range; }
40
41 void set_time_range ( float r ) { time_range = r; }
42 float get_time_range () const { return time_range; }
43
44
45 // Text floaterface to the DoubleMedian class
46 class Interface : public TextInterface::To<DoubleMedian> {
47 public:
48 Interface (DoubleMedian* = 0);
49 std::string get_interface_name () const { return "dblmed"; }
50 };
51
54
55 // Return new instance
56 DoubleMedian* clone () const { return new DoubleMedian(); }
57
58 protected:
59
60 float freq_range; // MHz
61 float time_range; // sec
62
63 };
64
65}
66
67#endif
virtual void smooth(std::vector< float > &smoothed, std::vector< float > &raw, std::vector< float > &weight, std::vector< float > &freqs, std::vector< float > &times)
Smooth the data given in raw, output to smoothed.
Definition DoubleMedian.C:55
DoubleMedian * clone() const
Derived types must also define clone method.
Definition DoubleMedian.h:56
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition DoubleMedian.C:126
virtual std::string get_interface_name() const
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0