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
19namespace Pulsar {
20
21 class Archive;
22
24 class DeltaRM {
25
26 public:
27
29 DeltaRM ();
30
32 ~DeltaRM ();
33
37
41
43 unsigned get_used_bins () { return used_bins; }
44
46 void set_data (const Archive*);
47
49 void set_subint (unsigned idx) { isubint = idx; }
50 unsigned get_subint () const { return isubint; }
51
53 void refine ();
54
56 void set_threshold (float t) { threshold = t; }
57 float get_threshold () const { return threshold; }
58
61
63 void set_include (const std::vector<unsigned>& bins);
64
66 void set_exclude (const std::vector<unsigned>& bins);
67
69 void set_policy (FrequencyIntegrate::Divided*);
70
71 protected:
72
73 float threshold;
74 unsigned used_bins;
75
77 std::vector<unsigned> include_bins;
78
80 std::vector<unsigned> exclude_bins;
81
84
87
89 unsigned isubint = 0;
90
93
96 };
97
98}
99
100#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
Estimate< double > get_rotation_measure() const
Get the rotation measure.
Definition DeltaRM.h:39
void set_rotation_measure(const Estimate< double > &rm)
Set the rotation measure (initial guess)
Definition DeltaRM.h:35
void set_subint(unsigned idx)
Set the sub-integration index from which to derive the refined rotation measure.
Definition DeltaRM.h:49
std::vector< unsigned > include_bins
Include only the specified phase bins.
Definition DeltaRM.h:77
void refine()
Refine the rotation measure estimate.
Definition DeltaRM.C:86
void set_data(const Archive *)
Set the archive from which to derive the refined rotation measure.
Definition DeltaRM.C:38
std::vector< unsigned > exclude_bins
Exclude the specified phase bins.
Definition DeltaRM.h:80
Reference::To< const Archive > data
The archive from which the rotation measure will be refined.
Definition DeltaRM.h:86
Estimate< double > rotation_measure
The rotation measure.
Definition DeltaRM.h:83
unsigned get_used_bins()
Get the number of phase bins used in last call to refine.
Definition DeltaRM.h:43
Reference::To< FrequencyIntegrate::Divided > policy
Policy used to integrate frequency channels.
Definition DeltaRM.h:95
void set_exclude(const std::vector< unsigned > &bins)
Set the phase bins to be excluded from the computation.
Definition DeltaRM.C:74
~DeltaRM()
Destructor.
Definition DeltaRM.C:33
void set_onpulse(PhaseWeight *w)
Set the on-pulse mask.
Definition DeltaRM.h:60
DeltaRM()
Default constructor.
Definition DeltaRM.C:25
Reference::To< PhaseWeight > onpulse_weights
Weights applied to each phase bin (defines on-pulse region)
Definition DeltaRM.h:92
unsigned isubint
The index of the sub-integration from which the rotation measure will be refined.
Definition DeltaRM.h:89
void set_include(const std::vector< unsigned > &bins)
Set the phase bins to be included in the computation.
Definition DeltaRM.C:68
void set_policy(FrequencyIntegrate::Divided *)
Set the policy used to integrate frequency channels.
Definition DeltaRM.C:80
void set_threshold(float t)
Set the cutoff threshold in units of the baseline noise.
Definition DeltaRM.h:56
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0