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 // Useless constructor for anythong but allocating memory in a Vector etc 00070 PolynomialSpectralElement(); 00071 00072 00073 // Construct an n-degree polynomial 00074 explicit PolynomialSpectralElement(const uInt n); 00075 00076 // Construct the given tp with the given param 00077 // <thrown> 00078 // <li> AipsError if incorrect number of parameters (e.g. not 3 for GAUSSIAN) 00079 // <li> AipsError if sigma == 0.0 00080 // </thrown> 00081 PolynomialSpectralElement(const Vector<Double> ¶m); 00082 // Copy constructor (deep copy) 00083 // <thrown> 00084 // <li> AipsError if sigma == 0.0 00085 // </thrown> 00086 PolynomialSpectralElement(const PolynomialSpectralElement &other); 00087 00088 ~PolynomialSpectralElement(); 00089 00090 SpectralElement* clone() const; 00091 00092 // Get the degree of polynomial 00093 uInt getDegree() const; 00094 00095 }; 00096 00097 //# Global functions 00098 // <summary> Global functions </summary> 00099 // <group name=Output> 00100 // Output declaration 00101 ostream &operator<<(ostream &os, const PolynomialSpectralElement &elem); 00102 // </group> 00103 00104 00105 } //# NAMESPACE CASA - END 00106 00107 #endif 00108