DeltaRM.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/DeltaRM.h
10 
11 #ifndef __Pulsar_DeltaRM_h
12 #define __Pulsar_DeltaRM_h
13 
14 #include "Pulsar/PhaseWeight.h"
15 #include "Pulsar/FrequencyIntegrate.h"
16 
17 #include "Estimate.h"
18 
19 namespace Pulsar {
20 
21  class Archive;
22 
24  class DeltaRM {
25 
26  public:
27 
29  DeltaRM ();
30 
32  ~DeltaRM ();
33 
35  void set_rotation_measure (const Estimate<double>& rm)
36  { rotation_measure = rm; }
37 
40  { return rotation_measure; }
41 
43  unsigned get_used_bins () { return used_bins; }
44 
46  void set_data (Archive*);
47 
49  void refine ();
50 
52  void set_threshold (float t) { threshold = t; }
53  float get_threshold () const { return threshold; }
54 
56  void set_onpulse (PhaseWeight* w) { onpulse_weights = w; }
57 
59  void set_include (const std::vector<unsigned>& bins);
60 
62  void set_exclude (const std::vector<unsigned>& bins);
63 
65  void set_policy (FrequencyIntegrate::Divided*);
66 
67  protected:
68 
69  float threshold;
70  unsigned used_bins;
71 
73  std::vector<unsigned> include_bins;
74 
76  std::vector<unsigned> exclude_bins;
77 
80 
83 
86 
89  };
90 
91 }
92 
93 #endif
~DeltaRM()
Destructor.
Definition: DeltaRM.C:32
Reference::To< PhaseWeight > onpulse_weights
Weights applied to each phase bin (defines on-pulse region)
Definition: DeltaRM.h:90
void refine()
Refine the rotation measure estimate.
Definition: DeltaRM.C:85
Computes mean position angle difference from weighted cross-correlation.
Definition: DeltaPA.h:29
Integrates frequency channels in an Integration.
Definition: FrequencyIntegrate.h:46
DeltaRM()
Default constructor.
Definition: DeltaRM.C:24
std::vector< unsigned > exclude_bins
Exclude the specified phase bins.
Definition: DeltaRM.h:81
unsigned get_used_bins() const
Get the number of phase bins used in the last call to get.
Definition: DeltaPA.h:43
The primary interface to pulsar observational data.
Definition: Archive.h:45
Estimate< double > rotation_measure
The rotation measure.
Definition: DeltaRM.h:84
Plots a single pulse profile.
Definition: StokesCylindrical.h:28
void set_include(const std::vector< unsigned > &bins)
Set the phase bins to be included in the mean.
Definition: DeltaPA.C:109
std::vector< unsigned > include_bins
Include only the specified phase bins.
Definition: DeltaRM.h:78
Estimate< double > get(const PolnProfile *p0, const PolnProfile *p1) const
Get the position angle difference mean.
Definition: DeltaPA.C:124
void transform(Integration *)
The frequency integration operation.
Definition: FrequencyIntegrate.C:47
Reference::To< Archive > data
The archive from which the rotation measure will be refined.
Definition: DeltaRM.h:87
void set_exclude(const std::vector< unsigned > &bins)
Set the phase bins to be excluded from the computation.
Definition: DeltaRM.C:73
void set_include(const std::vector< unsigned > &bins)
Set the phase bins to be included in the computation.
Definition: DeltaRM.C:67
Estimate< double > get_rotation_measure() const
Get the rotation measure.
Definition: DeltaRM.h:44
unsigned get_used_bins()
Get the number of phase bins used in last call to refine.
Definition: DeltaRM.h:48
void set_data(Archive *)
Set the archive from which to derive the refined rotation measure.
Definition: DeltaRM.C:37
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
Reference::To< FrequencyIntegrate::Divided > policy
Policy used to integrate frequency channels.
Definition: DeltaRM.h:93
void set_policy(FrequencyIntegrate::Divided *)
Set the policy used to integrate frequency channels.
Definition: DeltaRM.C:79
void set_rotation_measure(const Estimate< double > &rm)
Set the rotation measure (initial guess)
Definition: DeltaRM.h:40
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_threshold(float t)
Set the cutoff threshold in units of the baseline noise.
Definition: DeltaRM.h:57
virtual void set_range_policy(RangePolicy *rp)
Set the range division policy.
Definition: Integrate.h:57
void set_onpulse(PhaseWeight *w)
Set the on-pulse mask.
Definition: DeltaRM.h:61
void set_onpulse(PhaseWeight *w)
Set the on-pulse mask.
Definition: DeltaPA.h:50

Generated using doxygen 1.8.17