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 
17 namespace Pulsar {
18 
20 
28  class Integration::Expert : public Reference::Able {
29 
30  public:
31 
32  Expert (Integration* inst)
33  { instance = inst; }
34 
36  void set_nbin (unsigned numbins)
37  { instance->set_nbin (numbins); }
38  unsigned get_nbin () const { return instance->get_nbin(); }
39 
41  void set_nchan (unsigned numchan)
42  { instance->set_nchan (numchan); }
43  unsigned get_nchan () const { return instance->get_nchan(); }
44 
46  void set_npol (unsigned numpol)
47  { instance->set_npol (numpol); }
48  unsigned get_npol () const { return instance->get_npol(); }
49 
51  void resize (unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
52  { instance->resize (npol, nchan, nbin); }
53 
55  void remove (unsigned ichan)
56  { instance->remove (ichan); }
57 
59  void insert (Integration* from)
60  { instance->insert (from); }
61 
63  void rotate (double time)
64  { instance->rotate (time); }
65 
67  void rotate_phase (double phase)
68  { instance->rotate_phase (phase); }
69 
71  void fscrunch (unsigned nscrunch = 0)
72  { instance->fscrunch (nscrunch); }
73 
75  void pscrunch ()
76  { instance->pscrunch (); }
77 
79  void dedisperse (unsigned ichan, unsigned kchan, double f0)
80  { instance->dedisperse (ichan, kchan, f0); }
81 
83  void defaraday (unsigned ichan, unsigned kchan, double f0)
84  { instance->defaraday (ichan, kchan, f0); }
85 
87  void swap_profiles (unsigned ipol, unsigned ichan,
88  unsigned jpol, unsigned jchan)
89  { instance->swap_profiles (ipol, ichan, jpol, jchan); }
90 
92  void copy (const Integration* subint, bool management = true)
93  { instance->copy (subint, management); }
94 
96  void combine (const Integration* from)
97  { instance->combine (from); }
98 
100  void transform (const Jones<float>& response)
101  { instance->transform (response); }
102 
104  void transform (const std::vector< Jones<float> >& response)
105  { instance->transform (response); }
106 
108  void convert_state (Signal::State state)
109  { instance->convert_state (state); }
110 
112  void set_zero_phase_aligned (bool flag)
113  { instance->zero_phase_aligned = flag; }
114 
116  std::vector< std::vector< Reference::To<Profile> > >& profiles ()
117  { return instance->profiles; }
118 
120  bool has_parent () const
121  { return instance->parent; }
122 
124  const Archive* get_parent () const
125  { return instance->parent; }
126 
127  private:
128 
131  };
132 
133 }
134 
135 #endif
std::vector< std::vector< Reference::To< Profile > > > & profiles()
Use with care.
Definition: IntegrationExpert.h:126
void insert(Integration *from)
Inserts Profiles from Integration into this.
Definition: IntegrationExpert.h:69
void convert_state(Signal::State state)
Convert polarimetric data to the specified state.
Definition: IntegrationExpert.h:118
void set_nbin(unsigned numbins)
Set the number of pulsar phase bins.
Definition: IntegrationExpert.h:46
void phase(Profile *input)
Compute the phase of the input complex-valued Profile.
Definition: Fourier.C:135
void defaraday(unsigned ichan, unsigned kchan, double f0)
Defaraday worker function.
Definition: IntegrationExpert.h:93
void transform(const Jones< float > &response)
Perform the congruence transformation on each polarimetric profile.
Definition: IntegrationExpert.h:110
void fscrunch(unsigned nscrunch=0)
Integrate profiles from neighbouring chans.
Definition: IntegrationExpert.h:81
The primary interface to pulsar observational data.
Definition: Archive.h:45
const Archive * get_parent() const
Provide access to the parent Archive.
Definition: IntegrationExpert.h:134
void rotate(double time)
Rotate each profile by time (in seconds); updates the epoch attribute.
Definition: IntegrationExpert.h:73
void set_zero_phase_aligned(bool flag)
Leading edge of phase bin zero = polyco predicted phase zero.
Definition: IntegrationExpert.h:122
void dedisperse(unsigned ichan, unsigned kchan, double f0)
Dedispersion worker function.
Definition: IntegrationExpert.h:89
void copy(const Integration *subint, bool management=true)
Copy the data from 'from' into 'this'.
Definition: IntegrationExpert.h:102
Array of Profiles integrated over the same time interval.
Definition: Integration.h:37
void pscrunch()
Integrate profiles from single polarizations into one total intensity.
Definition: IntegrationExpert.h:85
void rotate_phase(double phase)
Rotate each profile by phase; does not update the epoch attribute.
Definition: IntegrationExpert.h:77
void swap_profiles(unsigned ipol, unsigned ichan, unsigned jpol, unsigned jchan)
Swap the two specified Profiles.
Definition: IntegrationExpert.h:97
void set_npol(unsigned numpol)
Set the number of polarization measurements.
Definition: IntegrationExpert.h:56
friend class Expert
The Extensions added to this Integration instance.
Definition: Integration.h:430
void combine(const Integration *from)
Combine the data from 'from' into 'this'.
Definition: IntegrationExpert.h:106
void resize(unsigned npol=0, unsigned nchan=0, unsigned nbin=0)
Set the dimensions of the data container.
Definition: IntegrationExpert.h:61
Integration()
Default constructor.
Definition: Integration.C:152
bool has_parent() const
Return true if the Integration has a parent Archive.
Definition: IntegrationExpert.h:130
void set_nchan(unsigned numchan)
Set the number of frequency channels.
Definition: IntegrationExpert.h:51
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void remove(unsigned ichan)
Remove the specified channel.
Definition: IntegrationExpert.h:65

Generated using doxygen 1.8.17