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
17namespace 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
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
80
83
86
88 Estimate<double> get_baseline_variance (unsigned ipol) const;
89
92
94 double get_linear_variance () const;
95
98
100 class Interface;
101
102 protected:
103
106
109
112
115
117 mutable Stokes< Estimate<double> > baseline_variance;
118
121 void build ();
122
123 };
124
125}
126
127
128#endif
129
130
131
Data manipulation implementations.
Definition Algorithm.h:19
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
Stokes< Estimate< double > > baseline_variance
The variance of the total intensity baseline.
Definition PolnProfileStats.h:117
void select_profile(const PolnProfile *)
Set the PolnProfile that defines the baseline and on-pulse regions.
Definition PolnProfileStats.C:60
TextInterface::Parser * get_interface()
Return a text interface that can be used to configure this instance.
Definition PolnProfileStats.C:333
Estimate< double > get_total_linear_squared() const
Returns the total linearly polarized flux squared of the on-pulse phase bins.
Definition PolnProfileStats.C:173
Reference::To< ProfileStats > stats
Computes the statistics of a single pulse profile.
Definition PolnProfileStats.h:108
Estimate< double > get_total_linear() const
Returns the total linearly polarized flux of the on-pulse phase bins.
Definition PolnProfileStats.C:152
void set_stats(ProfileStats *s)
Set the ProfileStats estimator.
Definition PolnProfileStats.h:55
Estimate< double > get_invariant() const
Returns the square root of the total squared invariant.
Definition PolnProfileStats.C:251
Estimate< double > get_baseline_variance(unsigned ipol) const
Returns the variance of the baseline for the specified polarization.
Definition PolnProfileStats.C:269
void set_regions(const PhaseWeight &pulse, const PhaseWeight &baseline)
Set the on-pulse and baseline regions.
Definition PolnProfileStats.C:89
double get_linear_variance() const
Returns the vairance of the linearly polarized flux.
Definition PolnProfileStats.C:325
Estimate< double > get_total_polarized_squared() const
Returns the total squared polarized flux of the on-pulse phase bins.
Definition PolnProfileStats.C:137
bool regions_set
True when the onpulse and baseline regions have been set.
Definition PolnProfileStats.h:111
Estimate< double > get_total_squared_invariant() const
Returns the total squared invariant of the on-pulse phase bins.
Definition PolnProfileStats.C:236
Stokes< Estimate< double > > get_stokes(unsigned ibin) const
Get the Stokes parameters for the specified phase bin.
Definition PolnProfileStats.C:221
void set_profile(const PolnProfile *)
Set the PolnProfile from which statistics will be derived.
Definition PolnProfileStats.C:45
Reference::To< const PolnProfile, false > profile
The PolnProfile from which statistics will be derived.
Definition PolnProfileStats.h:105
void get_regions(PhaseWeight &pulse, PhaseWeight &base) const
Set the on-pulse and baseline regions.
Definition PolnProfileStats.C:101
bool avoid_zero_determinant
True when zero determinant phase bins should be avoided.
Definition PolnProfileStats.h:114
Estimate< double > get_total_abs_circular() const
Returns the total absolute value of circularly polarized flux.
Definition PolnProfileStats.C:205
~PolnProfileStats()
Destructor.
Definition PolnProfileStats.C:35
Estimate< double > get_total_determinant() const
Returns the total determinant of the on-pulse phase bins.
Definition PolnProfileStats.C:258
void build()
Definition PolnProfileStats.C:285
void set_avoid_zero_determinant(bool flag=true)
Avoid on-pulse phase bins with det(rho) close to zero.
Definition PolnProfileStats.C:39
PolnProfileStats(const PolnProfile *profile=0)
Default constructor.
Definition PolnProfileStats.C:19
Estimate< double > get_total_circular() const
Returns the total circularly polarized flux of the on-pulse phase bins.
Definition PolnProfileStats.C:194
ProfileStats * get_stats()
Get the ProfileStats estimator.
Definition PolnProfileStats.h:51
Estimate< double > get_total_intensity() const
Returns the total flux of the on-pulse phase bins.
Definition PolnProfileStats.C:111
Estimate< double > get_total_polarized() const
Returns the total polarized flux of the on-pulse phase bins.
Definition PolnProfileStats.C:122
Polarimetric pulse profile transformations and derivations.
Definition PolnProfile.h:29
Computes pulse profile statistics.
Definition ProfileStats.h:32
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