Smooth.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2004 - 2016 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/Smooth.h
10
11#ifndef __Pulsar_Smooth_h
12#define __Pulsar_Smooth_h
13
14#include "Pulsar/Transformation.h"
15#include "TextInterface.h"
16#include "PhaseRange.h"
17
18namespace Pulsar {
19
20 class Profile;
21
23 class Smooth : public Transformation<Profile>
24 {
25
26 public:
27
29 Smooth ();
30
32 virtual ~Smooth ();
33
35 virtual Smooth* clone () const = 0;
36
39
41 class Interface;
42
44 void set_width (const Phase::Value& w) { width = w; }
45
47 Phase::Value get_width () const { return width; }
48
50 void set_turns (float);
51
53 float get_turns () const;
54
56 void set_bins (float);
57
59 float get_bins () const;
60
62 static Smooth* factory (const std::string& name_and_options);
63
64 protected:
65
67 float get_bins (const Profile*);
68
70 float get_turns (const Profile*);
71
74 };
75
77 class Smooth::Interface : public TextInterface::To<Smooth>
78 {
79 public:
80 Interface (Smooth* instance);
81 };
82}
83
84#endif
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Profile smoothing algorithms.
Definition Smooth.h:24
static Smooth * factory(const std::string &name_and_options)
Construct a new Smooth instance from a string.
Definition Smooth.C:88
float get_bins() const
Get the width of the smoothing window in phase bins.
Definition Smooth.C:50
void set_width(const Phase::Value &w)
Set the width of the smoothing function.
Definition Smooth.h:44
void set_turns(float)
Set the width of the smoothing window in turns.
Definition Smooth.C:23
virtual Smooth * clone() const =0
Return a copy constructed instance of self.
Smooth()
Default constructor.
Definition Smooth.C:13
void set_bins(float)
Set the width of the smoothing window in phase bins.
Definition Smooth.C:39
Phase::Value width
The width of the smoothing.
Definition Smooth.h:73
virtual ~Smooth()
Destructor.
Definition Smooth.C:18
virtual TextInterface::Parser * get_interface()=0
Return a text interface that can be used to configure this instance.
float get_turns() const
Get the width of the smoothing window in turns.
Definition Smooth.C:33
Phase::Value get_width() const
Get the width of the smoothing function.
Definition Smooth.h:47
Algorithms that modify data in the Container.
Definition Transformation.h:20
Reference::To< C, false > instance
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0