Pulsar::PowerSpectra Class Referenceabstract

Plots flux profiles. More...

#include <PowerSpectra.h>

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

Public Member Functions

 PowerSpectra ()
 Default constructor.
TextInterface::Parserget_interface ()
 Return the text interface.
void prepare (const Archive *)
 Perform any preprocessing steps.
std::string get_ylabel (const Archive *)
 Get the default label for the y axis.
virtual void get_spectra (const Archive *)=0
 Derived classes must provide the profiles.
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.
void draw (const std::vector< float > &) const
 Draw the spectrum.
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 preprocess (Archive *)
 Process the Archive as needed before calling plot.
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

Protected Attributes

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 flux profiles.

Member Function Documentation

◆ draw() [1/2]

void Pulsar::PowerSpectra::draw ( const Archive * data)
virtual

Draw the spectra.

Derived classes must draw in the current viewport.

Implements Pulsar::SimplePlot.

References draw(), Pulsar::HasPen::get_pen(), Pulsar::FrequencyPlot::get_scale(), and Pulsar::PlotPen::setup().

Referenced by draw().

◆ draw() [2/2]

void Pulsar::PowerSpectra::draw ( const std::vector< float > & data) const

Draw the spectrum.

draw the profile in the current viewport and window

References Pulsar::FramedPlot::get_frame().

◆ get_interface()

TextInterface::Parser * Pulsar::PowerSpectra::get_interface ( void )
virtual

Return the text interface.

Implements Pulsar::Plot.

Reimplemented in Pulsar::SpectrumPlot.

◆ get_spectra()

virtual void Pulsar::PowerSpectra::get_spectra ( const Archive * )
pure virtual

Derived classes must provide the profiles.

Implemented in Pulsar::SpectrumPlot.

Referenced by prepare().

◆ get_ylabel()

std::string Pulsar::PowerSpectra::get_ylabel ( const Archive * data)
virtual

Get the default label for the y axis.

Return the label for the y-axis.

Reimplemented from Pulsar::FrequencyPlot.

References Pulsar::Archive::get_scale(), and Signal::Jansky.

◆ prepare()

void Pulsar::PowerSpectra::prepare ( const Archive * data)
virtual

Perform any preprocessing steps.

Derived classes must compute the minimum and maximum values (y-axis)

Reimplemented from Pulsar::FramedPlot.

References Pulsar::FramedPlot::frame, Pulsar::FramedPlot::get_frame(), Pulsar::Archive::get_nchan(), Pulsar::FrequencyPlot::get_scale(), and get_spectra().


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

Generated using doxygen 1.14.0