Pulsar::ColdPlasma< Corrector, History > Class Template Referenceabstract

Corrects dielectric effects in cold plasma. More...

#include <ColdPlasma.h>

Inheritance diagram for Pulsar::ColdPlasma< Corrector, History >:
Pulsar::Transformation< Integration > Pulsar::Algorithm Reference::Able Reference::HeapTracked

Public Types

typedef Corrector::Return Type
 

Public Member Functions

 ColdPlasma ()
 Default constructor.
 
virtual double get_correction_measure (const Integration *)=0
 Return the measure to be corrected with respect to centre frequency.
 
virtual double get_absolute_measure (const Integration *)=0
 Return the measure to be corrected with respect to infinite frequency.
 
virtual bool get_corrected (const Integration *)=0
 Return true if the data have been corrected.
 
virtual double get_effective_measure (const Integration *)=0
 Derived classes must return the effective measure to be corrected.
 
virtual Type get_identity ()=0
 Derived classes must define the identity.
 
virtual void combine (Type &result, const Type &add)=0
 Derived classes must define the operator.
 
virtual void apply (Integration *, unsigned channel)=0
 Derived classes must define how to apply the correction.
 
virtual void execute (Archive *)
 Execute the correction for an entire Archive.
 
void just_do_it (Archive *)
 Just do the correction (off the books)
 
virtual void revert (Archive *)
 Revert the correction for an entire Archive.
 
void transform (Integration *)
 The default correction.
 
void setup (const Integration *)
 Set up internal variables before execution. More...
 
void update (const Integration *)
 update internal variables before execution More...
 
virtual void set (const Integration *data)
 Calls setup then update.
 
virtual void set_Profile (const Profile *data)
 Set the frequency for which the correction will be computed.
 
void execute1 (Integration *)
 Execute the correction.
 
void revert1 (Integration *)
 Undo the correction.
 
void correct (Integration *, unsigned ichan, unsigned jchan, double freq)
 Correct the selected range according to effective_measure. More...
 
void match (const Integration *reference, Integration *to_be_corrected)
 Correct the second argument as the first argument was corrected.
 
void set_reference_wavelength (double metres)
 Set the reference wavelength in metres.
 
double get_reference_wavelength () const
 Get the reference wavelength.
 
void set_reference_frequency (double MHz)
 Set the reference frequency in MHz.
 
double get_reference_frequency () const
 Get the reference frequency in MHz.
 
void set_measure (double measure)
 Set the correction measure.
 
double get_measure () const
 Get the correction measure.
 
void set_delta (const Type &d)
 Set the correction due to a change in reference wavelength.
 
Type get_delta () const
 Get the correction due to a change in reference wavelength.
 
- Public Member Functions inherited from Pulsar::Transformation< Integration >
void operator() (Integration *container)
 Functor interface.
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Protected Member Functions

void range (Integration *, unsigned ichan, unsigned jchan)
 Execute the correction on the selected range. More...
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

Corrector corrector
 The dielectric effect corrector.
 
Type delta
 The correction due to a change in reference wavelength.
 
std::string name
 The name to be used in verbose messages.
 
std::string val
 The name of the correction measure.
 

Friends

class Integration
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 

Detailed Description

template<class Corrector, class History>
class Pulsar::ColdPlasma< Corrector, History >

Corrects dielectric effects in cold plasma.

Corrections are performed with respect to a reference frequency. By default, this is the centre frequency of the Integration; however, it is possible to correct with respect to an arbitrary frequency or wavelength (including zero wavelength = infinite frequency).

The main point to this template base class is the standardization of dispersion and Faraday rotation corrections. The data to be corrected may have already been corrected once before, with a different dispersion/rotation measure and/or refererence wavelength. This class ensures that past corrections are treated properly, through use of a History class (an Integration::Extension).

Member Function Documentation

◆ correct()

template<class C , class H >
void Pulsar::ColdPlasma< C, H >::correct ( Integration subint,
unsigned  ichan,
unsigned  kchan,
double  reference_frequency 
)

Correct the selected range according to effective_measure.

Parameters
ichanthe first channel to be corrected
kchanone greater than the last channel to be corrected
reference_frequencythe reference frequency

◆ range()

template<class C , class H >
void Pulsar::ColdPlasma< C, H >::range ( Integration data,
unsigned  ichan,
unsigned  kchan 
)
protected

Execute the correction on the selected range.

This worker method performs the correction on a specified range of frequency channels

Parameters
ichanthe first channel to be corrected
kchanone more than the last channel to be corrected
Precondition
the measure and reference_wavelength attributes will have been set prior to calling this method
the delta attribute will have been properly set or reset

◆ setup()

template<class C , class H >
void Pulsar::ColdPlasma< C, H >::setup ( const Integration data)

Set up internal variables before execution.

Postcondition
reference_frequency = Integration::get_centre_frequency

◆ update()

template<class Corrector , class History >
void Pulsar::ColdPlasma< Corrector, History >::update ( const Integration data)

update internal variables before execution

Postcondition
get_measure -= corrected_measure

The documentation for this class was generated from the following file:

Generated using doxygen 1.8.17