PhaseWeightStatistic.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2020 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/PhaseWeightStatistic.h
10 
11 #ifndef __PhaseWeightStatistic_h
12 #define __PhaseWeightStatistic_h
13 
14 #include "UnaryStatistic.h"
15 
16 namespace Pulsar {
17 
18  class PhaseWeight;
19 
21  class PhaseWeightStatistic : public Identifiable::Decorator
22  {
23  public:
24 
26  static PhaseWeightStatistic* factory (const std::string& name);
27 
28  typedef std::vector< Reference::To<Pulsar::PhaseWeightStatistic> > registry_type;
29 
31  static const registry_type& children ();
32 
35 
37  virtual double get (const PhaseWeight*);
38 
40  virtual PhaseWeightStatistic* clone () const;
41 
42  private:
43 
45 
47  static void build ();
48  };
49 
50 }
51 
52 #endif
53 
PhaseWeightStatistic(UnaryStatistic *)
Construct from a UnaryStatistic.
Definition: PhaseWeightStatistic.C:21
void get_filtered(std::vector< float > &amps, bool equal=false, float wt=0) const
Return the filtered amplitudes for which weight != val.
Definition: PhaseWeight.C:510
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
virtual PhaseWeightStatistic * clone() const
Derived types must also define clone method.
Definition: PhaseWeightStatistic.C:40
static const registry_type & children()
Returns a list of available PhaseWeightStatistic children.
Definition: PhaseWeightStatistic.C:71
Commmon statistics that can be derived from a pulse profile.
Definition: PhaseWeightStatistic.h:26
static PhaseWeightStatistic * factory(const std::string &name)
Create a new instance of PhaseWeightStatistic based on name.
Definition: PhaseWeightStatistic.C:82
static const std::vector< UnaryStatistic * > & children()
Defines the PSRCHIVE library.
Definition: CalSource.h:17
virtual double get(const PhaseWeight *)
Derived types define the value returned.
Definition: PhaseWeightStatistic.C:28

Generated using doxygen 1.8.17