dspReduction.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2003 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Base/Extensions/Pulsar/dspReduction.h
10 
11 #ifndef __dspReduction_h
12 #define __dspReduction_h
13 
14 #include "Pulsar/ArchiveExtension.h"
15 
16 namespace Pulsar {
17 
19 
22  class dspReduction : public Archive::Extension {
23 
24  public:
25 
28 
30  dspReduction (const dspReduction& extension);
31 
33  const dspReduction& operator= (const dspReduction& extension);
34 
36  ~dspReduction ();
37 
39  dspReduction* clone () const;
40 
43 
44  // Text interface to a dspReduction instance
45  class Interface : public TextInterface::To<dspReduction>
46  {
47  public:
48  Interface( dspReduction *s_instance = NULL );
49  };
50 
52  std::string get_short_name () const { return "dspsr"; }
53 
55  //
56  // Backend implementation
57  //
59 
61  std::string get_software () const { return software; }
62 
64  void set_software (const std::string& soft) { software = soft; }
65 
71 
73  uint64_t get_total_samples () const { return total_samples; }
75  void set_total_samples (uint64_t _total_samples)
76  { total_samples= _total_samples; }
77 
79  uint64_t get_block_size () const { return block_size; }
81  void set_block_size (uint64_t _block_size)
82  { block_size = _block_size; }
83 
85  uint64_t get_overlap () const { return overlap; }
87  void set_overlap (uint64_t _overlap)
88  { overlap = _overlap; }
89 
91  Signal::State get_state () const { return state; }
93  void set_state (Signal::State _state)
94  { state = _state; }
95 
97 
103 
105  unsigned get_nsamp_fft () const { return nsamp_fft; }
107  void set_nsamp_fft (unsigned _nsamp_fft)
108  { nsamp_fft = _nsamp_fft; }
109 
111  unsigned get_nsamp_overlap_pos () const { return nsamp_overlap_pos; }
113  void set_nsamp_overlap_pos (unsigned _nsamp_overlap_pos)
114  { nsamp_overlap_pos = _nsamp_overlap_pos; }
115 
117  unsigned get_nsamp_overlap_neg () const { return nsamp_overlap_neg; }
119  void set_nsamp_overlap_neg (unsigned _nsamp_overlap_neg)
120  { nsamp_overlap_neg = _nsamp_overlap_neg; }
121 
123 
129 
131  unsigned get_nchan () const { return nchan; }
133  void set_nchan (unsigned _nchan)
134  { nchan = _nchan; }
135 
137  unsigned get_freq_res () const { return freq_res; }
139  void set_freq_res (unsigned _freq_res)
140  { freq_res= _freq_res; }
141 
143  unsigned get_time_res () const { return time_res; }
145  void set_time_res (unsigned _time_res)
146  { time_res= _time_res; }
147 
149 
150 
156 
158  unsigned get_ScrunchFactor () const { return ScrunchFactor; }
160  void set_ScrunchFactor (unsigned _ScrunchFactor)
161  { ScrunchFactor = _ScrunchFactor; }
162 
163 
165 
171 
173  double get_scale () const { return scale; }
175  void set_scale (double _scale)
176  { scale = _scale; }
177 
179 
180 
181  protected:
182 
184  std::string software;
185 
191 
193  uint64_t total_samples;
194 
196  uint64_t block_size;
197 
199  uint64_t overlap;
200 
203 
205 
211 
213  unsigned nsamp_fft;
214 
216  unsigned nsamp_overlap_pos;
217 
219  unsigned nsamp_overlap_neg;
220 
222 
228 
230  unsigned nchan;
231 
233  unsigned freq_res;
234 
236  unsigned time_res;
237 
239 
240 
246 
248  unsigned ScrunchFactor;
249 
251 
257 
259  double scale;
260 
262 
263  };
264 
265 
266 }
267 
268 #endif
Application with basic command line options.
Definition: Application.h:30
unsigned get_nsamp_overlap_neg() const
Number of time samples in wrap-around region, right-hand side.
Definition: dspReduction.h:127
dspReduction()
Default constructor.
Definition: dspReduction.C:11
double get_scale() const
Pulsar::Profiles are normalized by Observation::scale.
Definition: dspReduction.h:183
void phase(Profile *input)
Compute the phase of the input complex-valued Profile.
Definition: Fourier.C:135
unsigned time_res
Time resolution.
Definition: dspReduction.h:246
void set_nchan(unsigned _nchan)
Number of frequency channels.
Definition: dspReduction.h:143
unsigned get_nchan() const
Number of frequency channels.
Definition: dspReduction.h:141
Stores dspsr data reduction parameters.
Definition: dspReduction.h:27
void set_nsamp_fft(unsigned _nsamp_fft)
Number of time samples in each FFT.
Definition: dspReduction.h:117
Signal::State get_state() const
The state of the signal from Input::info.
Definition: dspReduction.h:101
TextInterface::Parser * get_interface()
get the text interface
Definition: dspReduction.C:81
void frc1d(size_t nfft, float *into, const float *from)
unsigned freq_res
Frequency resolution.
Definition: dspReduction.h:243
void set_nsamp_overlap_pos(unsigned _nsamp_overlap_pos)
Number of time samples in wrap-around region, left-hand side.
Definition: dspReduction.h:123
unsigned get_nsamp_fft() const
Number of time samples in each FFT.
Definition: dspReduction.h:115
double scale
Pulsar::Profiles are normalized by Observation::scale.
Definition: dspReduction.h:269
unsigned get_freq_res() const
Frequency resolution.
Definition: dspReduction.h:147
unsigned ScrunchFactor
Time resolution reduction factor.
Definition: dspReduction.h:258
The primary interface to pulsar observational data.
Definition: Archive.h:45
static Archive * load(const std::string &name)
Factory returns a new instance loaded from filename.
Definition: Archive_load.C:28
unsigned nsamp_overlap_pos
Number of time samples in wrap-around region, left-hand side.
Definition: dspReduction.h:226
const ScalarMath pow(const ScalarMath &x, const ScalarMath &y)
void set_total_samples(uint64_t _total_samples)
The total number of time samples.
Definition: dspReduction.h:85
uint64_t overlap
The number of time samples by which consecutive blocks overlap.
Definition: dspReduction.h:209
unsigned get_time_res() const
Time resolution.
Definition: dspReduction.h:153
void set_ScrunchFactor(unsigned _ScrunchFactor)
Time resolution reduction factor.
Definition: dspReduction.h:170
Manages a combined scrunch factor or target dimension.
Definition: ScrunchFactor.h:25
unsigned get_nsamp_overlap_pos() const
Number of time samples in wrap-around region, left-hand side.
Definition: dspReduction.h:121
unsigned nchan
Number of frequency channels.
Definition: dspReduction.h:240
uint64_t get_block_size() const
The number of time samples in each block.
Definition: dspReduction.h:89
std::string software
The software information.
Definition: dspReduction.h:194
unsigned get_ScrunchFactor() const
Time resolution reduction factor.
Definition: dspReduction.h:168
Standard interpreter command line options.
Definition: StandardOptions.h:26
uint64_t block_size
The number of time samples in each block.
Definition: dspReduction.h:206
uint64_t get_overlap() const
The number of time samples by which consecutive blocks overlap.
Definition: dspReduction.h:95
void set_software(const std::string &soft)
Set the software information.
Definition: dspReduction.h:74
std::string get_short_name() const
Return a short name.
Definition: dspReduction.h:62
uint64_t get_total_samples() const
The total number of time samples.
Definition: dspReduction.h:83
virtual void add(Item *)
void set_scale(double _scale)
Pulsar::Profiles are normalized by Observation::scale.
Definition: dspReduction.h:185
void set_block_size(uint64_t _block_size)
The number of time samples in each block.
Definition: dspReduction.h:91
uint64_t total_samples
The total number of time samples.
Definition: dspReduction.h:203
void set_nsamp_overlap_neg(unsigned _nsamp_overlap_neg)
Number of time samples in wrap-around region, right-hand side.
Definition: dspReduction.h:129
void set_state(Signal::State _state)
The state of the signal from Input::info.
Definition: dspReduction.h:103
Signal::State state
The state of the signal from Input::info.
Definition: dspReduction.h:212
std::string get_software() const
Get the software information.
Definition: dspReduction.h:71
unsigned nsamp_fft
Number of time samples in each FFT.
Definition: dspReduction.h:223
static unsigned verbose
A verbosity flag that can be set for debugging purposes.
Definition: IntegrationManager.h:38
const dspReduction & operator=(const dspReduction &extension)
Assignment operator.
Definition: dspReduction.C:53
~dspReduction()
Destructor.
Definition: dspReduction.C:77
Defines the PSRCHIVE library.
Definition: CalSource.h:17
void set_time_res(unsigned _time_res)
Time resolution.
Definition: dspReduction.h:155
dspReduction * clone() const
Clone method.
Definition: dspReduction.C:43
void fcc1d(size_t nfft, float *into, const float *from)
void set_overlap(uint64_t _overlap)
The number of time samples by which consecutive blocks overlap.
Definition: dspReduction.h:97
unsigned nsamp_overlap_neg
Number of time samples in wrap-around region, right-hand side.
Definition: dspReduction.h:229
void set_freq_res(unsigned _freq_res)
Frequency resolution.
Definition: dspReduction.h:149

Generated using doxygen 1.8.17