ProfileWeightFunction.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2005 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/More/General/Pulsar/ProfileWeightFunction.h
10
11#ifndef __Pulsar_ProfileWeightFunction_h
12#define __Pulsar_ProfileWeightFunction_h
13
14#include "Pulsar/PhaseWeightFunction.h"
15
16namespace Pulsar {
17
18 class Profile;
19
22 {
23
24 public:
25
28
31
33 virtual ProfileWeightFunction* clone () const = 0;
34
36 virtual void set_Profile (const Profile*);
37
40
43
45 bool consider (unsigned ibin) const;
46
48 virtual void get_weight (PhaseWeight* weight);
49
51 virtual PhaseWeight* operate (const Profile*);
52
54 static ProfileWeightFunction* factory (const std::string& name_and_parse);
55
56 protected:
57
60
62 virtual void calculate (PhaseWeight* weight) = 0;
63
66
69
70 };
71
72 std::ostream& operator<< (std::ostream&, ProfileWeightFunction*);
73
74 std::istream& operator>> (std::istream&, ProfileWeightFunction*&);
75
76}
77
78
79#endif // !defined __Pulsar_BaselineWeightFunction_h
Algorithms that produce PhaseWeight objects.
Definition PhaseWeightFunction.h:26
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
PhaseWeight algorithms that receive an input Profile.
Definition ProfileWeightFunction.h:22
Reference::To< PhaseWeight > exclude
Excluded phase bins.
Definition ProfileWeightFunction.h:68
void set_exclude(PhaseWeight *include)
Exclude the specified phase bins from consideration.
Definition ProfileWeightFunction.C:57
Reference::To< PhaseWeight > include
Included phase bins.
Definition ProfileWeightFunction.h:65
virtual void calculate(PhaseWeight *weight)=0
Derived classes implement the PhaseWeight calculation.
Reference::To< const Profile, false > profile
The Profile from which the PhaseWeight will be derived.
Definition ProfileWeightFunction.h:59
void set_include(PhaseWeight *include)
Include only the specified phase bins for consideration.
Definition ProfileWeightFunction.C:52
virtual void get_weight(PhaseWeight *weight)
Returns a PhaseWeight with the Profile attribute set.
Definition ProfileWeightFunction.C:35
bool consider(unsigned ibin) const
Return true if the specified phase bin should be considered.
Definition ProfileWeightFunction.C:62
virtual void set_Profile(const Profile *)
Set the Profile from which the PhaseWeight will be derived.
Definition ProfileWeightFunction.C:29
virtual ProfileWeightFunction * clone() const =0
Return a copy constructed instance of self.
static ProfileWeightFunction * factory(const std::string &name_and_parse)
Construct a new ProfileWeightFunction from a string.
Definition ProfileWeightFunction.C:88
virtual PhaseWeight * operate(const Profile *)
Convenience interface.
Definition ProfileWeightFunction.C:43
ProfileWeightFunction()
Default constructor.
Definition ProfileWeightFunction.C:15
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0