casa
$Rev:20696$
|
00001 //# SpectralElement.h: Describes (a set of related) spectral lines 00002 //# Copyright (C) 2001,2003,2004 00003 //# Associated Universities, Inc. Washington DC, USA. 00004 //# 00005 //# This library is free software; you can redistribute it and/or modify it 00006 //# under the terms of the GNU Library General Public License as published by 00007 //# the Free Software Foundation; either version 2 of the License, or (at your 00008 //# option) any later version. 00009 //# 00010 //# This library is distributed in the hope that it will be useful, but WITHOUT 00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 //# License for more details. 00014 //# 00015 //# You should have received a copy of the GNU Library General Public License 00016 //# along with this library; if not, write to the Free Software Foundation, 00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA. 00018 //# 00019 //# Correspondence concerning AIPS++ should be addressed as follows: 00020 //# Internet email: aips2-request@nrao.edu. 00021 //# Postal address: AIPS++ Project Office 00022 //# National Radio Astronomy Observatory 00023 //# 520 Edgemont Road 00024 //# Charlottesville, VA 22903-2475 USA 00025 //# 00026 //# 00027 //# $Id: SpectralElement.h 20652 2009-07-06 05:04:32Z Malte.Marquarding $ 00028 00029 #ifndef COMPONENTS_POLYNOMIALSPECTRALELEMENT_H 00030 #define COMPONENTS_POLYNOMIALSPECTRALELEMENT_H 00031 00032 #include <components/SpectralComponents/SpectralElement.h> 00033 00034 namespace casa { //# NAMESPACE CASA - BEGIN 00035 00036 // <summary> 00037 // Describes a polynomial spectral profile 00038 // </summary> 00039 00040 // <use visibility=export> 00041 00042 // <reviewed reviewer="" date="yyyy/mm/dd" tests="tSpectralFit" demos=""> 00043 // </reviewed> 00044 00045 // <prerequisite> 00046 // <li> <linkto module=SpectralElement>SpectralElement</linkto> module 00047 // </prerequisite> 00048 // 00049 // <etymology> 00050 // From polynomial and spectral line and element 00051 // </etymology> 00052 // 00053 // <synopsis> 00054 // The PolynomialSpectralElement class describes a polynomial spectral profile. 00055 00056 // </synopsis> 00057 // 00058 // <example> 00059 // </example> 00060 // 00061 // <motivation> 00062 // To have a container for data describing a polynomial spectral profile for fitting to an observed spectrum 00063 // </motivation> 00064 00065 00066 class PolynomialSpectralElement: public SpectralElement { 00067 public: 00068 00069 // Construct an n-degree polynomial 00070 explicit PolynomialSpectralElement(const uInt n); 00071 00072 // Construct the given tp with the given param 00073 // <thrown> 00074 // <li> AipsError if incorrect number of parameters (e.g. not 3 for GAUSSIAN) 00075 // <li> AipsError if sigma == 0.0 00076 // </thrown> 00077 PolynomialSpectralElement(const Vector<Double> ¶m); 00078 // Copy constructor (deep copy) 00079 // <thrown> 00080 // <li> AipsError if sigma == 0.0 00081 // </thrown> 00082 PolynomialSpectralElement(const PolynomialSpectralElement &other); 00083 00084 ~PolynomialSpectralElement(); 00085 00086 SpectralElement* clone() const; 00087 00088 PolynomialSpectralElement &operator=(const PolynomialSpectralElement& other); 00089 00090 // Evaluate the value of the element at x 00091 Double operator()(const Double x) const; 00092 00093 // Get the degree of polynomial 00094 uInt getDegree() const; 00095 00096 }; 00097 00098 //# Global functions 00099 // <summary> Global functions </summary> 00100 // <group name=Output> 00101 // Output declaration 00102 ostream &operator<<(ostream &os, const SpectralElement &elem); 00103 // </group> 00104 00105 00106 } //# NAMESPACE CASA - END 00107 00108 #endif 00109