Pulsar::FrequencyScale Class Reference

Represents an axis with radio frequency ordinate. More...

#include <FrequencyScale.h>

Inheritance diagram for Pulsar::FrequencyScale:
Pulsar::PlotScale Pulsar::PlotEdge Reference::Able Reference::HeapTracked

Public Member Functions

 FrequencyScale ()
 Default constructor.
TextInterface::Parserget_interface ()
void init (const Archive *)
 Initialize internal attributes according to Archive data.
void get_indeces (const Archive *, unsigned &min, unsigned &max) const
 Return the min and max as the phase bin index.
void get_ordinates (const Archive *, std::vector< float > &x_axis) const
 Get the ordinate values.
std::string get_label () const
 Get a description of the units.
void set_reverse (bool flag=true)
bool get_reverse () const
Public Member Functions inherited from Pulsar::PlotScale
 PlotScale ()
 Default constructor.
void copy (PlotScale *other)
 Copy another PlotScale.
void include (PlotScale *other)
 Expand as necessary to include another PlotScale.
void set_minmax (float min, float max)
 Set the minimum and maximum value in the data.
bool get_minmaxset () const
 Return true when minimum and maximum value have been set.
void get_minmax (float &min, float &max) const
 Get the minimum and maximum value in the data.
void update_minmax (float min, float max)
 Update the minimum and maximum value in the data.
std::pair< float, float > get_minmax () const
 Get the world coordinate range printed on the axis.
void get_range (float &min, float &max) const
 Return min and max scaled according to zoom.
void get_indeces (unsigned n, unsigned &imin, unsigned &imax, bool cyclic=false) const
 Return array indeces that span the axis indeces.
void get_axis_indeces (unsigned n, float &imin, float &imax, bool cyclic=false) const
 Return axis indeces scaled according to zoom.
void get_range_external (float &min, float &max) const
 Return min and max scaled according to zoom.
void set_range_norm (const std::pair< float, float > &f)
 Set the world-normalized range on the axis.
std::pair< float, float > get_range_norm () const
 Get the world-normalized range on the axis.
void set_range_norm (float min, float max)
 Convenience interface.
void set_buf_norm (float f)
 Set the world-normalized buffer space on either side of the axis.
float get_buf_norm () const
 Get the world-normalized buffer space on either side of the axis.
void set_world (const std::pair< float, float > &f)
 Set the world coordinate range in the viewport.
std::pair< float, float > get_world () const
 Get the world coordinate range in the viewport.
void set_world_external (const std::pair< float, float > &f)
 Set the world coordinate range printed on the axis.
std::pair< float, float > get_world_external () const
 Get the world coordinate range printed on the axis.
void set_index_range (const std::pair< unsigned, unsigned > &index)
 Set the index range to be plotted.
std::pair< unsigned, unsigned > get_index_range () const
 Get the index range to be plotted.
unsigned get_num_indeces () const
std::pair< float, float > viewport_to_world (const std::pair< float, float > &)
double viewport_to_world (const double)
virtual void freeze (bool f=true)
 Freeze the frame.
Public Member Functions inherited from Pulsar::PlotEdge
void set_viewport (const std::pair< float, float > &f)
 Set the viewport (normalized device coordinates)
std::pair< float, float > get_viewport () const
 Get the viewport (normalized device coordinates)
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

bool reverse
 Reverse the order on the axis.
Protected Attributes inherited from Pulsar::PlotScale
std::pair< float, float > world
std::pair< float, float > range_norm
std::pair< float, float > world_external
std::pair< unsigned, unsigned > index_range
unsigned num_indeces = 0
float buf_norm = 0.0
float minval = 0.0
float maxval = 1.0
bool minmaxvalset = false
bool frozen = false
Protected Attributes inherited from Pulsar::PlotEdge
std::pair< float, float > viewport

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 ()
Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
void __dereference (bool auto_delete=true) const

Detailed Description

Represents an axis with radio frequency ordinate.

Member Function Documentation

◆ get_interface()

TextInterface::Parser * Pulsar::FrequencyScale::get_interface ( )
inlinevirtual

Reimplemented from Pulsar::PlotScale.

◆ get_label()

std::string Pulsar::FrequencyScale::get_label ( ) const
virtual

Get a description of the units.

Reimplemented from Pulsar::PlotScale.

◆ init()

void Pulsar::FrequencyScale::init ( const Archive * data)
virtual

Initialize internal attributes according to Archive data.

Reimplemented from Pulsar::PlotScale.

References Pulsar::Archive::get_nchan(), reverse, Pulsar::PlotScale::set_minmax(), and Pulsar::PlotScale::set_world().


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

Generated using doxygen 1.14.0