IntegrationExpert.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/Base/Classes/Pulsar/IntegrationExpert.h
10
11#ifndef __Pulsar_IntegrationExpert_h
12#define __Pulsar_IntegrationExpert_h
13
14#include "Pulsar/Integration.h"
15#include "Pulsar/Archive.h"
16
17namespace Pulsar {
18
20
29
30 public:
31
32 Expert (Integration* inst) : instance(inst) { }
33
35 void set_nbin (unsigned numbins)
36 { instance->set_nbin (numbins); }
37 unsigned get_nbin () const { return instance->get_nbin(); }
38
40 void set_nchan (unsigned numchan)
41 { instance->set_nchan (numchan); }
42 unsigned get_nchan () const { return instance->get_nchan(); }
43
45 void set_npol (unsigned numpol)
46 { instance->set_npol (numpol); }
47 unsigned get_npol () const { return instance->get_npol(); }
48
50 void resize (unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
51 { instance->resize (npol, nchan, nbin); }
52
54 void remove (unsigned ichan)
55 { instance->remove (ichan); }
56
58 void insert (Integration* from)
59 { instance->insert (from); }
60
62 void rotate (double time)
63 { instance->rotate (time); }
64
66 void rotate_phase (double phase)
67 { instance->rotate_phase (phase); }
68
70 void fscrunch (unsigned nscrunch = 0)
71 { instance->fscrunch (nscrunch); }
72
74 void pscrunch ()
75 { instance->pscrunch (); }
76
78 void dedisperse (unsigned ichan, unsigned kchan, double f0)
79 { instance->dedisperse (ichan, kchan, f0); }
80
82 void defaraday (unsigned ichan, unsigned kchan, double f0)
83 { instance->defaraday (ichan, kchan, f0); }
84
86
88 { instance->update_absolute_dispersion(); }
89
91
93 { instance->update_absolute_rotation(); }
94
96 void swap_profiles (unsigned ipol, unsigned ichan,
97 unsigned jpol, unsigned jchan)
98 { instance->swap_profiles (ipol, ichan, jpol, jchan); }
99
101 void copy (const Integration* subint, bool management = true)
102 { instance->copy (subint, management); }
103
105 void combine (const Integration* from)
106 { instance->combine (from); }
107
109 void transform (const Jones<float>& response)
110 { instance->transform (response); }
111
113 void transform (const std::vector< Jones<float> >& response)
114 { instance->transform (response); }
115
118 { instance->convert_state (state); }
119
121 void set_zero_phase_aligned (bool flag)
122 { instance->zero_phase_aligned = flag; }
123
125 std::vector< std::vector< Reference::To<Profile> > >& profiles ()
126 { return instance->profiles; }
127
129 bool has_parent () const
130 { return instance->parent; }
131
133 const Archive* get_parent () const
134 { return instance->parent; }
135
136 private:
137
140 };
141
142}
143
144#endif
Provides access to private and protected members of Integration.
Definition IntegrationExpert.h:28
Integration()
Default constructor.
Definition Integration.C:158
void update_absolute_rotation()
Update the DeFaradayed extension, as needed.
Definition IntegrationExpert.h:92
void copy(const Integration *subint, bool management=true)
Copy the data from 'from' into 'this'.
Definition IntegrationExpert.h:101
void convert_state(Signal::State state)
Convert polarimetric data to the specified state.
Definition IntegrationExpert.h:117
std::vector< std::vector< Reference::To< Profile > > > & profiles()
Use with care.
Definition IntegrationExpert.h:125
void set_zero_phase_aligned(bool flag)
Leading edge of phase bin zero = polyco predicted phase zero.
Definition IntegrationExpert.h:121
void swap_profiles(unsigned ipol, unsigned ichan, unsigned jpol, unsigned jchan)
Swap the two specified Profiles.
Definition IntegrationExpert.h:96
void transform(const Jones< float > &response)
Perform the congruence transformation on each polarimetric profile.
Definition IntegrationExpert.h:109
void resize(unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
Set the dimensions of the data container.
Definition IntegrationExpert.h:50
void rotate_phase(double phase)
Rotate each profile by phase; does not update the epoch attribute.
Definition IntegrationExpert.h:66
void insert(Integration *from)
Inserts Profiles from Integration into this.
Definition IntegrationExpert.h:58
void set_nchan(unsigned numchan)
Set the number of frequency channels.
Definition IntegrationExpert.h:40
void combine(const Integration *from)
Combine the data from 'from' into 'this'.
Definition IntegrationExpert.h:105
void dedisperse(unsigned ichan, unsigned kchan, double f0)
Dedispersion worker function.
Definition IntegrationExpert.h:78
void defaraday(unsigned ichan, unsigned kchan, double f0)
Defaraday worker function.
Definition IntegrationExpert.h:82
void remove(unsigned ichan)
Remove the specified channel.
Definition IntegrationExpert.h:54
void rotate(double time)
Rotate each profile by time (in seconds); updates the epoch attribute.
Definition IntegrationExpert.h:62
void pscrunch()
Integrate profiles from single polarizations into one total intensity.
Definition IntegrationExpert.h:74
void set_nbin(unsigned numbins)
Set the number of pulsar phase bins.
Definition IntegrationExpert.h:35
void update_absolute_dispersion()
Update the Dedispersed extension, as needed.
Definition IntegrationExpert.h:87
void set_npol(unsigned numpol)
Set the number of polarization measurements.
Definition IntegrationExpert.h:45
void transform(const std::vector< Jones< float > > &response)
Perform frequency response on each polarimetric profile.
Definition IntegrationExpert.h:113
bool has_parent() const
Return true if the Integration has a parent Archive.
Definition IntegrationExpert.h:129
void fscrunch(unsigned nscrunch=0)
Integrate profiles from neighbouring chans.
Definition IntegrationExpert.h:70
const Archive * get_parent() const
Provide access to the parent Archive.
Definition IntegrationExpert.h:133
virtual unsigned get_nbin() const =0
Get the number of bins in each profile.
virtual unsigned get_nchan() const =0
Get the number of chans.
friend class Archive
The Extensions added to this Integration instance.
Definition Integration.h:440
friend class Expert
The Extensions added to this Integration instance.
Definition Integration.h:443
virtual unsigned get_npol() const =0
Get the number of polarization measurements.
Integration()
Default constructor.
Definition Integration.C:158
Defines the PSRCHIVE library.
Definition CalSource.h:17
void phase(Profile *input)
Compute the phase of the input complex-valued Profile.
Definition Fourier.C:135

Generated using doxygen 1.14.0