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
19namespace 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
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
void set_onpulse(PhaseWeight *w)
Set the on-pulse mask.
Definition DeltaPA.h:45
void set_exclude(const std::vector< unsigned > &bins)
Set the phase bins to be excluded from the mean.
Definition DeltaPA.C:115
Estimate< double > get(const PolnProfile *p0, const PolnProfile *p1) const
Get the position angle difference mean.
Definition DeltaPA.C:124
void set_threshold(float t)
Set the cutoff threshold in units of the baseline noise.
Definition DeltaPA.h:41
std::vector< unsigned > exclude_bins
Exclude the specified phase bins.
Definition DeltaPA.h:62
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 DeltaPA.h:59
Reference::To< PhaseWeight > onpulse_weights
Weights applied to each phase bin (defines on-pulse region)
Definition DeltaPA.h:65
DeltaPA()
Default constructor.
Definition DeltaPA.h:29
~DeltaPA()
Destructor.
Definition DeltaPA.h:32
unsigned get_used_bins() const
Get the number of phase bins used in the last call to get.
Definition DeltaPA.h:38
Stores a weight for each Profile phase bin.
Definition PhaseWeight.h:24
Polarimetric pulse profile transformations and derivations.
Definition PolnProfile.h:29
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0