Computes pulse profile statistics. More...

#include <ProfileStats.h>

Inheritance diagram for Pulsar::ProfileStats:
Pulsar::Algorithm Pulsar::HasBaselineEstimator Reference::Able Reference::HeapTracked

Classes

class  Interface
 Profile statistics text interface. More...
 

Public Member Functions

 ProfileStats (const Profile *profile=0)
 Default constructor.
 
 ProfileStats (const ProfileStats &)
 Copy constructor.
 
 ~ProfileStats ()
 Destructor.
 
ProfileStatsclone () const
 Clone operator.
 
void set_include_estimator (ProfileWeightFunction *)
 The algorithm used to find the included phase bins. More...
 
ProfileWeightFunctionget_include_estimator () const
 
void set_exclude_estimator (ProfileWeightFunction *)
 The algorithm used to find the excluded phase bins. More...
 
ProfileWeightFunctionget_exclude_estimator () const
 
void set_profile (const Profile *)
 Set the Profile from which statistics will be derived.
 
void set_Profile (const Profile *profile)
 
void select_profile (const Profile *)
 Set the Profile that defines the baseline and on-pulse regions. More...
 
void deselect_onpulse (const Profile *profile, float threshold)
 Deselect onpulse phase bins in profile that fall below threshold.
 
void set_onpulse_estimator (ProfileWeightFunction *)
 The algorithm used to find the on-pulse phase bins.
 
ProfileWeightFunctionget_onpulse_estimator () const
 
void set_baseline_estimator (ProfileWeightFunction *)
 The algorithm used to find the off-pulse phase bins.
 
void set_regions (const PhaseWeight &pulse, const PhaseWeight &baseline)
 Set the on-pulse and baseline regions.
 
void get_regions (PhaseWeight &pulse, PhaseWeight &base) const
 Set the on-pulse and baseline regions.
 
unsigned get_onpulse_nbin () const
 Get the number of phase bins in the on pulse window.
 
bool get_onpulse (unsigned ibin) const
 Return true if the specified phase bin is in the on pulse window.
 
void set_onpulse (unsigned ibin, bool)
 Set if the specified phase bin is in the on pulse window.
 
unsigned get_baseline_nbin () const
 Get the number of phase bins in the baseline window.
 
bool get_baseline (unsigned ibin) const
 Return true if the specified phase bin is in the baseline window.
 
Estimate< double > get_total (bool subtract_baseline=true) const
 Returns the total flux of the on-pulse phase bins.
 
Estimate< double > get_baseline_variance () const
 Returns the variance of the baseline.
 
PhaseWeightget_onpulse ()
 Return the on-pulse phase bin mask.
 
PhaseWeightget_baseline ()
 Return the off-pulse baseline mask.
 
PhaseWeightget_all ()
 Return the all pulse phase bin mask. More...
 
void set_snratio_estimator (SNRatioEstimator *)
 The algorithm used to estimate the signal-to-noise ratio.
 
SNRatioEstimatorget_snratio_estimator () const
 
void set_snr_estimator (const std::string &name)
 Set the signal-to-noise ratio estimator.
 
double get_snr () const
 Get the signal-to-noise ratio.
 
TextInterface::Parserget_snr_interface ()
 Get the text interface of the signal-to-noise ratio estimator.
 
void set_width_estimator (WidthEstimator *)
 The algorithm used to estimate the pulse width.
 
WidthEstimatorget_width_estimator () const
 
void set_pulse_width_estimator (const std::string &name)
 Set the pulse width estimator.
 
::Phase::Value get_pulse_width () const
 Get the pulse width.
 
TextInterface::Parserget_pulse_width_interface ()
 Get the text interface of the pulse width estimator.
 
TextInterface::Parserget_interface ()
 Return a text interface that can be used to configure this instance.
 
- 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
 
- Public Member Functions inherited from Pulsar::HasBaselineEstimator
 HasBaselineEstimator ()
 Default constructor.
 
 HasBaselineEstimator (const HasBaselineEstimator &)
 Copy constructor.
 
 ~HasBaselineEstimator ()
 Destructor.
 
ProfileWeightFunctionget_baseline_estimator () const
 Get the algorithm used to find the off-pulse phase bins.
 
void share (HasBaselineEstimator *other)
 Share the baseline estimator of other.
 

Static Public Member Functions

static unsigned get_instance_count ()
 Get the number of ProfileStats instances 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 Member Functions inherited from Pulsar::HasBaselineEstimator
template<typename Child >
static void import (typename Child::Interface *)
 

Protected Member Functions

void build () const
 Computes the phase bin masks.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

Reference::To< const Profile, false > profile
 The Profile from which statistics will be derived.
 
Reference::To< ProfileWeightFunctiononpulse_estimator
 The algorithm used to find the on-pulse phase bins.
 
Reference::To< SNRatioEstimatorsnratio_estimator
 The algorithm used to compute the signal-to-noise ratio.
 
Reference::To< WidthEstimatorwidth_estimator
 The algorithm used to estimate the pulse width.
 
bool regions_set
 True when the onpulse and baseline regions have been set.
 
PhaseWeight onpulse
 The on-pulse phase bin mask.
 
PhaseWeight baseline
 The off-pulse baseline mask.
 
PhaseWeight all
 All phase bins (subject to include and exclude)
 
Estimate< double > baseline_variance
 The variance of the total intensity baseline.
 
Reference::To< ProfileWeightFunctioninclude_estimator
 The algorithm used to find the included phase bins.
 
PhaseWeight include
 The included phase bin mask.
 
Reference::To< ProfileWeightFunctionexclude_estimator
 The algorithm used to find the excluded phase bins.
 
PhaseWeight exclude
 The excluded phase bin mask.
 

Detailed Description

Computes pulse profile statistics.

Member Function Documentation

◆ get_all()

Pulsar::PhaseWeight * Pulsar::ProfileStats::get_all ( )

Return the all pulse phase bin mask.

Return the off-pulse baseline mask.

◆ select_profile()

void Pulsar::ProfileStats::select_profile ( const Profile set_profile)

Set the Profile that defines the baseline and on-pulse regions.

Set the Profile from which baseline and onpulse mask will be selected.

It is assumed that all subsequent Profile instances passed to set_profile will have the same phase as set_profile

References Pulsar::Profile::verbose.

◆ set_exclude_estimator()

void Pulsar::ProfileStats::set_exclude_estimator ( ProfileWeightFunction est)

The algorithm used to find the excluded phase bins.

The algorithm used to find the bins to exclude.

References Pulsar::Profile::verbose.

◆ set_include_estimator()

void Pulsar::ProfileStats::set_include_estimator ( ProfileWeightFunction est)

The algorithm used to find the included phase bins.

The algorithm used to find the bins to include.

References Pulsar::Profile::verbose.


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

Generated using doxygen 1.8.17