source: branches/alma/src/Lorentzian1D.tcc@ 1702

Last change on this file since 1702 was 1700, checked in by WataruKawasaki, 15 years ago

New Development: Yes

JIRA Issue: Yes (CAS-1800 + CAS-1807)

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: added parameters fitfunc for sdfit and clip, clipmaxmin, clipoutside for sdflag

Test Programs:

Put in Release Notes: No

Module(s): sdfit, sdflag

Description: Added a parameter for enabling Lorentzian line fitting with sdfit, and parameters for y-axis clipping with sdflag. Also 4 files for Lorentzian function class are (Lorentzian1D*) added.


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.