BasicIntegration class. More...

#include <BasicIntegration.h>

Inheritance diagram for Pulsar::BasicIntegration:
Pulsar::Integration Pulsar::Container Reference::Able Reference::HeapTracked

Public Member Functions

 BasicIntegration ()
 null constructor
 
 BasicIntegration (const BasicIntegration &subint)
 copy constructor
 
 BasicIntegration (const Integration *subint)
 copy constructor
 
virtual ~BasicIntegration ()
 destructor
 
virtual Integrationclone () const
 Return the pointer to a new copy of self.
 
virtual unsigned get_nchan () const
 Get the number of chans. More...
 
virtual unsigned get_npol () const
 Get the number of polarization measurements. More...
 
virtual unsigned get_nbin () const
 Get the number of bins in each profile. More...
 
virtual MJD get_epoch () const
 Get the epoch of the rising edge of bin zero.
 
virtual void set_epoch (const MJD &mjd)
 Set the epoch of the rising edge of bin zero.
 
virtual double get_duration () const
 Get the total time integrated (in seconds)
 
virtual void set_duration (double seconds)
 Set the total time integrated (in seconds)
 
virtual double get_folding_period () const
 Get the folding period (in seconds)
 
virtual void set_folding_period (double seconds)
 Set the folding period (in seconds)
 
virtual double get_gate_duty_cycle () const
 Get the fraction of the pulse period recorded (in turns)
 
virtual void set_gate_duty_cycle (double turns)
 Set the fraction of the pulse period recorded (in turns)
 
- Public Member Functions inherited from Pulsar::Integration
 Integration ()
 Default constructor.
 
 Integration (const Integration &subint)
 Copy constructor.
 
Integrationoperator= (const Integration &subint)
 Assignment operator.
 
virtual ~Integration ()
 Destructor.
 
virtual Interfaceget_interface ()
 Return a text interface that can be used to access this instance.
 
void zero ()
 Zero all the profiles, keeping all else the same.
 
MJD get_start_time () const
 Get the MJD at the start of the integration (convenience interface)
 
MJD get_end_time () const
 Get the MJD at the end of the integration (convenience interface)
 
double get_centre_frequency (unsigned ichan) const
 Get the Profile centre frequency attribute of the given channel. More...
 
void set_centre_frequency (unsigned ichan, double frequency)
 Set the Profile centre frequency attributes of the given channel. More...
 
float get_weight (unsigned ichan) const
 Get the Profile weight attribute of the given channel. More...
 
void set_weight (unsigned ichan, float weight)
 Set the Profile weight attributes of the given channel. More...
 
void find_transitions (int &hi2lo, int &lo2hi, int &buffer) const
 Find the transitions between high and low states in total intensity. More...
 
void find_peak_edges (int &rise, int &fall) const
 Find the bins in which the total intensity exceeds a threshold. More...
 
float find_max_phase () const
 Returns the centre phase of the region with maximum total intensity. More...
 
float find_min_phase (float dc=0.10) const
 Returns the centre phase of the region with minimum total intensity. More...
 
PhaseWeightbaseline () const
 Return a new PhaseWeight instance with the baseline phase bins masked.
 
void baseline_stats (std::vector< std::vector< Estimate< double > > > *mean, std::vector< std::vector< double > > *variance=0, const PhaseWeight *baseline=0) const
 Return the statistics of every profile baseline.
 
void remove_baseline (const PhaseWeight *baseline=0)
 Remove the baseline from all profiles. More...
 
void cal_levels (std::vector< std::vector< Estimate< double > > > &hi, std::vector< std::vector< Estimate< double > > > &lo) const
 Returns the mean hi/lo and variance of the mean hi/lo of every profile. More...
 
double weighted_frequency (unsigned ch_start=0, unsigned ch_end=0) const
 Computes the weighted centre frequency of an interval of sub-channels. More...
 
double effective_bandwidth (unsigned ch_start=0, unsigned ch_end=0) const
 Computes the effective bandwidth of an interval of sub-channels.
 
void uniform_weight (float new_weight=1.0)
 Set the weight of each profile to the given number.
 
void dedisperse ()
 Remove dispersion delays with respect to centre frequency. More...
 
void defaraday ()
 Remove Faraday rotation with respect to centre frequency. More...
 
template<class T >
const T * get () const
 
template<class T >
T * get ()
 
template<class T >
T * getadd ()
 
void orphan ()
 Disconnect from parent archive (useful after cloning a working copy)
 
void adopt (const Archive *)
 Connect to a new parent archive (also useful after cloning)
 
Integrationtotal () const
 Return an orphaned pscrunched dedispersed fscrunched clone of self. More...
 
std::string get_telescope () const
 Get the telescope name.
 
sky_coord get_coordinates () const
 Get the source coordinates.
 
double get_centre_frequency () const
 Get the centre frequency (in MHz)
 
double get_bandwidth () const
 Get the bandwidth (in MHz)
 
double get_dispersion_measure () const
 Get the dispersion measure (in ${\rm pc\, cm}^{-3}$)
 
bool get_dedispersed () const
 Inter-channel dispersion delay has been removed.
 
double get_rotation_measure () const
 Get the rotation measure (in ${\rm rad\, m}^{-2}$)
 
bool get_faraday_corrected () const
 Data has been corrected for ISM faraday rotation.
 
Signal::Basis get_basis () const
 Get the feed configuration of the receiver.
 
Signal::State get_state () const
 Get the polarimetric state of the profiles.
 
bool get_auxiliary_dispersion_corrected () const
 Auxiliary inter-channel dispersion delay has been removed.
 
bool get_auxiliary_birefringence_corrected () const
 Auxiliary inter-channel birefringence has been removed.
 
double get_effective_dispersion_measure () const
 Get the effective dispersion measure that remains to be corrected.
 
double get_effective_rotation_measure () const
 Get the effective rotation measure that remains to be corrected.
 
Profileget_Profile (unsigned ipol, unsigned ichan)
 Returns a pointer to the Profile given by the specified indeces.
 
const Profileget_Profile (unsigned ipol, unsigned ichan) const
 Returns a const pointer to the Profile given by the specified indeces.
 
PolnProfilenew_PolnProfile (unsigned ichan)
 Returns a pointer to a new PolnProfile instance. More...
 
const PolnProfilenew_PolnProfile (unsigned ichan) const
 Returns a const pointer to a new PolnProfile instance.
 
Stokes< float > get_Stokes (unsigned ichan, unsigned ibin) const
 Return the Stokes 4-vector for the frequency channel and phase bin. More...
 
void get_Stokes (std::vector< Stokes< float > > &S, unsigned iother, Signal::Dimension abscissa=Signal::Phase) const
 Returns a vector of Stokes parameters along the specified dimension. More...
 
virtual unsigned get_nextension () const
 Return the number of extensions available.
 
virtual const Extensionget_extension (unsigned iextension) const
 Return a pointer to the specified extension. More...
 
virtual Extensionget_extension (unsigned iextension)
 Return a pointer to the specified extension. More...
 
template<class ExtensionType >
const ExtensionType * get () const
 Template method searches for an Extension of the specified type.
 
template<class ExtensionType >
ExtensionType * get ()
 Template method searches for an Extension of the specified type.
 
template<class ExtensionType >
ExtensionType * getadd ()
 Template method returns an Extension of the specified type.
 
virtual void add_extension (Extension *extension)
 Add an Extension to the Integration instance. More...
 
virtual std::string list_extensions () const
 Return a comma-separated list of the short names of all extensions.
 
virtual void edit_extensions (const std::string &name)
 Add or remove extensions with the specified short name.
 
Expertexpert ()
 Provide access to the expert interface.
 
const Expertexpert () const
 Return the number of extensions available.
 
Profile::Strategiesget_strategy () const
 Returns the strategy manager.
 
- 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

virtual void set_nbin (unsigned numbins)
 Set the number of pulsar phase bins. More...
 
virtual void set_nchan (unsigned numchan)
 Set the number of frequency channels. More...
 
virtual void set_npol (unsigned numpol)
 Set the number of polarization measurements. More...
 
void init ()
 initialize all attributes to null
 
- Protected Member Functions inherited from Pulsar::Integration
virtual void resize (unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
 Set the dimensions of the data container. More...
 
virtual void insert (Integration *)
 Inserts Profiles from Integration into this.
 
virtual void remove (unsigned ichan)
 Remove a channel from this Integration.
 
virtual void remove (unsigned ichan_first, unsigned ichan_last)
 Remove an inclusive channel range from this Integration.
 
void reverse_chan ()
 Reverse the order of frequency channels. More...
 
void combine (const Integration *from)
 Combine from into this. More...
 
bool mixable (const Integration *integ, std::string &reason) const
 Test if integration may be combined with this. More...
 
virtual void copy (const Integration *subint, bool management=true)
 Copy the profiles and attributes through set_ get_ methods. More...
 
void swap_profiles (unsigned ipol, unsigned ichan, unsigned jpol, unsigned jchan)
 Swap the two specified profiles.
 
void rotate (double time)
 Rotate each profile by time (in seconds); updates the epoch attribute.
 
void rotate_phase (double phase)
 Rotate each profile by phase; does not update the epoch attribute.
 
void fold (unsigned nfold)
 Call Profile::fold on every profile.
 
void bscrunch (unsigned nscrunch)
 Call Profile::bsrunch on every profile.
 
void bscrunch_to_nbin (unsigned nbin)
 Call Profile::bsrunch_to_nbin on every profile.
 
void fscrunch (unsigned nscrunch=0)
 Integrate profiles from neighbouring chans. More...
 
void pscrunch ()
 Integrate profiles from single polarizations into one total intensity.
 
void invint ()
 Transform from Stokes (I,Q,U,V) to the polarimetric invariant interval. More...
 
void transform (const Jones< float > &response)
 Perform the congruence transformation on each polarimetric profile.
 
void transform (const std::vector< Jones< float > > &response)
 Perform frequency response on each polarimetric profile.
 
void convert_state (Signal::State state)
 Convert polarimetric data to the specified state.
 
virtual Profilenew_Profile ()
 All new Profile instances are created through this method. More...
 
void range_check (unsigned ipol, unsigned ichan) const
 Throw exception if ipol or ichan are out of range.
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

unsigned npol
 number of polarization measurments
 
unsigned nchan
 number of sub-chans
 
unsigned nbin
 number of bins
 
MJD epoch
 Epoch of the rising edge of bin zero.
 
double duration
 duration of integration
 
double pfold
 folding period (in seconds)
 
double gate
 gate duty cycle (in turns)
 
- Protected Attributes inherited from Pulsar::Integration
std::vector< Reference::To< Extension > > extension
 The Extensions added to this Integration instance.
 
std::vector< std::vector< Reference::To< Profile > > > profiles
 Data: npol by nchan profiles.
 
Reference::To< const Archive, false > parent
 The Archive that manages this integration.
 
Reference::To< Metaorphaned
 The orphaned Integration's attributes.
 
Reference::To< Expertexpert_interface
 Expert interface.
 

Additional Inherited Members

- Static Public Member Functions inherited from Pulsar::Integration
static unsigned get_instance_count ()
 returns the number of Integration instances
 
- 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::Integration
static bool verbose = false
 flag controls the amount output to stderr by Integration methods
 
static double match_max_frequency_difference = 0.1
 Maximum centre frequency difference in Integration::mixable. More...
 

Detailed Description

Member Function Documentation

◆ get_nbin()

virtual unsigned Pulsar::BasicIntegration::get_nbin ( ) const
inlinevirtual

Get the number of bins in each profile.

This attribute may be set only through Integration::resize

Implements Pulsar::Integration.

References duration.

◆ get_nchan()

virtual unsigned Pulsar::BasicIntegration::get_nchan ( ) const
inlinevirtual

Get the number of chans.

This attribute may be set only through Integration::resize

Implements Pulsar::Integration.

◆ get_npol()

virtual unsigned Pulsar::BasicIntegration::get_npol ( ) const
inlinevirtual

Get the number of polarization measurements.

This attribute may be set only through Integration::resize

Implements Pulsar::Integration.

References duration.

◆ set_nbin()

virtual void Pulsar::BasicIntegration::set_nbin ( unsigned  numbins)
inlineprotectedvirtual

Set the number of pulsar phase bins.

Called by Integration methods to update child attribute

Implements Pulsar::Integration.

◆ set_nchan()

virtual void Pulsar::BasicIntegration::set_nchan ( unsigned  numchan)
inlineprotectedvirtual

Set the number of frequency channels.

Called by Integration methods to update child attribute

Implements Pulsar::Integration.

◆ set_npol()

virtual void Pulsar::BasicIntegration::set_npol ( unsigned  numpol)
inlineprotectedvirtual

Set the number of polarization measurements.

Called by Integration methods to update child attribute

Implements Pulsar::Integration.


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

Generated using doxygen 1.8.17