Pulsar::SpectrumPlot Class Reference

Plots a single spectrum. More...

#include <SpectrumPlot.h>

Inheritance diagram for Pulsar::SpectrumPlot:
Pulsar::PowerSpectra Pulsar::HasPen Pulsar::FrequencyPlot Pulsar::SimplePlot Pulsar::FramedPlot Pulsar::Plot Reference::Able Reference::HeapTracked

Public Member Functions

TextInterface::Parserget_interface ()
 Get the text interface to the configuration attributes.
 
void get_spectra (const Archive *data)
 Load the spectra.
 
void set_bin (const Index &_ibin)
 Set the phase bin to plot.
 
Index get_bin () const
 
void set_expression (const std::string &str)
 Set the ProfileStats expression to evaluate.
 
std::string get_expression () const
 
void set_statistic (ArchiveStatistic *)
 Set the statistic. More...
 
ArchiveStatisticget_statistic () const
 Get the statistic. More...
 
void preprocess (Archive *)
 Disable baseline removal.
 
- Public Member Functions inherited from Pulsar::PowerSpectra
 PowerSpectra ()
 Default constructor.
 
void prepare (const Archive *)
 Perform any preprocessing steps. More...
 
std::string get_ylabel (const Archive *)
 Get the default label for the y axis. More...
 
void set_subint (const Index &_isubint)
 Set the sub-integration to plot (where applicable)
 
Index get_subint () const
 
void set_pol (const Index &_ipol)
 Set the polarization to plot.
 
Index get_pol () const
 
void set_median_window (unsigned window)
 Set the median filter window size.
 
unsigned get_median_window () const
 Get the median window size.
 
void set_draw_lines (bool flag)
 Set draw lines flag.
 
bool get_draw_lines () const
 Get draw lines flag.
 
void set_skip_zapped (bool flag)
 Set skip zapped flag.
 
bool get_skip_zapped () const
 Get skip zapped flag.
 
void set_logarithmic (bool val)
 Plot on a logarithmic scale.
 
bool get_logarithmic () const
 
void draw (const Archive *)
 Draw the spectra. More...
 
void draw (const std::vector< float > &) const
 Draw the spectrum. More...
 
- Public Member Functions inherited from Pulsar::FrequencyPlot
 FrequencyPlot ()
 Default constructor.
 
std::string get_xlabel (const Archive *)
 Get the default label for the x axis.
 
void set_yrange (float min, float max)
 Set the y-range.
 
FrequencyScaleget_scale ()
 Get the scale.
 
- Public Member Functions inherited from Pulsar::SimplePlot
virtual void plot (const Archive *)
 Plot in the current viewport.
 
void add_annotation (PlotAnnotation *a)
 Add an annotation.
 
- Public Member Functions inherited from Pulsar::FramedPlot
 FramedPlot ()
 Default constructor.
 
virtual TextInterface::Parserget_frame_interface ()
 Get the text interface to the frame attributes.
 
PlotAttributesget_attributes ()
 Get the plot attributes.
 
virtual PlotFrameget_frame ()
 Get the frame.
 
virtual const PlotFrameget_frame () const
 Get the frame.
 
virtual void set_frame (PlotFrame *)
 Set the frame.
 
- Public Member Functions inherited from Pulsar::Plot
 Plot ()
 Default constructor.
 
virtual void finalize ()
 Some plots may postpone plotting.
 
virtual void configure (const std::string &)
 Process a configuration command.
 
void set_constructor (Constructor *c)
 Set the constructor.
 
Constructorget_constructor ()
 Get the constructor.
 
virtual void set_preprocessor (Processor *)
 Set the pre-processor.
 
virtual Processorget_preprocessor ()
 Get the pre-processor.
 
virtual bool has_preprocessor () const
 Return true if pre-processor has been set.
 
- 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::HasPen
PlotPenget_pen ()
 Provide access to the Pen.
 

Protected Attributes

Index ibin
 
std::string expression
 
Reference::To< ArchiveStatisticstatistic
 
- Protected Attributes inherited from Pulsar::PowerSpectra
std::vector< std::vector< float > > spectra
 
std::vector< int > plot_sci
 
std::vector< int > plot_sls
 
Index isubint
 
Index ipol
 
unsigned median_window
 
bool draw_lines
 
bool skip_zapped
 
bool logarithmic
 
- Protected Attributes inherited from Pulsar::SimplePlot
std::vector< Reference::To< PlotAnnotation > > annotations
 Annotations to add to the plot.
 
- Protected Attributes inherited from Pulsar::FramedPlot
Reference::To< PlotFrameframe
 The plot frame.
 

Additional Inherited Members

- 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::Plot
static bool verbose = false
 Verbosity flag.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Detailed Description

Plots a single spectrum.

Member Function Documentation

◆ get_statistic()

Pulsar::ArchiveStatistic * Pulsar::SpectrumPlot::get_statistic ( ) const

Get the statistic.

Get the profile statistic.

◆ set_statistic()

void Pulsar::SpectrumPlot::set_statistic ( ArchiveStatistic stat)

Set the statistic.

Set the profile statistic.


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

Generated using doxygen 1.8.17