dsp::TimeDivide Class Reference

Calculates the boundaries of a division of time. More...

#include <TimeDivide.h>

Inheritance diagram for dsp::TimeDivide:
OwnStream Reference::Able Reference::HeapTracked

Public Member Functions

 TimeDivide ()
 Constructor.
 
 ~TimeDivide ()
 Destructor.
 
Initialization Methods

Use these methods to set up the division of time.

void set_start_time (MJD start_time)
 Set the start time at which to begin dividing.
 
MJD get_start_time () const
 Get the start time at which to begin dividing.
 
void set_seconds (double division_seconds)
 Set the number of seconds in each division.
 
double get_seconds () const
 Get the number of seconds in each division.
 
void set_reference_epoch (const MJD &epoch)
 Set the reference epoch (start time of first division)
 
MJD get_reference_epoch () const
 Set the reference epoch (start time of first division)
 
void set_turns (double division_turns)
 Set the number of turns in each division.
 
double get_turns () const
 Get the number of turns in each division.
 
void set_predictor (const Pulsar::Predictor *)
 Set the Pulsar::Predictor used to determine pulse phase.
 
const Pulsar::Predictorget_predictor () const
 Get the Pulsar::Predictor used to determine pulse phase.
 
void set_period (double)
 Set the folding period used to determine pulse phase.
 
double get_period () const
 Set the folding period used to determine pulse phase.
 
void set_reference_phase (double phase)
 Set the reference phase (phase of bin zero)
 
double get_reference_phase () const
 Get the reference phase (phase of bin zero)
 
void set_fractional_pulses (bool)
 Fold the fractional pulses at the start and end of data.
 
bool get_fractional_pulses () const
 Set the start time at which to begin dividing.
 
- Public Member Functions inherited from OwnStream
 OwnStream (const OwnStream &)
 
const OwnStreamoperator= (const OwnStream &)
 
virtual void set_cout (std::ostream &) const
 
virtual void set_cerr (std::ostream &) const
 
- 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
 

Operation Methods

Use these methods to perform the division of time.

MJD start_time
 The start time from which to begin dividing time.
 
Pulsar::Phase start_phase
 The corresponding phase at which to begin dividing time.
 
double division_seconds = 0
 Number of seconds in each division.
 
MJD reference_epoch
 Reference epoch at start of the first division.
 
double division_turns = 0
 Number of turns in each division.
 
double reference_phase = 0
 The reference phase.
 
bool fractional_pulses = false
 Include the fractional pulses at the start and end of data.
 
bool integer_division_seconds_boundaries = true
 Round division boundaries to integer numbers of division_seconds.
 
double period = 0
 The period used to determine pulse phase.
 
Reference::To< const Pulsar::Predictorpoly
 The Pulsar::Predictor used to determine pulse phase.
 
void set_bounds (const Observation *)
 Calculate the boundaries of the current division.
 
void discard_bounds (const Observation *)
 Call this method if, after calling set_bounds, the data were not used.
 
bool get_is_valid () const
 Return true if the last bound Observation covers the current division.
 
bool get_new_division () const
 Return true if the last bound Observation covers a new division.
 
bool get_in_next () const
 Return true if the last bound Observation covers the next division.
 
bool get_end_reached () const
 Return true if the end of the current division has been reached.
 
uint64_t get_idat_start () const
 Get the first time sample from observation in the current division.
 
uint64_t get_ndat () const
 Get the number of time samples from observation in the current division.
 
uint64_t get_division_ndat () const
 Get the total number of time samples in the current division.
 
unsigned get_phase_bin () const
 Get the phase bin of the current division (turns < 1)
 
uint64_t get_division () const
 Get the current division.
 
uint64_t get_division (const MJD &epoch)
 Get the division associated with the specified epoch.
 
void set_boundaries (const MJD &time)
 Calculates the boundaries of the sub-integration containing time.
 
void set_boundaries (const MJD &mjd1, const MJD &mjd2)
 If observation is set, round boundaries to integer samples.
 

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

Calculates the boundaries of a division of time.


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

Generated using doxygen 1.8.17