Revert "Make input parameters explicit"

This reverts commit 56d33c6165bbf56f8ad889cffe43e4f4fd1a7240.
This commit is contained in:
usov_i 2020-04-22 16:44:20 +02:00
parent 56d33c6165
commit 9e82d8f202

View File

@ -340,25 +340,23 @@ def ang2hkl(wave, ddist, gammad, om, ch, ph, nud, ub, x, y):
return hkl
def gauss(x, A, mu, sigma):
def gauss(x, *p):
"""Defines Gaussian function
Args:
A - amplitude
mu - position of the center
sigma - width
A - amplitude, mu - position of the center, sigma - width
Returns:
Gaussian function
"""
A, mu, sigma = p
return A*np.exp(-(x-mu)**2/(2.*sigma**2))
def box_int(file,i0,j0,iN,jN,fr0,frN):
def box_int(file,box):
"""Calculates center of the peak in the NB-geometry angles and Intensity of the peak
Args:
file name
box coordinates - i0,j0,iN,jN,fr0,frN
file name, box size [x_min:x_max, y_min:y_max, frame_min:frame_max]
Returns:
gamma, omPeak, nu polar angles, Int and data for 3 fit plots
@ -371,7 +369,14 @@ def box_int(file,i0,j0,iN,jN,fr0,frN):
nuC=dat["tlt_angle"][0]
ddist=dat["ddist"]
# defining ranges
# defining indices
i0=box[0]
iN=box[2]
j0=box[1]
jN=box[3]
fr0=box[4]
frN=box[5]
iX=iN-i0
jY=jN-j0
nF=frN-fr0