DataExtension.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2009 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Base/Classes/Pulsar/DataExtension.h
10
11#ifndef __Pulsar_Data_Extension_h
12#define __Pulsar_Data_Extension_h
13
14#include "Pulsar/ProfileExtension.h"
15
16namespace Pulsar
17{
20 {
21 public:
22
24 DataExtension (const char* name) : Profile::Extension (name) { }
25
27 virtual unsigned get_nbin() const = 0;
28
30 virtual void resize (unsigned nbin) = 0;
31
33 virtual void set_weight (float wt) = 0;
34
36 virtual void scale (double scale) = 0;
37
39 virtual void offset (double offset) = 0;
40
42 virtual void rotate_phase (double phase) = 0;
43
45 virtual void zero () = 0;
46
48 virtual void bscrunch (unsigned nscrunch) = 0;
49
51 virtual void bscrunch_to_nbin (unsigned nbin) = 0;
52
54 virtual void fold (unsigned nfold) = 0;
55
57 virtual void pscrunch () {}
58 };
59
60}
61
62#endif
virtual void zero()=0
set all amplitudes to zero
virtual void set_weight(float wt)=0
set the weight of the profile
virtual void pscrunch()
some extensions may have to respond to pscrunching
Definition DataExtension.h:57
virtual unsigned get_nbin() const =0
Get the number of phase bins in the extra data.
virtual void scale(double scale)=0
multiplies each bin of the profile by scale
virtual void offset(double offset)=0
offsets each bin of the profile by offset
virtual void rotate_phase(double phase)=0
rotates the profile by phase (in turns)
virtual void resize(unsigned nbin)=0
Resize the data area.
virtual void bscrunch(unsigned nscrunch)=0
integrate neighbouring phase bins in profile
virtual void bscrunch_to_nbin(unsigned nbin)=0
integrate neighbouring phase bins in profile
virtual void fold(unsigned nfold)=0
integrate neighbouring sections of the profile
DataExtension(const char *name)
Construct with a name.
Definition DataExtension.h:24
Definition ProfileExtension.h:24
Extension(const char *name)
Construct with a name.
Definition Profile.C:204
Any quantity recorded as a function of pulse phase.
Definition Profile.h:40
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