DeltaPA.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2005 - 2017 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Polarimetry/Pulsar/DeltaPA.h
10 
11 #ifndef __Pulsar_DeltaPA_h
12 #define __Pulsar_DeltaPA_h
13 
14 #include "Estimate.h"
15 #include "Pulsar/PhaseWeight.h"
16 
17 #include <vector>
18 
19 namespace Pulsar {
20 
21  class PolnProfile;
22 
24  class DeltaPA {
25 
26  public:
27 
29  DeltaPA () { threshold = 3.0; }
30 
32  ~DeltaPA () { }
33 
35  Estimate<double> get (const PolnProfile* p0, const PolnProfile* p1) const;
36 
38  unsigned get_used_bins () const { return used_bins; }
39 
41  void set_threshold (float t) { threshold = t; }
42  float get_threshold () const { return threshold; }
43 
45  void set_onpulse (PhaseWeight* w) { onpulse_weights = w; }
46 
48  void set_include (const std::vector<unsigned>& bins);
49 
51  void set_exclude (const std::vector<unsigned>& bins);
52 
53  protected:
54 
55  float threshold;
56  mutable unsigned used_bins;
57 
59  std::vector<unsigned> include_bins;
60 
62  std::vector<unsigned> exclude_bins;
63 
66 
67  };
68 
69 }
70 
71 #endif
~DeltaPA()
Destructor.
Definition: DeltaPA.h:37
const float * get_amps() const
Return a pointer to the amplitudes array.
Definition: ProfileAmps.C:141
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
unsigned get_used_bins() const
Get the number of phase bins used in the last call to get.
Definition: DeltaPA.h:43
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
void set_include(const std::vector< unsigned > &bins)
Set the phase bins to be included in the mean.
Definition: DeltaPA.C:109
Estimate< double > get(const PolnProfile *p0, const PolnProfile *p1) const
Get the position angle difference mean.
Definition: DeltaPA.C:124
DeltaPA()
Default constructor.
Definition: DeltaPA.h:34
U get_error() const
std::vector< unsigned > exclude_bins
Exclude the specified phase bins.
Definition: DeltaPA.h:67
unsigned get_nbin() const
Get the number of bins.
Definition: PolnProfile.C:139
Reference::To< PhaseWeight > onpulse_weights
Weights applied to each phase bin (defines on-pulse region)
Definition: DeltaPA.h:70
Adaptively computes the baseline, assuming normally distributed noise.
Definition: GaussianBaseline.h:70
Polarimetric pulse profile transformations and derivations.
Definition: PolnProfile.h:34
T get_value() const
virtual void get_weight(PhaseWeight *weight)
Returns a PhaseWeight with the Profile attribute set.
Definition: ProfileWeightFunction.C:26
std::vector< unsigned > include_bins
Include only the specified phase bins.
Definition: DeltaPA.h:64
virtual void set_Profile(const Profile *)
Set the Profile from which the PhaseWeight will be derived.
Definition: ProfileWeightFunction.C:20
void set_threshold(float t)
Set the cutoff threshold in units of the baseline noise.
Definition: DeltaPA.h:46
void set_exclude(const std::vector< unsigned > &bins)
Set the phase bins to be excluded from the mean.
Definition: DeltaPA.C:115
Defines the PSRCHIVE library.
Definition: CalSource.h:17
U get_variance() const
void get_linear(Profile *linear) const
Return the linear polarization profile.
Definition: PolnProfile.C:733
const ScalarMath atan2(const ScalarMath &y, const ScalarMath &x)
const Profile * get_Profile(unsigned ipol) const
Get the specifed constant profile.
Definition: PolnProfile.C:147
void set_onpulse(PhaseWeight *w)
Set the on-pulse mask.
Definition: DeltaPA.h:50

Generated using doxygen 1.8.17