CoherentDedispersion.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2010 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Base/Extensions/Pulsar/CoherentDedispersion.h
10
11#ifndef __CoherentDedispersion_h
12#define __CoherentDedispersion_h
13
14#include "Pulsar/ArchiveExtension.h"
15
16namespace Pulsar {
17
19
23
24 public:
25
28
31
34
35 // Text interface to a CoherentDedispersion instance
36 class Interface : public TextInterface::To<CoherentDedispersion>
37 {
38 public:
39 Interface( CoherentDedispersion* = NULL );
40 };
41
43 std::string get_short_name () const { return "cd"; }
44
46 //
47 // OutputChannel nested class
48 //
50
53 {
54
55 public:
56
58 double get_centre_frequency () const { return centre_frequency; }
60 void set_centre_frequency (double val) { centre_frequency = val; }
61
63 double get_bandwidth () const { return bandwidth; }
65 void set_bandwidth (double val) { bandwidth = val; }
66
68 unsigned get_nsamp () const { return nsamp; }
70 void set_nsamp (unsigned val) { nsamp = val; }
71
73 unsigned get_nsamp_overlap_pos () const { return nsamp_overlap_pos; }
75 void set_nsamp_overlap_pos (unsigned val) { nsamp_overlap_pos = val; }
76
78 unsigned get_nsamp_overlap_neg () const { return nsamp_overlap_neg; }
80 void set_nsamp_overlap_neg (unsigned val) { nsamp_overlap_neg = val; }
81
82 protected:
83
86
88 double bandwidth;
89
91 unsigned nsamp;
92
95
98
99 };
100
102 //
103 // InputChannel nested class
104 //
106
109 {
110
111 public:
112
114 double get_centre_frequency () const { return centre_frequency; }
116 void set_centre_frequency (double val) { centre_frequency = val; }
117
119 double get_bandwidth () const { return bandwidth; }
121 void set_bandwidth (double val) { bandwidth = val; }
122
124 unsigned get_nchan_output () const { return output.size(); }
125 void set_nchan_output (unsigned nchan) { output.resize( nchan ); }
126
127 const OutputChannel& get_output (unsigned ichan_output) const;
128 OutputChannel& get_output (unsigned ichan_output);
129
130 protected:
131
134
136 double bandwidth;
137
139 std::vector<OutputChannel> output;
140
141 void check_index (unsigned ichan_output) const;
142 };
143
145 //
146 // CoherentDedisperion class attributes/methods
147 //
149
152 void set_domain (Signal::Dimension val) { domain = val; }
153
155 std::string get_description () const { return description; }
156 void set_description (const std::string& val) { description = val; }
157
159 double get_dispersion_measure () const { return dispersion_measure; }
160 void set_dispersion_measure (double val) { dispersion_measure = val; }
161
163 double get_doppler_correction () const { return doppler_correction; }
164 void set_doppler_correction (double val) { doppler_correction = val; }
165
167 int get_nbit_data () const { return nbit_data; }
168 void set_nbit_data (int nbit) { nbit_data = nbit; }
169
171 int get_nbit_chirp () const { return nbit_chirp; }
172 void set_nbit_chirp (int nbit) { nbit_chirp = nbit; }
173
175 unsigned get_nchan_input () const { return input.size(); }
176 void set_nchan_input (unsigned nchan) { input.resize( nchan ); }
177
178 const InputChannel& get_input (unsigned ichan_input) const;
179 InputChannel& get_input (unsigned ichan_input);
180
181 protected:
182
185
187 std::string description;
188
191
194
197
200
202 std::vector<InputChannel> input;
203
205 void check_index (unsigned ichan_input) const;
206 };
207
208}
209
210#endif
Coherent dedispersion attributes specific to input frequency channel.
Definition CoherentDedispersion.h:109
Coherent dedispersion attributes specific to output frequency channel.
Definition CoherentDedispersion.h:53
CoherentDedispersion()
Default constructor.
Definition CoherentDedispersion.C:13
Definition ArchiveExtension.h:24
double bandwidth
Bandwidth of input channel.
Definition CoherentDedispersion.h:136
double centre_frequency
Centre frequency of input channel.
Definition CoherentDedispersion.h:133
double get_bandwidth() const
Bandwidth of input channel.
Definition CoherentDedispersion.h:119
void set_centre_frequency(double val)
Centre frequency of input channel.
Definition CoherentDedispersion.h:116
void set_bandwidth(double val)
Bandwidth of input channel.
Definition CoherentDedispersion.h:121
unsigned get_nchan_output() const
Number of frequency channels into which this channel was divided.
Definition CoherentDedispersion.h:124
std::vector< OutputChannel > output
Information specific to each output frequency channel.
Definition CoherentDedispersion.h:139
double get_centre_frequency() const
Centre frequency of input channel.
Definition CoherentDedispersion.h:114
double get_centre_frequency() const
Centre frequency of output channel.
Definition CoherentDedispersion.h:58
double get_bandwidth() const
Bandwidth of output channel.
Definition CoherentDedispersion.h:63
unsigned get_nsamp_overlap_neg() const
Number of complex time samples in wrap-around region, right-hand side.
Definition CoherentDedispersion.h:78
void set_centre_frequency(double val)
Centre frequency of output channel.
Definition CoherentDedispersion.h:60
unsigned get_nsamp_overlap_pos() const
Number of complex time samples in wrap-around region, left-hand side.
Definition CoherentDedispersion.h:73
void set_nsamp_overlap_pos(unsigned val)
Number of complex time samples in wrap-around region, left-hand side.
Definition CoherentDedispersion.h:75
double bandwidth
Bandwidth of output channel.
Definition CoherentDedispersion.h:88
unsigned nsamp
Number of complex time samples in each cyclical convolution.
Definition CoherentDedispersion.h:91
double centre_frequency
Centre frequency of output channel.
Definition CoherentDedispersion.h:85
unsigned get_nsamp() const
Number of complex time samples in each cyclical convolution.
Definition CoherentDedispersion.h:68
unsigned nsamp_overlap_neg
Number of complex time samples in wrap-around region, right-hand side.
Definition CoherentDedispersion.h:97
void set_bandwidth(double val)
Bandwidth of output channel.
Definition CoherentDedispersion.h:65
void set_nsamp_overlap_neg(unsigned val)
Number of complex time samples in wrap-around region, right-hand side.
Definition CoherentDedispersion.h:80
unsigned nsamp_overlap_pos
Number of complex time samples in wrap-around region, left-hand side.
Definition CoherentDedispersion.h:94
void set_nsamp(unsigned val)
Number of complex time samples in each cyclical convolution.
Definition CoherentDedispersion.h:70
std::string get_short_name() const
Return a short name.
Definition CoherentDedispersion.h:43
std::string description
Description of the algorithm.
Definition CoherentDedispersion.h:187
int nbit_chirp
Number of bits used to represent chirp.
Definition CoherentDedispersion.h:199
void check_index(unsigned ichan_input) const
Throw an exception if index is out of range.
Definition CoherentDedispersion.C:52
int get_nbit_data() const
Number of bits used to represent data.
Definition CoherentDedispersion.h:167
unsigned get_nchan_input() const
Number of frequency channels in the input signal.
Definition CoherentDedispersion.h:175
double get_dispersion_measure() const
Dispersion measure used for coherent dedispersion.
Definition CoherentDedispersion.h:159
CoherentDedispersion * clone() const
Clone method.
Definition CoherentDedispersion.C:27
std::vector< InputChannel > input
Information specific to each input frequency channel.
Definition CoherentDedispersion.h:202
double doppler_correction
Doppler shift correction applied to frequencies and bandwidths.
Definition CoherentDedispersion.h:193
TextInterface::Parser * get_interface()
get the text interface
Definition CoherentDedispersion.C:33
double dispersion_measure
Dispersion measure used for coherent dedispersion.
Definition CoherentDedispersion.h:190
CoherentDedispersion()
Default constructor.
Definition CoherentDedispersion.C:13
std::string get_description() const
Description of the algorithm.
Definition CoherentDedispersion.h:155
int nbit_data
Number of bits used to represent data.
Definition CoherentDedispersion.h:196
double get_doppler_correction() const
Doppler shift correction applied to frequencies and bandwidths.
Definition CoherentDedispersion.h:163
Signal::Dimension get_domain() const
Domain in which the algorithm operates (time or frequency)
Definition CoherentDedispersion.h:151
Signal::Dimension domain
Domain in which the algorithm operates (time or frequency)
Definition CoherentDedispersion.h:184
int get_nbit_chirp() const
Number of bits used to represent chirp.
Definition CoherentDedispersion.h:171
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0