Stores histograms of two-bit low-voltage states. More...

#include <TwoBitStats.h>

Inheritance diagram for Pulsar::TwoBitStats:
Pulsar::Archive::Extension Reference::Able Reference::HeapTracked

Public Member Functions

 TwoBitStats ()
 Default constructor.
 
 TwoBitStats (const TwoBitStats &extension)
 Copy constructor.
 
const TwoBitStatsoperator= (const TwoBitStats &extension)
 Operator =.
 
TwoBitStatsclone () const
 Clone method.
 
void resize (unsigned nsample, unsigned ndig)
 Set the number of samples per estimate and number of digitizers. More...
 
unsigned get_ndig () const
 Get the number of digitizers.
 
unsigned get_nsample () const
 Get the number of time samples used to estimate undigitized power.
 
void set_threshold (float threshold)
 Set the sampling threshold as a fraction of the noise power.
 
float get_threshold () const
 Get the sampling threshold as a fraction of the noise power.
 
void set_cutoff_sigma (float cutoff_sigma)
 Set the cut off power used for impulsive interference excision.
 
float get_cutoff_sigma () const
 Get the cut off power for impulsive interference excision.
 
const std::vector< float > & get_histogram (unsigned idig) const
 Get the specified histogram.
 
void set_histogram (const std::vector< float > &, unsigned idig)
 Set the specified histogram.
 
void zero ()
 Set all histogram data to zero.
 
double get_mean_Phi (unsigned idig) const
 Get the mean fraction of low voltage states.
 
double get_distortion (unsigned idig) const
 Get the difference between the measured and theoretical distributions.
 
- Public Member Functions inherited from Pulsar::Archive::Extension
 Extension (const char *name)
 Construct with a name.
 
virtual ~Extension ()
 Destructor.
 
virtual TextInterface::Parserget_interface ()
 Return a text interface that can be used to access this instance.
 
std::string get_extension_name () const
 Return the name of the Extension.
 
virtual std::string get_short_name () const
 Return an abbreviated name that can be typed relatively quickly.
 
virtual bool has_data () const
 Returns true if the Extension contains useful data.
 
virtual void resize (unsigned nsubint, unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
 Resize the Extension.
 
virtual void frequency_append (Archive *to, const Archive *from)
 Append data along frequency dimension, if applicable.
 
- 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_check (unsigned idig, const char *method) const
 Throw an exception if idig out of range.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

unsigned ndig
 Number of digitizers.
 
unsigned nsample
 Number of samples used to estimate undigitized power.
 
float threshold
 Sampling threshold as a fraction of the noise power.
 
float cutoff_sigma
 Cut off power used for impulsive interference excision.
 
std::vector< std::vector< float > > histogram
 Low-voltage state count histograms.
 
- Protected Attributes inherited from Pulsar::Archive::Extension
std::string extension_name
 Extension name - useful when debugging.
 

Additional Inherited Members

- Static Public Member Functions inherited from Pulsar::Archive::Extension
static Extensionfactory (const std::string &name)
 Derived type factory.
 
- 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

Stores histograms of two-bit low-voltage states.

The TwoBitStats class contains histograms of the number of low-voltage states encountered in samples of a given length. Refer to the TwoBitCorrection class in baseband/dsp for further details.

Member Function Documentation

◆ resize()

void Pulsar::TwoBitStats::resize ( unsigned  nsample,
unsigned  ndig 
)

Set the number of samples per estimate and number of digitizers.

Set the number of samples per histogram point and number of digitizers.


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

Generated using doxygen 1.8.17