Plots flux profiles. More...

#include <FluxPlot.h>

Inheritance diagram for Pulsar::FluxPlot:
Pulsar::PhasePlot Pulsar::SimplePlot Pulsar::HasPhaseScale Pulsar::FramedPlot Pulsar::Plot Reference::Able Reference::HeapTracked Pulsar::ProfilePlot Pulsar::StokesCovariancePlot Pulsar::StokesCrossCovariancePlot Pulsar::StokesPlot

Public Member Functions

 FluxPlot ()
 Default constructor.
 
 ~FluxPlot ()
 Destructor.
 
TextInterface::Parserget_interface ()
 Return the text interface.
 
void prepare (const Archive *)
 Perform any preprocessing steps. More...
 
std::string get_ylabel (const Archive *)
 Get the default label for the y axis. More...
 
virtual void get_profiles (const Archive *)=0
 Derived classes must provide the profiles.
 
virtual float get_phase_error (const Archive *data)
 Compute the error in phase.
 
virtual float get_flux_error (const Profile *data)
 Compute the error in flux.
 
virtual float get_flux_maximum (const Profile *data)
 Compute the maximum flux.
 
virtual void plot_error_box (const Archive *data)
 Draw the error box.
 
virtual void auto_scale_phase (const Profile *data, float buffer)
 Automatically scale in on the on-pulse region. More...
 
void set_subint (Index _isubint)
 Set the sub-integration to plot (where applicable)
 
Index get_subint () const
 
void set_chan (Index _ichan)
 Set the frequency channel to plot (where applicable)
 
Index get_chan () const
 
void set_pol (Index _ipol)
 Set the polarization to plot.
 
Index get_pol () const
 
void set_logarithmic (int val)
 Plot on a logarithmic scale, normalized by noise.
 
int get_logarithmic () const
 
void set_peak_zoom (float zoom)
 Automatically zoom in on the pulse peak.
 
float get_peak_zoom () const
 
void set_baseline_zoom (float zoom)
 Automatically zoom in on the baseline.
 
float get_baseline_zoom () const
 
void set_info_label (bool flag=true)
 Use an informative label above the plot.
 
bool get_info_label () const
 
void set_plot_error_box (int code)
 Plot an error box on the baseline.
 
int get_plot_error_box () const
 
void set_plot_histogram (bool f=true)
 Plot an error box on the baseline.
 
bool get_plot_histogram () const
 
void set_original_nchan (unsigned nchan)
 Set the original number of frequency channels. More...
 
unsigned get_original_nchan () const
 
void draw (const Archive *)
 Draw the profiles in the currently open window. More...
 
void plot_profile (const Profile *)
 Draw a profile in the currently open window. More...
 
const ProfileVectorPlotterget_plotter () const
 Provide limited access to the plotter.
 
void set_selection (const PhaseWeight *)
 Set the selected profiles.
 
void set_crop (float new_crop)
 Set the crop fraction.
 
float get_crop () const
 Get the crop level.
 
- Public Member Functions inherited from Pulsar::PhasePlot
 PhasePlot ()
 Default constructor.
 
TextInterface::Parserget_interface ()
 Get the text interface to the configuration attributes.
 
std::string get_xlabel (const Archive *)
 Get the default label for the x axis.
 
std::string get_ylabel (const Archive *)
 Get the default label for the y axis.
 
void set_yrange (float min, float max)
 Set the y-range.
 
PhaseScaleget_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 Member Functions

void plot_selection ()
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

ProfileVectorPlotter plotter
 
Index isubint
 
Index ichan
 
Index ipol
 
int logarithmic
 
int plot_ebox
 
float peak_zoom
 
bool peak_centre_origin
 
float baseline_zoom
 
unsigned original_nchan
 
float crop
 
Reference::To< InfoLabelinfo_label
 
Reference::To< const PhaseWeightselection
 
- 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.
 

Detailed Description

Plots flux profiles.

Member Function Documentation

◆ auto_scale_phase()

void Pulsar::FluxPlot::auto_scale_phase ( const Profile data,
float  buffer 
)
virtual

Automatically scale in on the on-pulse region.

Scale in on the on-pulse region.

References Pulsar::Profile::find_peak_edges(), and Pulsar::ProfileAmps::get_nbin().

◆ draw()

void Pulsar::FluxPlot::draw ( const Archive data)
virtual

Draw the profiles in the currently open window.

The ProfileVectorPlotter class draws the profile

Implements Pulsar::SimplePlot.

Reimplemented in Pulsar::ProfilePlot.

◆ get_ylabel()

std::string Pulsar::FluxPlot::get_ylabel ( const Archive data)
virtual

Get the default label for the y axis.

Return the label for the y-axis.

Reimplemented from Pulsar::SimplePlot.

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

◆ plot_profile()

void Pulsar::FluxPlot::plot_profile ( const Profile data)

Draw a profile in the currently open window.

This method sets the viewport (cpgsvp) and window (cpgswin) dimensions, but does not draw the axes or label the frame. To draw the axes, cpgbox must be called after this method.

The ProfileVectorPlotter class draws the profile

References Pulsar::ProfileAmps::get_nbin().

◆ prepare()

void Pulsar::FluxPlot::prepare ( const Archive data)
virtual

Perform any preprocessing steps.

The ProfileVectorPlotter class computes the minimum and maximum values to be plotted

Reimplemented from Pulsar::FramedPlot.

References Pulsar::PhaseWeight::get_min(), Pulsar::Archive::get_strategy(), Estimate< class, class >::get_value(), and Pulsar::ProfileWeightFunction::operate().

◆ set_original_nchan()

void Pulsar::FluxPlot::set_original_nchan ( unsigned  nchan)
inline

Set the original number of frequency channels.

This attribute is used in the get_phase_error method to determine the dispersion smearing across each channel


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

Generated using doxygen 1.8.17