Dispersion.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006-2010 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/Dispersion.h
10 
11 #ifndef __Pulsar_Dispersion_h
12 #define __Pulsar_Dispersion_h
13 
14 #include "Pulsar/ColdPlasma.h"
15 #include "Pulsar/Config.h"
16 #include "Pulsar/DispersionDelay.h"
17 #include "Pulsar/Dedisperse.h"
18 #include "Pulsar/IntegrationBarycentre.h"
19 
20 namespace Pulsar {
21 
23 
28  class Dispersion : public ColdPlasma<DispersionDelay,Dedisperse> {
29 
30  public:
31 
34 
36  double get_correction_measure (const Integration*);
37 
39  double get_absolute_measure (const Integration*);
40 
42  bool get_corrected (const Integration* data);
43 
45  double get_effective_measure (const Integration*);
46 
48  double get_identity () { return 0; }
49 
51  void combine (double& result, const double& add) { result += add; }
52 
54  void set (const Integration*);
55 
57  void apply (Integration*, unsigned channel);
58 
60  void execute (Archive*);
61 
63  void revert (Archive*);
64 
66  void set_dispersion_measure (double dispersion_measure)
67  { set_measure (dispersion_measure); }
68 
70  double get_dispersion_measure () const
71  { return get_measure (); }
72 
74  double get_shift () const;
75 
76  protected:
77 
78  double folding_period;
79 
80  static Option<bool> barycentric_correction;
82  double earth_doppler;
83 
84  };
85 
86 }
87 
88 #endif
double get_absolute_measure(const Integration *)
Return the auxiliary dispersion measure (0 if corrected)
Definition: Dispersion.C:52
double get_effective_measure(const Integration *)
Return the effective dispersion measure that remains to be corrected.
Definition: Dispersion.C:64
virtual unsigned get_npol() const =0
Get the number of polarization measurements.
void set(const Integration *)
Setup all necessary attributes.
Definition: Dispersion.C:114
void combine(double &result, const double &add)
Combine delays.
Definition: Dispersion.h:61
double get_dispersion_measure() const
Get the dispersion measure.
Definition: Dispersion.h:80
The primary interface to pulsar observational data.
Definition: Archive.h:45
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
bool get_corrected(const Integration *data)
Return true if the Integration has been dedispersed.
Definition: Dispersion.C:73
Corrects dielectric effects in cold plasma.
Definition: ColdPlasma.h:43
virtual void set_dispersion_measure(double dm)=0
Set the dispersion measure (in )
virtual void set_dedispersed(bool done=true)=0
Set the value to be returned by get_dedispersed.
double get_identity()
Return zero delay.
Definition: Dispersion.h:58
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
double get_dispersion_measure() const
Get the dispersion measure (in )
Definition: Integration.C:456
double get_measure() const
Get the correction measure.
Definition: ColdPlasma.h:233
Dispersion()
Default constructor.
Definition: Dispersion.C:34
void set_measure(double measure)
Set the correction measure.
Definition: ColdPlasma.h:227
void apply(Integration *, unsigned channel)
Phase rotate each profile by the correction.
Definition: Dispersion.C:97
void execute(Archive *)
Apply the current correction to all sub-integrations in an archive.
Definition: Dispersion.C:82
double get_correction_measure(const Integration *)
Return the dispersion measure due to the ISM.
Definition: Dispersion.C:42
double get_effective_dispersion_measure() const
Get the effective dispersion measure that remains to be corrected.
Definition: Integration.C:500
double get_shift() const
Get the phase shift.
Definition: Dispersion.C:121
void revert(Archive *)
Undo the correction.
Definition: Dispersion.C:91
Convenience interface to Barycentre class.
Definition: IntegrationBarycentre.h:25
Auxiliary cold plasma dispersion and birefringence corrections.
Definition: AuxColdPlasma.h:26
double get_dispersion_measure() const
Get the auxiliary dispersion measure.
Definition: AuxColdPlasmaMeasures.C:29
bool get_dedispersed() const
Inter-channel dispersion delay has been removed.
Definition: Integration.C:467
bool get_auxiliary_dispersion_corrected() const
Auxiliary inter-channel dispersion delay has been removed.
Definition: Integration.C:530
Defines the PSRCHIVE library.
Definition: CalSource.h:17
Stores parameters used to correct auxiliary dispersion and birefringence.
Definition: AuxColdPlasmaMeasures.h:24
virtual double get_folding_period() const =0
Get the folding or topocentric pulsar period (in seconds)
Profile * get_Profile(unsigned ipol, unsigned ichan)
Returns a pointer to the Profile given by the specified indeces.
Definition: Integration.C:306
const ExtensionType * get() const
Template method searches for an Extension of the specified type.
void set_dispersion_measure(double dispersion_measure)
Set the dispersion measure.
Definition: Dispersion.h:76

Generated using doxygen 1.8.17