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_POWERLOGPOLYNOMIALSPECTRALELEMENT_H 00030 #define COMPONENTS_POWERLOGPOLYNOMIALSPECTRALELEMENT_H 00031 00032 #include <components/SpectralComponents/CompiledSpectralElement.h> 00033 00034 namespace casa { //# NAMESPACE CASA - BEGIN 00035 00036 // <summary> 00037 // Describes the function most often used for determining spectral index plus higher order terms: 00038 // y = c_0 * x**( c_1 + c_2*ln(x) + c_3*ln(x)**2 + ... ) 00039 // where c_1 is the traditional spectral index (alpha). 00040 // </summary> 00041 00042 // <use visibility=export> 00043 00044 // <reviewed reviewer="" date="yyyy/mm/dd" tests="tSpectralFit" demos=""> 00045 // </reviewed> 00046 00047 // <prerequisite> 00048 // <li> <linkto module=SpectralElement>SpectralElement</linkto> module 00049 // </prerequisite> 00050 // 00051 // <etymology> 00052 // From power law, logarithm, and polynomial and spectral line and element 00053 // </etymology> 00054 // 00055 // <synopsis> 00056 // Describes a function that can be used to fit for spectral index and higher order terms 00057 00058 // </synopsis> 00059 // 00060 // <example> 00061 // </example> 00062 // 00063 // <motivation> 00064 // To have a spectral element representing a spectral index function. 00065 // </motivation> 00066 00067 00068 class PowerLogPolynomialSpectralElement: public SpectralElement { 00069 public: 00070 00071 /* 00072 // Constructor. The n coefficients c_i to be solved for are 00073 // c_0 * nu**(c_1 + c_2*log(x) + c_3*log(x)**2 + ... + c_(n-1)*log(x)**(n - 2)) 00074 explicit PowerLogPolynomialSpectralElement(uInt n); 00075 */ 00076 // Construct with the given parameters. See above constructor for order in which the parameters should 00077 // be supplied. 00078 PowerLogPolynomialSpectralElement(const Vector<Double> ¶m); 00079 00080 // Copy constructor (deep copy) 00081 PowerLogPolynomialSpectralElement(const PowerLogPolynomialSpectralElement &other); 00082 00083 ~PowerLogPolynomialSpectralElement(); 00084 00085 PowerLogPolynomialSpectralElement &operator=( 00086 const PowerLogPolynomialSpectralElement& other 00087 ); 00088 00089 SpectralElement* clone() const; 00090 /* 00091 private: 00092 void _makeFunction(); 00093 */ 00094 }; 00095 00096 ostream &operator<<(ostream& os, const PowerLogPolynomialSpectralElement& elem); 00097 00098 00099 } //# NAMESPACE CASA - END 00100 00101 #endif 00102