WeightInterpreter.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/WeightInterpreter.h
10 
11 #ifndef __Pulsar_WeightInterpreter_h
12 #define __Pulsar_WeightInterpreter_h
13 
14 #include "CommandParser.h"
15 #include "Functor.h"
16 
17 namespace Pulsar {
18 
19  class Integration;
20 
22 
23  class WeightInterpreter : public CommandParser {
24 
25  public:
26 
27  typedef Functor< void (Integration*) > Policy;
28 
31 
33  std::string radiometer (const std::string& args);
34 
36  std::string time (const std::string& args);
37 
39  std::string snr (const std::string& args);
40 
42  std::string none (const std::string& args);
43 
45  std::string empty ();
46 
47  protected:
48 
51 
54 
57 
59  Policy& policy;
60 
61  };
62 
63 }
64 
65 #endif
Sets the weight of each Integration according to its duration.
Definition: DurationWeight.h:24
std::string empty()
Return the configuration string of the current weighting policy.
Definition: WeightInterpreter.C:82
Policy time_functor
The duration weighting policy.
Definition: WeightInterpreter.h:58
Policy & policy
The policy to be modified.
Definition: WeightInterpreter.h:64
WeightInterpreter(Policy &)
Construct with reference to the policy to be modified.
Definition: WeightInterpreter.C:15
std::string time(const std::string &args)
Install the DurationWeight policy.
Definition: WeightInterpreter.C:51
void weight(Integration *)
Set integration weights.
Definition: IntegrationWeight.C:18
Sets the weight of each Integration according to its duration.
Definition: RadiometerWeight.h:24
Sets the weight of each Profile according to its S/N squared.
Definition: SNRWeight.h:24
Policy radiometer_functor
The radiometer equation weighting policy.
Definition: WeightInterpreter.h:55
Policy snr_functor
The snr weighting policy.
Definition: WeightInterpreter.h:61
std::string radiometer(const std::string &args)
Install the RadiometerWeight policy.
Definition: WeightInterpreter.C:39
std::string snr(const std::string &args)
Install the SNRWeight policy.
Definition: WeightInterpreter.C:63
const std::string get_message() const
Defines the PSRCHIVE library.
Definition: CalSource.h:17
std::string none(const std::string &args)
Disable weighting.
Definition: WeightInterpreter.C:75

Generated using doxygen 1.8.17