ProfilePlot.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2006 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/Plotting/Pulsar/ProfilePlot.h
10 
11 #ifndef __Pulsar_ProfilePlot_h
12 #define __Pulsar_ProfilePlot_h
13 
14 #include "Pulsar/FluxPlot.h"
15 #include "Pulsar/HasPen.h"
16 #include "MJD.h"
17 
18 namespace Pulsar {
19 
21  class ProfilePlot : public FluxPlot, public HasPen
22  {
23 
24  public:
25 
27  ProfilePlot ();
28 
31 
32  // Text interface to the ProfilePlot class
33  class Interface : public TextInterface::To<ProfilePlot> {
34  public:
35  Interface (ProfilePlot* = 0);
36  };
37 
39  void get_profiles (const Archive* data);
40 
42  void draw (const Archive*);
43 
45  void set_plot_cal_transitions (bool flag) { plot_cal_transitions = flag; }
46  bool get_plot_cal_transitions () const { return plot_cal_transitions; }
47 
49  void set_outlier_threshold (float f) { outlier_threshold = f; }
50  float get_outlier_threshold () const { return outlier_threshold; }
51 
53  void set_plot_time (const MJD& epoch) { plot_time = epoch; }
54  MJD get_plot_time () const { return plot_time; }
55 
57  void draw_transitions (const Profile* profile);
58 
60  void draw_time ();
61 
62  protected:
63 
64  bool plot_cal_transitions;
65  double outlier_threshold;
66 
67  MJD plot_time;
68  MJD reference_epoch;
69  double folding_period{0};
70  };
71 
72 }
73 
74 #endif
virtual Signal::Source get_type() const =0
Get the observation type (psr, cal)
TextInterface::Parser * get_interface()
Get the text interface to the configuration attributes.
Definition: ProfilePlot.C:28
void set_plot_cal_transitions(bool flag)
Set if cal transitions will be drawn.
Definition: ProfilePlot.h:55
PhaseWeight * get_mask(const Profile *, bool on, int start, int low)
Returns the phase bins that were not flagged as outliers.
Definition: SquareWave.C:212
Any quantity recorded as a function of pulse phase.
Definition: Profile.h:45
The primary interface to pulsar observational data.
Definition: Archive.h:45
unsigned get_nbin() const
Return the number of bins.
Definition: ProfileAmps.h:50
void draw_transitions(const Profile *profile)
Draw the profile transitions in the current viewport and window.
Definition: ProfilePlot.C:60
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
void find_transitions(int &highlow, int &lowhigh, int &width) const
Find the bin numbers at which the mean power transits.
Definition: Profile_find_transitions.C:45
void set_outlier_threshold(float f)
Set the threshold used to reject outliers when computing levels.
Definition: SquareWave.h:81
void get_profiles(const Archive *data)
Load the profiles.
Definition: ProfilePlot.C:33
void draw_time()
Mark the plot_time with a vertical dashed line.
Definition: ProfilePlot.C:177
void set_outlier_threshold(float f)
Set the threshold used to reject outliers when computing cal levels.
Definition: ProfilePlot.h:59
void stats(double *mean, double *variance=0, double *varmean=0, int bin_start=0, int bin_end=0) const
Calculates the mean, variance, and variance of the mean.
Definition: Profile_stats.C:27
ProfilePlot()
Default constructor.
Definition: ProfilePlot.C:21
Defines the PSRCHIVE library.
Definition: CalSource.h:17
const Profile * get_Profile(const Archive *data, Index subint, Index pol, Index chan)
Return the requested profile, cloning and integrating when needed.
Definition: Index.C:24
void draw(const Archive *)
Draw using FluxPlot::draw, then maybe draw_transitions.
Definition: ProfilePlot.C:46
Calculates the signal-to-noise ratio using (on-off)/rms.
Definition: SquareWave.h:31
void set_plot_time(const MJD &epoch)
Set the time to be plotted.
Definition: ProfilePlot.h:63

Generated using doxygen 1.8.17