Finds pulse defined by number of consecutive points above threshold. More...

#include <PeakConsecutive.h>

Inheritance diagram for Pulsar::PeakConsecutive:
Pulsar::RiseFall Pulsar::HasBaselineEstimator Pulsar::OnPulseEstimator Pulsar::ProfileWeightFunction Pulsar::PhaseWeightFunction Pulsar::Algorithm Reference::Able Reference::HeapTracked

Public Member Functions

 PeakConsecutive ()
 Default constructor.
void set_Profile (const Profile *)
 Set the profile from which the rise and fall will be computed.
void set_threshold (float threshold)
 Set the threshold.
float get_threshold () const
 Get the threshold.
void set_consecutive (unsigned consecutive)
 Set the consecutive.
unsigned get_consecutive () const
 Get the consecutive.
void set_baseline_estimator (ProfileWeightFunction *) override
 Set the BaselineEstimator used to find the off-pulse phase bins.
void set_range (int bin_start, int bin_end)
 Set the start and end bins of the search.
void get_indeces (int &rise, int &fall) const
 Get the pulse phase bin indeces of the rise and fall.
TextInterface::Parserget_interface ()
 Return a text interface that can be used to configure this instance.
PeakConsecutiveclone () const
 Return new copy of self.
Public Member Functions inherited from Pulsar::RiseFall
virtual std::pair< int, int > get_rise_fall (const Profile *)
 Return the rise and fall as a pair.
Public Member Functions inherited from Pulsar::ProfileWeightFunction
 ProfileWeightFunction ()
 Default constructor.
 ProfileWeightFunction (const ProfileWeightFunction &)
 Copy constructor.
void set_include (PhaseWeight *include)
 Include only the specified phase bins for consideration.
void set_exclude (PhaseWeight *include)
 Exclude the specified phase bins from consideration.
bool consider (unsigned ibin) const
 Return true if the specified phase bin should be considered.
virtual void get_weight (PhaseWeight *weight)
 Returns a PhaseWeight with the Profile attribute set.
virtual PhaseWeightoperate (const Profile *)
 Convenience 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
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.
bool has_baseline_estimator () const
 Return true if baseline estimator is set.

Protected Member Functions

void calculate (PhaseWeight *weight)
 Set the weights between rise and fall, or each rise/fall pair.
void build ()
 Compute the rise and fall of the pulse.
Protected Member Functions inherited from Pulsar::RiseFall
void calculate (PhaseWeight *weight)
 Set the weights between rise and fall.
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
void __dereference (bool auto_delete=true) const

Protected Attributes

bool merge_regions
 Merge all on pulse regions into one.
bool built
 Flag set when the rise and fall are computed.
float threshold
 The threshold.
unsigned consecutive
 The number of bins that must remain above threshold.
int bin_start
 The first bin in the selected range.
int bin_end
 The last bin in the selected range.
bool range_specified
 Set true when range is specified.
int bin_rise
int bin_fall
std::vector< unsigned > on_transitions
std::vector< unsigned > off_transitions
Protected Attributes inherited from Pulsar::ProfileWeightFunction
Reference::To< const Profile, false > profile
 The Profile from which the PhaseWeight will be derived.
Reference::To< PhaseWeightinclude
 Included phase bins.
Reference::To< PhaseWeightexclude
 Excluded phase bins.

Additional Inherited Members

Static Public Member Functions inherited from Pulsar::ProfileWeightFunction
static ProfileWeightFunctionfactory (const std::string &name_and_parse)
 Construct a new ProfileWeightFunction from a string.
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

Finds pulse defined by number of consecutive points above threshold.

Finds the edges at which the power remains above a threshold for a while.

Member Function Documentation

◆ calculate()

void Pulsar::PeakConsecutive::calculate ( PhaseWeight * weight)
protectedvirtual

Set the weights between rise and fall, or each rise/fall pair.

Retrieve the PhaseWeight.

Implements Pulsar::ProfileWeightFunction.

References build(), Pulsar::RiseFall::calculate(), merge_regions, and Pulsar::ProfileWeightFunction::profile.

◆ clone()

Pulsar::PeakConsecutive * Pulsar::PeakConsecutive::clone ( ) const
virtual

Return new copy of self.

Implements Pulsar::OnPulseEstimator.

References PeakConsecutive().

◆ get_indeces()

void Pulsar::PeakConsecutive::get_indeces ( int & rise,
int & fall ) const
virtual

Get the pulse phase bin indeces of the rise and fall.

Return values
risebin at which the cumulative power last remains above threshold
fallbin at which the cumulative power first falls below threshold

Implements Pulsar::RiseFall.

References build(), built, and PeakConsecutive().

◆ get_interface()

TextInterface::Parser * Pulsar::PeakConsecutive::get_interface ( )
virtual

Return a text interface that can be used to configure this instance.

Implements Pulsar::PhaseWeightFunction.

◆ set_baseline_estimator()

void Pulsar::PeakConsecutive::set_baseline_estimator ( ProfileWeightFunction * b)
overridevirtual

Set the BaselineEstimator used to find the off-pulse phase bins.

Reimplemented from Pulsar::HasBaselineEstimator.

References built, and Pulsar::HasBaselineEstimator::set_baseline_estimator().

Referenced by Pulsar::ProfileStats::ProfileStats().

◆ set_Profile()

void Pulsar::PeakConsecutive::set_Profile ( const Profile * p)
virtual

Set the profile from which the rise and fall will be computed.

Reimplemented from Pulsar::ProfileWeightFunction.

References built, and Pulsar::ProfileWeightFunction::profile.

◆ set_threshold()

void Pulsar::PeakConsecutive::set_threshold ( float threshold)

Set the threshold.

Set the duty cycle.

References built, and threshold.


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

Generated using doxygen 1.14.0