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

#include <PeakConsecutive.h>

Inheritance diagram for Pulsar::PeakConsecutive:
Pulsar::RiseFall 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. More...
 
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 (BaselineEstimator *)
 Set the BaselineEstimator used to find the off-pulse phase bins.
 
const BaselineEstimatorget_baseline_estimator () const
 Get the BaselineEstimator used to find the off-pulse phase bins.
 
BaselineEstimatorget_baseline_estimator ()
 
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. More...
 
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.
 
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
 

Protected Member Functions

void calculate (PhaseWeight *weight)
 Set the weights between rise and fall, or each rise/fall pair. More...
 
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. More...
 
- 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
 
Reference::To< BaselineEstimatorbaseline_estimator
 The BaselineEstimator used to find the off-pulse phase bins.
 
- 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.

◆ 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.

◆ set_threshold()

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

Set the threshold.

Set the duty cycle.


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

Generated using doxygen 1.8.17