IntegrationBarycentre.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2012 by Paul Demorest
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 #ifndef __Pulsar_IntegrationBarycentre_h
10 #define __Pulsar_IntegrationBarycentre_h
11 
12 #include "Reference.h"
13 #include "Barycentre.h"
14 
15 namespace Pulsar {
16 
17  class Integration;
18 
20  class IntegrationBarycentre : public Reference::Able {
21 
22  public:
23 
26 
29 
31  void set_Integration (const Integration* subint);
32 
34  double get_Doppler() const;
35 
37  MJD get_barycentric_epoch() const;
38 
39  protected:
40 
42 
43  Barycentre bary;
44 
45  };
46 
47 }
48 
49 
50 #endif // !defined __Pulsar_PhaseWeight_h
void stats(const Profile *profile, double *mean, double *variance=0, double *varmean=0, double *varvar=0) const
Get the statistics of the weighted phase bins (deprecated interface)
Definition: PhaseWeight.C:420
void average(const Profile *that)
set this to the weighted average of this and that
Definition: Profile_average.C:52
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.
Definition: Integration_remove_baseline.C:54
void find_transitions(int &hi2lo, int &lo2hi, int &buffer) const
Find the transitions between high and low states in total intensity.
Definition: Integration_find.C:22
void rotate_phase(double phase)
Rotate each profile by phase; does not update the epoch attribute.
Definition: Integration_rotate.C:28
void fscrunch(unsigned nscrunch=0)
Integrate profiles from neighbouring chans.
Definition: Integration_fscrunch.C:28
Signal::Basis get_basis() const
Get the feed configuration of the receiver.
Definition: Integration.C:588
virtual unsigned get_npol() const =0
Get the number of polarization measurements.
const PolnProfile * get_Stokes(const Archive *data, Index subint, Index chan)
Return a new PolnProfile with state == Signal::Stokes.
Definition: Index.C:158
void invint()
Transform from Stokes (I,Q,U,V) to the polarimetric invariant interval.
Definition: Integration_invint.C:19
void transform(const Jones< float > &response)
Perform the congruence transformation on each polarimetric profile.
Definition: Integration_transform.C:42
virtual void resize(unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
Set the dimensions of the data container.
Definition: Integration_resize.C:20
Integrates frequency channels in an Integration.
Definition: FrequencyIntegrate.h:46
static bool verbose
flag controls the amount output to stderr by Integration methods
Definition: Integration.h:42
double get_centre_frequency(unsigned ichan) const
Get the Profile centre frequency attribute of the given channel.
Definition: Integration.C:359
Stores a weight for each Profile phase bin.
Definition: PhaseWeight.h:29
Stores otherwise shared attributes of orphaned Integrations.
Definition: IntegrationMeta.h:26
virtual void set_epoch(const MJD &mjd)=0
Set the epoch of the rising edge of bin zero.
virtual unsigned get_nbin() const =0
Get the number of bins in each profile.
Corrects dispersive delays.
Definition: Dispersion.h:33
Signal::State get_state() const
Get the polarimetric state of the profiles.
Definition: Integration.C:599
const Profile * new_Profile(const PolnProfile *data, char code)
Return a possibly newly constructed Profile with state specified by code.
Definition: Polarization.C:35
void transform(Integration *)
The frequency integration operation.
Definition: FrequencyIntegrate.C:47
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.
Definition: Integration_cal_levels.C:16
double effective_bandwidth(unsigned ch_start=0, unsigned ch_end=0) const
Computes the effective bandwidth of an interval of sub-channels.
Definition: Integration_weighted_frequency.C:27
float get_weight(unsigned ichan) const
Get the Profile weight attribute of the given channel.
Definition: Integration.C:388
virtual double get_duration() const =0
Get the total time integrated (in seconds)
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
double get_dispersion_measure() const
Get the dispersion measure (in )
Definition: Integration.C:456
IntegrationBarycentre()
Default constructor.
Definition: IntegrationBarycentre.C:15
PhaseWeight * baseline() const
Return a new PhaseWeight instance with the baseline phase bins masked.
Definition: Integration_remove_baseline.C:20
Find the baseline from the total integrated total intensity profile.
Definition: RemoveBaseline.h:70
void rotate(double time)
Rotate each profile by time (in seconds); updates the epoch attribute.
Definition: Integration_rotate.C:11
Polarimetric pulse profile transformations and derivations.
Definition: PolnProfile.h:34
void find_peak_edges(int &rise, int &fall) const
Find the bins in which the total intensity exceeds a threshold.
Definition: Integration_find.C:51
float find_min_phase(float dc=0.10) const
Returns the centre phase of the region with minimum total intensity.
Definition: Integration_find.C:81
Stokes< float > get_Stokes(unsigned ichan, unsigned ibin) const
Return the Stokes 4-vector for the frequency channel and phase bin.
Definition: Integration_get_Stokes.C:27
virtual void get_xyz(double &x, double &y, double &z) const=0
void combine(const Integration *from)
Combine from into this.
Definition: Integration_combine.C:28
void defaraday()
Remove Faraday rotation with respect to centre frequency.
Definition: Integration_defaraday.C:18
bool mixable(const Integration *integ, std::string &reason) const
Test if integration may be combined with this.
Definition: Integration_mixable.C:27
void remove_baseline(const PhaseWeight *baseline=0)
Remove the baseline from all profiles.
Definition: Integration_remove_baseline.C:35
double get_bandwidth() const
Get the bandwidth (in MHz)
Definition: Integration.C:445
void dedisperse()
Remove dispersion delays with respect to centre frequency.
Definition: Integration_dedisperse.C:16
Integration * total() const
Return an orphaned pscrunched dedispersed fscrunched clone of self.
Definition: Integration_total.C:22
double get_Doppler() const
Return Doppler factor.
Definition: IntegrationBarycentre.C:26
void convert_state(Signal::State state)
Convert polarimetric data to the specified state.
Definition: Integration_convert_state.C:22
virtual unsigned get_nchan() const =0
Get the number of chans.
Shift phase weight mask by dispersion delay.
Definition: DisperseWeight.h:30
float find_max_phase() const
Returns the centre phase of the region with maximum total intensity.
Definition: Integration_find.C:106
Defines the PSRCHIVE library.
Definition: CalSource.h:17
MJD get_barycentric_epoch() const
Return barycentric subint epoch.
Definition: IntegrationBarycentre.C:31
virtual void insert(Integration *)
Inserts Profiles from Integration into this.
Definition: Integration_insert.C:26
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 orphan()
Disconnect from parent archive (useful after cloning a working copy)
Definition: Integration_orphan.C:17
void transform(Integration *)
The default correction.
Definition: ColdPlasma.h:169
Profile * get_Profile(unsigned ipol, unsigned ichan)
Returns a pointer to the Profile given by the specified indeces.
Definition: Integration.C:306
Calculates the signal-to-noise ratio using (on-off)/rms.
Definition: SquareWave.h:31
PolnProfile * new_PolnProfile(unsigned ichan)
Returns a pointer to a new PolnProfile instance.
Definition: Integration_new_PolnProfile.C:16
virtual void set_range_policy(RangePolicy *rp)
Set the range division policy.
Definition: Integrate.h:57
void set_Integration(const Integration *subint)
Set the Integration for which to compute barycenter values.
Definition: IntegrationBarycentre.C:37
static double match_max_frequency_difference
Maximum centre frequency difference in Integration::mixable.
Definition: Integration.h:45
virtual void remove(unsigned ichan)
Remove a channel from this Integration.
Definition: Integration_remove.C:14
Corrects Faraday rotation.
Definition: FaradayRotation.h:37
double weighted_frequency(unsigned ch_start=0, unsigned ch_end=0) const
Computes the weighted centre frequency of an interval of sub-channels.
Definition: Integration_weighted_frequency.C:20
Inserted by Integration class to tell Profile instance it is managed.
Definition: ManagedStrategies.h:64

Generated using doxygen 1.8.17