source: trunk/src/Lorentzian1D.tcc@ 2136

Last change on this file since 2136 was 1819, checked in by Kana Sugimoto, 14 years ago

New Development: No

JIRA Issue: No (merge alma branch to trunk)

Ready for Test: Yes

Interface Changes: No

Test Programs: regressions may work

Module(s): all single dish modules

Description:

Merged all changes in alma (r1386:1818) and newfiller (r1774:1818) branch.


File size: 1.7 KB
Line 
1//# Lorentzian1D.cc: A one-dimensional Lorentzian class
2//# Copyright (C) 1994,1995,1996,1999,2001,2002
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//# $Id: Lorentzian1D.tcc 19879 2010-02-15 12:52:50Z Wataru.Kawasaki $
27
28//# Includes
29#include "Lorentzian1D.h"
30#include <casa/BasicMath/Math.h>
31
32namespace casa { //# NAMESPACE CASA - BEGIN
33
34//# Constructors
35
36//# Operators
37template<class T>
38T Lorentzian1D<T>::eval(typename Function1D<T>::FunctionArg x) const {
39 T value = (x[0] - param_p[CENTER])/param_p[WIDTH]/fwhm2int;
40 return param_p[HEIGHT] / (T(1.0) + value*value);
41}
42
43//# Member functions
44
45} //# NAMESPACE CASA - END
46
Note: See TracBrowser for help on using the repository browser.