ProfileStatistic.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/ProfileStatistic.h
10 
11 #ifndef __ProfileStatistic_h
12 #define __ProfileStatistic_h
13 
14 #include "UnaryStatistic.h"
15 
16 namespace Pulsar {
17 
18  class Profile;
19 
21  class ProfileStatistic : public Identifiable::Decorator
22  {
23  public:
24 
26  static ProfileStatistic* factory (const std::string& name);
27 
29  static const std::vector<ProfileStatistic*>& children ();
30 
33 
35  virtual double get (const Profile*);
36 
38  virtual ProfileStatistic* clone () const;
39 
40  private:
41 
43 
45  static void build ();
46  };
47 
48 }
49 
50 #endif
51 
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
unsigned get_nbin() const
Return the number of bins.
Definition: ProfileAmps.h:50
Commmon statistics that can be derived from a pulse profile.
Definition: ProfileStatistic.h:26
virtual ProfileStatistic * clone() const
Derived types must also define clone method.
Definition: ProfileStatistic.C:33
virtual double get(const Profile *)
Derived types define the value returned.
Definition: ProfileStatistic.C:27
static const std::vector< ProfileStatistic * > & children()
Returns a list of available ProfileStatistic children.
Definition: ProfileStatistic.C:64
ProfileStatistic(UnaryStatistic *)
Construct from a UnaryStatistic.
Definition: ProfileStatistic.C:20
static ProfileStatistic * factory(const std::string &name)
Create a new instance of ProfileStatistic based on name.
Definition: ProfileStatistic.C:75
static const std::vector< UnaryStatistic * > & children()
Defines the PSRCHIVE library.
Definition: CalSource.h:17

Generated using doxygen 1.8.17