casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CompiledSpectralElement.h
Go to the documentation of this file.
1 //# SpectralElement.h: Describes (a set of related) spectral lines
2 //# Copyright (C) 2001,2003,2004
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: aips2-request@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 //#
27 //# $Id: SpectralElement.h 20652 2009-07-06 05:04:32Z Malte.Marquarding $
28 
29 #ifndef COMPONENTS_COMPILEDSPECTRALELEMENT_H
30 #define COMPONENTS_COMPILEDSPECTRALELEMENT_H
31 
33 
34 namespace casa { //# NAMESPACE CASA - BEGIN
35 
36 // <summary>
37 // Describes a compiled function for describing a spectral profile
38 // </summary>
39 
40 // <use visibility=export>
41 
42 // <reviewed reviewer="" date="yyyy/mm/dd" tests="tSpectralFit" demos="">
43 // </reviewed>
44 
45 // <prerequisite>
46 // <li> <linkto module=SpectralElement>SpectralElement</linkto> module
47 // </prerequisite>
48 //
49 // <etymology>
50 // From compiled and spectral line and element
51 // </etymology>
52 //
53 // <synopsis>
54 // The CompiledSpectralElement class describes a compiled function for
55 // describing spectral profile.
56 // </synopsis>
57 //
58 // <example>
59 // </example>
60 //
61 // <motivation>
62 // To have a container for data describing a compiled function for
63 // describing a spectral profile for fitting to an observed spectrum
64 // </motivation>
65 
67 public:
68 
69  // Construct a compiled string
70  explicit CompiledSpectralElement(
71  const casacore::String& function, const casacore::Vector<casacore::Double>& param
72  );
73 
75 
76  virtual ~CompiledSpectralElement();
77 
78  SpectralElement* clone() const;
79 
81  const CompiledSpectralElement& other
82  );
83 
84  /*
85  casacore::Bool operator==(
86  const CompiledSpectralElement& other
87  ) const;
88 */
89  /*
90  // Evaluate the value of the element at x
91  virtual casacore::Double operator()(const casacore::Double x) const;
92 */
93 
94  // Get the string of a compiled functional
95  const casacore::String& getFunction() const;
96  // </group>
97 
98  // Save to a record.
100 
101 protected:
102 
104 
105  // For subclasses. Parameters and function must be set after construction.
106  explicit CompiledSpectralElement(
108  );
109 
112  );
113 
114  virtual void _setFunction(const casacore::String& function);
115 
116  /*
117 private:
118  // The string value for compiled functional
119  casacore::String _function;
120  */
121 };
122 
123 
124 //# Global functions
125 // <summary> Global functions </summary>
126 // <group name=Output>
127 // Output declaration
128 std::ostream &operator<<(std::ostream &os, const CompiledSpectralElement &elem);
129 // </group>
130 
131 
132 } //# NAMESPACE CASA - END
133 
134 #endif
135 
ostream & operator<<(ostream &os, const PageHeaderCache &cache)
virtual Type type()
Return the type enum.
SpectralElement * clone() const
CompiledSpectralElement(const casacore::String &function, const casacore::Vector< casacore::Double > &param)
Construct a compiled string.
*const casacore::String & getFunction() const
Get the string of a compiled functional.
Describes (a set of related) spectral lines.
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Describes a compiled function for describing a spectral profile.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Types
Supported spectral components.
Abstract base class for Record classes.
void _setFunction(const std::shared_ptr< casacore::Function< casacore::Double, casacore::Double > > &f)
virtual casacore::Bool toRecord(casacore::RecordInterface &out) const
Save to a record.
CompiledSpectralElement & operator=(const CompiledSpectralElement &other)
unsigned int uInt
Definition: aipstype.h:51
CompiledSpectralElement()