Pulsar::OffPulseCalibrator Class Reference

Uses the off-pulse noise statistics to scale the polarization. More...

#include <OffPulseCalibrator.h>

Inheritance diagram for Pulsar::OffPulseCalibrator:
Pulsar::SingleAxisCalibrator Pulsar::ReferenceCalibrator Pulsar::PolnCalibrator Pulsar::Calibrator Reference::Able Reference::HeapTracked

Public Member Functions

 OffPulseCalibrator (const Archive *archive)
 Construct from an single PolnCal Pulsar::Archive.
 
 ~OffPulseCalibrator ()
 Destructor.
 
void calibrate (Archive *archive)
 Calibrate the polarization of the given archive. More...
 
- Public Member Functions inherited from Pulsar::SingleAxisCalibrator
 SingleAxisCalibrator (const Archive *archive)
 Construct from an single PolnCal Pulsar::Archive. More...
 
 SingleAxisCalibrator (const SingleAxisCalibrator &)
 Copy constructor.
 
SingleAxisCalibratorclone () const
 Clone operator.
 
 ~SingleAxisCalibrator ()
 Destructor.
 
Infoget_Info () const
 Return the SingleAxisCalibrator information.
 
- Public Member Functions inherited from Pulsar::ReferenceCalibrator
 ReferenceCalibrator (const Archive *archive)
 Construct from an single PolnCal Pulsar::Archive.
 
 ReferenceCalibrator (const ReferenceCalibrator &)
 Copy constructor.
 
 ~ReferenceCalibrator ()
 Destructor.
 
void set_reference_source (const Stokes< Estimate< double > > &stokes)
 Set the Stokes parameters of the reference source.
 
Stokes< Estimate< double > > get_reference_source () const
 Get the Stokes parameters of the reference source.
 
void set_outlier_threshold (float f)
 Set the threshold used to reject outliers when computing levels.
 
float get_outlier_threshold () const
 Get the threshold used to reject outliers when computing levels.
 
void get_levels (unsigned nchan, std::vector< std::vector< Estimate< double > > > &hi, std::vector< std::vector< Estimate< double > > > &lo) const
 Return the mean levels of the calibrator hi and lo states.
 
virtual void set_nchan (unsigned nchan)
 Set the number of frequency channels in the response array.
 
- Public Member Functions inherited from Pulsar::PolnCalibrator
 PolnCalibrator (const Archive *archive=0)
 Construct with optional processed calibrator Archive. More...
 
 PolnCalibrator (const PolnCalibrator &calibrator)
 Copy constructor.
 
virtual ~PolnCalibrator ()
 Destructor.
 
void set_subint (const Index &isub)
 Set the sub-integration index.
 
virtual void set_response_nchan (unsigned nchan)
 Set the number of frequency channels in the response array.
 
virtual unsigned get_response_nchan () const
 Get the number of frequency channels in the response array.
 
virtual Jones< float > get_response (unsigned ichan) const
 Return the system response for the specified channel.
 
bool has_Receiver () const
 Return true if the Receiver is set.
 
const Receiverget_Receiver () const
 Return the Receiver.
 
void set_Receiver (const Archive *)
 Set the Receiver extension to that of the input Archive.
 
std::string get_receiver_basis_filename () const
 
void transformation_resize (unsigned nchan)
 
bool get_transformation_valid (unsigned ch) const
 Return true if the transformation for the specified channel is valid. More...
 
void set_transformation_invalid (unsigned ch, const std::string &reason)
 Set the transformation invalid flag for the specified channel. More...
 
const std::string & get_transformation_invalid_reason (unsigned ichan) const
 Get the reason that the transformation in the specified channel is invalid.
 
const MEAL::Complex2get_transformation (unsigned ichan) const
 Return the transformation for the specified channel. More...
 
MEAL::Complex2get_transformation (unsigned ichan)
 Return the transformation for the specified channel. More...
 
void set_transformation (unsigned ichan, MEAL::Complex2 *)
 Set the transformation for the secified channel.
 
bool has_covariance () const
 Return true if parameter covariances are stored.
 
void get_covariance (unsigned ichan, std::vector< double > &) const
 Return the covariance matrix vector for the specified channel.
 
virtual bool has_solver () const
 Return true if least squares minimization solvers are available.
 
virtual const MEAL::LeastSquaresget_solver (unsigned ichan) const
 Return the transformation for the specified channel.
 
MEAL::LeastSquaresget_solver (unsigned ichan)
 
void set_backend_correction (bool f)
 Perform backend corrections before inverting response.
 
virtual const Typeget_type () const
 Return the Calibrator::Type of derived class.
 
virtual unsigned get_nchan () const
 Get the number of frequency channels in the calibrator.
 
unsigned get_nchan (bool build_if_needed) const
 Get the number of frequency channels in the calibrator.
 
CalibratorExtensionnew_Extension () const
 Return a new PolnCalibratorExtension.
 
void calibration_setup (const Archive *arch)
 Set up done before calibrating an archive.
 
- Public Member Functions inherited from Pulsar::Calibrator
 Calibrator ()
 Default constructor.
 
virtual ~Calibrator ()
 Destructor.
 
Archivenew_solution (const std::string &archive_class) const
 Return a new processed calibrator Archive with a CalibratorExtension.
 
virtual MJD get_epoch () const
 Return the reference epoch of the calibration experiment.
 
virtual std::string get_filenames () const
 Return a string containing the file information.
 
const Archiveget_Archive () const
 Return a const reference to the calibrator archive.
 
template<class T >
bool is_a () const
 
- 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 extra (unsigned ichan, const std::vector< Estimate< double > > &source, const std::vector< Estimate< double > > &sky)
 Disable the differential gain correction.
 
- Protected Member Functions inherited from Pulsar::SingleAxisCalibrator
MEAL::Complex2solve (const std::vector< Estimate< double > > &hi, const std::vector< Estimate< double > > &lo)
 Return a new Calibration::SingleAxis instance. More...
 
- Protected Member Functions inherited from Pulsar::ReferenceCalibrator
void set_calibrator (const Archive *archive)
 Filter access to the calibrator.
 
void calculate_transformation ()
 Solve using the observation of the reference source.
 
void calculate (std::vector< std::vector< Estimate< double > > > &hi, std::vector< std::vector< Estimate< double > > > &lo)
 Does the calculation of the above.
 
- Protected Member Functions inherited from Pulsar::PolnCalibrator
void setup_transformation () const
 Set up to call calculate_transformation.
 
virtual bool get_valid (unsigned ichan) const
 Derived classes can add conditions for channel validity. More...
 
float get_weight (unsigned ichan) const
 Return the weight (0 or 1) of the specified channel.
 
virtual unsigned get_maximum_nchan () const
 Derived classes may be able to shrink the transformation array. More...
 
- Protected Member Functions inherited from Pulsar::Calibrator
void copy_variation (Calibrator *)
 
void set_variation (Variation *var)
 
const Archiveget_calibrator () const
 Provide derived classes with access to the calibrator. More...
 
Archiveget_calibrator ()
 Provide derived classes with mutable access to the calibrator.
 
bool has_calibrator () const
 Return true if the calibrator attribute has been set. More...
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Pulsar::ReferenceCalibrator
static ReferenceCalibratorfactory (const Calibrator::Type *, const Archive *)
 Factory creates instances of derived types.
 
static void get_levels (const Archive *archive, Index subint, unsigned nchan, std::vector< std::vector< Estimate< double > > > &hi, std::vector< std::vector< Estimate< double > > > &lo, double outlier_threshold)
 Return the mean levels of the calibrator hi and lo states. More...
 
static void get_levels (const Integration *integration, unsigned nchan, std::vector< std::vector< Estimate< double > > > &hi, std::vector< std::vector< Estimate< double > > > &lo, double outlier_threshold)
 Return the mean levels of the calibrator hi and lo states. More...
 
- Static Public Member Functions inherited from Pulsar::Calibrator
static unsigned get_instance_count ()
 Returns the number of Calibrator instances currently in existence.
 
- 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 ()
 
- Static Public Attributes inherited from Pulsar::ReferenceCalibrator
static Option< bool > smooth_bandpass
 If true, then a median filter is run on the calibrator bandpass.
 
- Static Public Attributes inherited from Pulsar::PolnCalibrator
static Option< double > minimum_determinant
 Minimum allowable determinant of Jones matrices. More...
 
- Static Public Attributes inherited from Pulsar::Calibrator
static unsigned verbose = 0
 Verbosity level.
 
static Pulsar::Option< float > median_smoothing
 Fractional bandwidth of the window used in median filter.
 
static Pulsar::Option< float > interpolating
 Fractional bandwidth over which interpolation will be performed.
 
static Pulsar::Option< float > det_threshold
 Tolerance to non-physical values of the coherency matrix.
 
- Protected Attributes inherited from Pulsar::SingleAxisCalibrator
Reference::To< Calibration::SingleAxisSolversolver
 Optimization for SingleAxis solve.
 
- Protected Attributes inherited from Pulsar::ReferenceCalibrator
std::vector< Estimate< double > > baseline
 Intensity of off-pulse (system + sky), in CAL flux units.
 
Stokes< Estimate< double > > reference_source
 The Stokes parameters of the reference source.
 
bool source_set
 Flag raised when the reference_source attribute is set.
 
unsigned requested_nchan
 Requested number of frequency channels.
 
double outlier_threshold
 Threshold used to reject outliers when computing levels.
 
- Protected Attributes inherited from Pulsar::PolnCalibrator
std::vector< std::vector< double > > covariance
 The array of covariance matrix vectors.
 
std::vector< Jones< float > > response
 The array of Jones matrices derived from the transformation array.
 
Reference::To< const PolnCalibratorExtensionpoln_extension
 The PolnCalibratorExtension of the Archive passed during construction.
 
Reference::To< const FeedExtensionfeed
 The FeedExtension of the Archive passed during construction.
 
bool built
 Flag set when response has been built.
 
unsigned observation_nchan
 The number of frequency channels in the observation to be calibrated.
 
bool do_backend_correction
 Perform backend corrections before inverting.
 
Index subint
 The sub-integration from which to construct a solution.
 
- Protected Attributes inherited from Pulsar::Calibrator
Reference::To< Typetype
 The type of the Calibrator.
 
Reference::To< Variationvariation
 Updates model parameters.
 
Reference::To< const CalibratorExtensionextension
 The CalibratorExtension of the Archive passed during construction.
 
std::vector< std::string > filenames
 Filenames of Pulsar::Archives from which instance was created.
 

Detailed Description

Uses the off-pulse noise statistics to scale the polarization.

This calibrator should probably never be used. It was developed to deal with Wideband Correlator data observed during a period of heavy testing and development (P236). It was observed that the system does not remain stable between calibrator and pulsar observations, nor from sub-integration to sub-integration. Therefore, this calibrator attempts to correct the gains using the statistics of the off-pulse baseline. The error in the assumption that this baseline is unpolarized is the least of our concerns at this point.

Member Function Documentation

◆ calibrate()

void Pulsar::OffPulseCalibrator::calibrate ( Archive archive)
virtual

Calibrate the polarization of the given archive.

The required transformation cannot be represented by a Jones matrix

Reimplemented from Pulsar::PolnCalibrator.

References Pulsar::Integration::baseline_stats(), Pulsar::PolnCalibrator::calibrate(), Signal::Coherence, Pulsar::Integration::get_Profile(), and Estimate< class, class >::val.


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

Generated using doxygen 1.8.17