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