SigProcDigitizer.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // dspsr/Kernel/Formats/sigproc/dsp/SigProcDigitizer.h
10 
11 #ifndef __SigProcDigitizer_h
12 #define __SigProcDigitizer_h
13 
14 #include "dsp/Digitizer.h"
15 
16 namespace dsp
17 {
19  class SigProcDigitizer: public Digitizer
20  {
21  public:
22 
25 
26  void set_nbit (int);
27 
29  void pack ();
30 
32  void pack_float ();
33 
35  void set_scale(float _scale) { scale_fac = _scale; }
36 
38  void use_digi_scales (bool _rescale) { rescale = _rescale; }
39 
40  protected:
41 
43  float scale_fac;
44 
46  bool rescale;
47 
48  };
49 }
50 
51 #endif
void set_nbit(int)
Set the number of bits per sample.
Definition: SigProcDigitizer.C:19
Parses Observation attributes from a SigProc header.
Definition: SigProcObservation.h:24
void set_scale(float _scale)
Set the manual scale factor.
Definition: SigProcDigitizer.h:45
void pack()
Pack the data.
Definition: SigProcDigitizer.C:80
Contains all Baseband Data Reduction Library classes.
Definition: ASCIIObservation.h:17
static File * create(const char *filename)
Return a pointer to a new instance of the appropriate sub-class.
Definition: File.C:67
static bool verbose
Verbosity flag.
Definition: Observation.h:39
void pack_float()
Special case for floating point data.
Definition: SigProcDigitizer.C:309
void unload(FILE *header)
Write a SigProc header block.
Definition: SigProcObservation.C:230
virtual void copy(const Observation *obs)
Same as operator= but takes a pointer.
Definition: Observation.h:57
Convert floating point samples to N-bit samples.
Definition: Digitizer.h:27
SigProcDigitizer()
Default constructor.
Definition: SigProcDigitizer.C:11
double get_rate() const
Return the sampling rate (time samples per second in Hz)
Definition: Observation.h:157
Stores information about digital, band-limited, time-varying signals.
Definition: Observation.h:33
void use_digi_scales(bool _rescale)
Set whether or not to apply the nbit-depedent scalings.
Definition: SigProcDigitizer.h:48
double get_bandwidth() const
Return the bandwidth of signal in MHz (-ve = lsb; +ve = usb)
Definition: Observation.h:147
std::string get_source() const
Return the source name.
Definition: Observation.h:122
static bool verbose
Global verbosity flag.
Definition: Operation.h:48
double get_centre_frequency() const
Return the centre frequency of the band-limited signal in MHz.
Definition: Observation.h:134
bool verbose
bool rescale
Should the data be rescaled using the nbit-dependent values?
Definition: SigProcDigitizer.h:56
@ OrderFPT
Frequency, Polarization, Time (default before 3 October 2008)
Definition: TimeSeries.h:47
float scale_fac
Additional scale factor to apply to data.
Definition: SigProcDigitizer.h:53
@ OrderTFP
Time, Frequency, Polarization (better for many things)
Definition: TimeSeries.h:50

Generated using doxygen 1.8.17