source: trunk/external-alma/components/SpectralComponents/CompiledSpectralElement.h@ 3087

Last change on this file since 3087 was 2980, checked in by Malte Marquarding, 10 years ago

Add a copy of casacore/components/SpectralComponents to external-alma directory to prepare for its removal from casacore-trunk. DOn;t activate in SConscript yet.

File size: 3.6 KB
RevLine 
[2980]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: CompiledSpectralElement.h 21451 2014-06-10 07:48:08Z gervandiepen $
28
29#ifndef COMPONENTS_COMPILEDSPECTRALELEMENT_H
30#define COMPONENTS_COMPILEDSPECTRALELEMENT_H
31
32#include <components/SpectralComponents/SpectralElement.h>
33
34namespace 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 class=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
66class CompiledSpectralElement: public SpectralElement {
67public:
68
69 // Construct a compiled string
70 explicit CompiledSpectralElement(
71 const String& function, const Vector<Double>& param
72 );
73
74 CompiledSpectralElement(const CompiledSpectralElement& other);
75
76 virtual ~CompiledSpectralElement();
77
78 SpectralElement* clone() const;
79
80 CompiledSpectralElement &operator=(
81 const CompiledSpectralElement& other
82 );
83
84 /*
85 Bool operator==(
86 const CompiledSpectralElement& other
87 ) const;
88*/
89 /*
90 // Evaluate the value of the element at x
91 virtual Double operator()(const Double x) const;
92*/
93
94 // Get the string of a compiled functional
95 const String& getFunction() const;
96 // </group>
97
98 // Save to a record.
99 virtual Bool toRecord(RecordInterface& out) const;
100
101protected:
102
103 CompiledSpectralElement();
104
105 // For subclasses. Parameters and function must be set after construction.
106 explicit CompiledSpectralElement(
107 SpectralElement::Types type, const Vector<Double>& param=Vector<Double>(0)
108 );
109
110 CompiledSpectralElement(
111 SpectralElement::Types type, uInt nParam
112 );
113
114 virtual void _setFunction(const String& function);
115
116 /*
117private:
118 // The string value for compiled functional
119 String _function;
120 */
121};
122
123
124//# Global functions
125// <summary> Global functions </summary>
126// <group name=Output>
127// Output declaration
128ostream &operator<<(ostream &os, const CompiledSpectralElement &elem);
129// </group>
130
131
132} //# NAMESPACE CASA - END
133
134#endif
135
Note: See TracBrowser for help on using the repository browser.