casacore
Loading...
Searching...
No Matches
MarshButterworthBandpass.h
Go to the documentation of this file.
1//# MarshButterworthBandpass.h: a Marshallable SimButterworthBandpass
2//# Copyright (C) 2002
3//# Associated Universities, Inc. Washington DC, USA.
4//#
5//# This library is free software; you can redistribute it and/or modify it
6//# under the terms of the GNU Library General Public License as published by
7//# the Free Software Foundation; either version 2 of the License, or (at your
8//# option) any later version.
9//#
10//# This library is distributed in the hope that it will be useful, but WITHOUT
11//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13//# License for more details.
14//#
15//# You should have received a copy of the GNU Library General Public License
16//# along with this library; if not, write to the Free Software Foundation,
17//# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18//#
19//# Correspondence concerning AIPS++ should be addressed as follows:
20//# Internet email: casa-feedback@nrao.edu.
21//# Postal address: AIPS++ Project Office
22//# National Radio Astronomy Observatory
23//# 520 Edgemont Road
24//# Charlottesville, VA 22903-2475 USA
25
26#ifndef SCIMATH_MARSHBUTTERWORTHBANDPASS_H
27#define SCIMATH_MARSHBUTTERWORTHBANDPASS_H
28
29#include <casacore/casa/aips.h>
30#include <casacore/scimath/Functionals/SimButterworthBandpass.h>
31#include <casacore/scimath/Functionals/FunctionMarshallable.h>
32
33namespace casacore { //# NAMESPACE CASACORE - BEGIN
34
35//# Forward Declarations
36
37// <summary> A Butterworth function class that supports serialization
38// </summary>
39
40// <use visibility=export>
41
42// <reviewed reviewer="" date="" tests="" demos="">
43// </reviewed>
44
45// <prerequisite>
46// <li> <linkto class=Function>Function</linkto>
47// </prerequisite>
48//
49// <etymology>
50// "Marsh" is short for "Marshallable" which means that the class can
51// be serialized into a form that can be transmitted to another
52// execution context. "ButterBandpass" refers to its parent class:
53// SimButterworthBandpass.
54// </etymology>
55//
56// <synopsis>
57// This class is a specialization of SimButterworthBandpass class that
58// supports serialization. That is, it allows one to write the state of the
59// SimButterworthBandpass function object into a Record. This record
60// can then be transmitted to another execution context
61// where it can be "reconstituted" as a new object with
62// identical state as this one. This documentation focusses on this
63// serialization functionality (also known as "marshalling"); for details
64// about the general features of this Butterworth function, see the
65// <linkto class="SimButterworthBandpass">SimButterworthBandpass</linkto>
66// class.
67// </synopsis>
68//
69// <example>
70// </example>
71//
72// <motivation>
73// Making SimButterworthBandpass Marshallable provides a convenient way of
74// configuring the simulator tool from .
75// </motivation>
76//
77// <thrown>
78// <li> Assertion in debug mode if attempt is made to address incorrect
79// coefficients
80// </thrown>
81//
82
83template<class T>
86{
87public:
88 static const String FUNCTYPE;
89 static const String FUNCFIELDS[];
90
91 // definitions of the fields stored in a serialized Record. The
92 // actual string names are stored in FUNCFIELDS
94 // the minimum cutoff, center, and maximum cutoff values
96 // the orders of the transitions between pass and no-pass
98 // the peak value
100 // the number of supported fields
102 };
103
104 //# Constructors
105 // create a zero-th order (all-pass) Butterworth bandpass.
108
109 // create a Butterworth bandpass function.
111 T mincut=T(-1), T maxcut=T(1),
112 T center=T(0), T peak=T(1)) :
113 SimButterworthBandpass<T>(minord, maxord, mincut, maxcut,
114 center, peak),
116 {}
117
118 // create a fully specified Butterworth polynomial from parameters
119 // stored in a Record.
120 explicit MarshButterworthBandpass(const Record& gr)
122
123 // create a deep copy of another Butterworth polynomial
124 // <group>
129 // </group>
130
131 // make a (deep) copy of another Butterworth polynomial
132 // <group>
146 // </group>
147
148 // Destructor
150
151 // store the state of this Function into a Record
152 virtual void store(Record& gr) const;
153
154 // Create a copy of this object. The caller is responsible for
155 // deleting the pointer.
156 virtual Function<T> *clone() const {
157 return new MarshButterworthBandpass<T>(*this);
158 }
159};
160
161
162} //# NAMESPACE CASACORE - END
163
164#ifndef CASACORE_NO_AUTO_TEMPLATES
165#include <casacore/scimath/Functionals/MarshButterworthBandpass.tcc>
166#endif //# CASACORE_NO_AUTO_TEMPLATES
167#endif
virtual FunctionMarshallable & operator=(const FunctionMarshallable &other)
MarshButterworthBandpass(const MarshButterworthBandpass< T > &other)
MarshButterworthBandpass< T > & operator=(const SimButterworthBandpass< T > &other)
FieldNames
definitions of the fields stored in a serialized Record.
@ BPASS
the minimum cutoff, center, and maximum cutoff values
@ ORDER
the orders of the transitions between pass and no-pass
@ NFieldNames
the number of supported fields
virtual Function< T > * clone() const
Create a copy of this object.
virtual void store(Record &gr) const
store the state of this Function into a Record
MarshButterworthBandpass(const SimButterworthBandpass< T > &other)
create a deep copy of another Butterworth polynomial
MarshButterworthBandpass< T > & operator=(const MarshButterworthBandpass< T > &other)
make a (deep) copy of another Butterworth polynomial
MarshButterworthBandpass()
create a zero-th order (all-pass) Butterworth bandpass.
MarshButterworthBandpass(const Record &gr)
create a fully specified Butterworth polynomial from parameters stored in a Record.
MarshButterworthBandpass(uInt minord, uInt maxord, T mincut=T(-1), T maxcut=T(1), T center=T(0), T peak=T(1))
create a Butterworth bandpass function.
SimButterworthBandpass< T > & operator=(const SimButterworthBandpass< T > &other)
copy(deep) another Butterworth function
String: the storage and methods of handling collections of characters.
Definition String.h:223
this file contains all the compiler specific defines
Definition mainpage.dox:28
unsigned int uInt
Definition aipstype.h:49