source: branches/casa-release-4_3-test/external-alma/components/SpectralComponents/LogTransformedPolynomialSpectralElement.h@ 3027

Last change on this file since 3027 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.8 KB
Line 
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_LOGTRANSFORMEDPOLYNOMIALSPECTRALELEMENT_H
30#define COMPONENTS_LOGTRANSFORMEDPOLYNOMIALSPECTRALELEMENT_H
31
32#include <components/SpectralComponents/PolynomialSpectralElement.h>
33
34namespace casa { //# NAMESPACE CASA - BEGIN
35
36// <summary>
37// Describes the often used for determining spectral index plus higher order terms:
38// y = log (S_x) = ln(c_0) + c_1*ln(x) + c_2*ln(x)**2 + c_3*ln(x)**3 + ...
39// where c_1 is the traditional spectral index (alpha).
40// </summary>
41
42// <use visibility=export>
43
44// <reviewed reviewer="" date="yyyy/mm/dd" tests="tSpectralFit" demos="">
45// </reviewed>
46
47// <prerequisite>
48// <li> <linkto class=SpectralElement>SpectralElement</linkto> module
49// </prerequisite>
50//
51// <etymology>
52// From power law, logarithm, and polynomial and spectral line and element
53// </etymology>
54//
55// <synopsis>
56// Describes a function that can be used to fit for spectral index and higher order terms.
57// The implementation simply subclasses PolynomialSpectralElement since that's all this function
58// really is, whicht the exception the the lhs is ln(y) not y. This means it's the fitter
59// configurator's responsibility to pass in the ln of the actual ordinate values and the ln
60// of the abscissa values, not the ordinate and abscissa values themselves. Essentially, this
61// class differs from PolynomialSpectralElement in its type and its stream operator.
62
63// </synopsis>
64//
65// <example>
66// </example>
67//
68// <motivation>
69// To have a spectral element representing a spectral index function.
70// </motivation>
71
72
73class LogTransformedPolynomialSpectralElement: public PolynomialSpectralElement {
74public:
75
76 // Constructor. The n coefficients c_i to be solved for are
77 // c_0 + c_1 * ln(x) + c_2 * ln(x)**2 + c_3 * ln(x)**3 + ... c_(n-1)*ln(x)**(n-1)
78 // where x = nu/nu0. <src> order</src> is the polynomial, so the actual
79 // function will have order+1 coefficients
80 explicit LogTransformedPolynomialSpectralElement(uInt order);
81
82 // Construct with the given parameters. See above constructor for
83 // order in which the parameters should be supplied.
84 LogTransformedPolynomialSpectralElement(const Vector<Double> &param);
85
86 // Copy constructor (deep copy)
87 LogTransformedPolynomialSpectralElement(const LogTransformedPolynomialSpectralElement &other);
88
89 ~LogTransformedPolynomialSpectralElement();
90
91 LogTransformedPolynomialSpectralElement &operator=(
92 const LogTransformedPolynomialSpectralElement& other
93 );
94
95 SpectralElement* clone() const;
96};
97ostream &operator<<(
98 ostream &os, const LogTransformedPolynomialSpectralElement &elem
99);
100
101
102} //# NAMESPACE CASA - END
103
104#endif
105
Note: See TracBrowser for help on using the repository browser.