PolnProfileStats.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/Polarimetry/Pulsar/PolnProfileStats.h
10 
11 #ifndef __Pulsar_PolnProfileStats_h
12 #define __Pulsar_PolnProfileStats_h
13 
14 #include "Pulsar/ProfileStats.h"
15 #include "Stokes.h"
16 
17 namespace Pulsar {
18 
19  class PolnProfile;
20 
22  class PolnProfileStats : public Algorithm {
23 
24  public:
25 
28 
31 
33  void set_avoid_zero_determinant (bool flag=true);
34 
36  void set_profile (const PolnProfile*);
37 
39  void select_profile (const PolnProfile*);
40 
42  void select_profile (const Profile*);
43 
45  void set_regions (const PhaseWeight& pulse, const PhaseWeight& baseline);
46 
48  void get_regions (PhaseWeight& pulse, PhaseWeight& base) const;
49 
51  ProfileStats* get_stats () { return stats; }
52  const ProfileStats* get_stats () const { return stats; }
53 
55  void set_stats (ProfileStats* s) { stats = s; }
56 
58  Stokes< Estimate<double> > get_stokes (unsigned ibin) const;
59 
62 
65 
68 
71 
74 
77 
79  Estimate<double> get_baseline_variance (unsigned ipol) const;
80 
82  double get_linear_variance () const;
83 
86 
88  class Interface;
89 
90  protected:
91 
94 
97 
99  bool regions_set;
100 
103 
105  mutable Stokes< Estimate<double> > baseline_variance;
106 
109  void build ();
110 
111  };
112 
113 }
114 
115 
116 #endif
117 
118 
119 
void build()
Computes the phase bin masks.
Definition: PolnProfileStats.C:265
Reference::To< ProfileStats > stats
Computes the statistics of a single pulse profile.
Definition: PolnProfileStats.h:101
Reference::To< const PolnProfile, false > profile
The PolnProfile from which statistics will be derived.
Definition: PolnProfileStats.h:93
Estimate< double > get_total_circular() const
Returns the total circularly polarized flux of the on-pulse phase bins.
Definition: PolnProfileStats.C:176
bool avoid_zero_determinant
True when zero determinant phase bins should be avoided.
Definition: PolnProfileStats.h:107
Stokes< Estimate< double > > get_stokes(unsigned ibin) const
Get the Stokes parameters for the specified phase bin.
Definition: PolnProfileStats.C:203
PolnProfileStats(const PolnProfile *profile=0)
Default constructor.
Definition: PolnProfileStats.C:19
bool regions_set
True when the onpulse and baseline regions have been set.
Definition: PolnProfileStats.h:104
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
void select_profile(const PolnProfile *)
Set the PolnProfile that defines the baseline and on-pulse regions.
Definition: PolnProfileStats.C:66
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
void set_regions(const PhaseWeight &pulse, const PhaseWeight &baseline)
Set the on-pulse and baseline regions.
Definition: PolnProfileStats.C:101
Stokes< Estimate< double > > baseline_variance
The variance of the total intensity baseline.
Definition: PolnProfileStats.h:110
Estimate< double > get_total_intensity() const
Returns the total flux of the on-pulse phase bins.
Definition: PolnProfileStats.C:125
void set_stats(ProfileStats *s)
Set the ProfileStats estimator.
Definition: PolnProfileStats.h:60
Estimate< double > get_total_polarized() const
Returns the total polarized flux of the on-pulse phase bins.
Definition: PolnProfileStats.C:136
Archive statistics text interface.
Definition: PolnProfileStatsInterface.h:25
Estimate< double > get_baseline_variance(unsigned ipol) const
Returns the variance of the baseline for the specified polarization.
Definition: PolnProfileStats.C:247
Estimate< double > get_total_linear() const
Returns the total linearly polarized flux of the on-pulse phase bins.
Definition: PolnProfileStats.C:151
Polarimetric pulse profile transformations and derivations.
Definition: PolnProfile.h:34
~PolnProfileStats()
Destructor.
Definition: PolnProfileStats.C:38
ProfileStats * get_stats()
Get the ProfileStats estimator.
Definition: PolnProfileStats.h:56
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition: PolnProfileStats.C:319
Estimate< double > get_total_determinant() const
Returns the total determinant of the on-pulse phase bins.
Definition: PolnProfileStats.C:218
void set_avoid_zero_determinant(bool flag=true)
Avoid on-pulse phase bins with det(rho) close to zero.
Definition: PolnProfileStats.C:42
double get_linear_variance() const
Returns the vairance of the linearly polarized flux.
Definition: PolnProfileStats.C:311
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void get_regions(PhaseWeight &pulse, PhaseWeight &base) const
Set the on-pulse and baseline regions.
Definition: PolnProfileStats.C:114
Estimate< double > get_total_abs_circular() const
Returns the total absolute value of circularly polarized flux.
Definition: PolnProfileStats.C:187
Computes pulse profile statistics.
Definition: ProfileStats.h:35
void set_profile(const PolnProfile *)
Set the PolnProfile from which statistics will be derived.
Definition: PolnProfileStats.C:48

Generated using doxygen 1.8.17