casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
tw_func.py
Go to the documentation of this file.
00001 import pylab as pl
00002 #from Scientific.Functions.LeastSquares import *
00003 #note that 'import math' && 'from math import *' don't work
00004 
00005 def gauss(param,x):
00006  return param[0]+param[1]*pl.exp(-param[2]*(x-param[3])**2)
00007 
00008 def gauss3d(param,data):
00009  return param[0]+param[1]*pl.exp(-param[2]*(data[0]-param[3])**2-param[4]*(data[1]-param[5])**2)
00010 
00011 #param[0]=z0
00012 #param[1]=amplitude
00013 #param[2]=cx, a constant multiplier
00014 #param[3]=x0, position of x peak
00015 #param[4]=cy, a constant multiplier
00016 #param[5]=y0, position of y peak
00017 #data[0]=x variable
00018 #data[1]=y variable