Closedown

This commit is contained in:
sfop
2016-05-27 17:14:32 +02:00
parent efd39c9049
commit 4c43a85019
3 changed files with 0 additions and 46 deletions

View File

@@ -1 +0,0 @@
lscan(SINSB01_phase, BC1_energy, 0.0, 360.0, 10.0, 2.0)

View File

@@ -1,38 +0,0 @@
###################################################################################################
# Multiple Gaussians peak search with mathutils.py
###################################################################################################
from mathutils import estimate_peak_indexes, fit_gaussians, create_fit_point_list
start = 0
end = 50
step_size = 0.2
result= lscan(ao1,ai1,start,end,[step_size,])
readable = result.getReadable(0)
positions = result.getPositions(0)
threshold = (min(readable) + max(readable))/2
min_peak_distance = 5.0
peaks = estimate_peak_indexes(readable, positions, threshold, min_peak_distance)
print "Peak indexes: " + str(peaks)
print "Peak x: " + str(map(lambda x:positions[x], peaks))
print "Peak y: " + str(map(lambda x:readable[x], peaks))
gaussians = fit_gaussians(readable, positions, peaks)
plots = plot([readable],["sin"],[positions], title="Data" )
for i in range(len(peaks)):
peak = peaks[i]
(norm, mean, sigma) = gaussians[i]
if abs(mean - positions[peak]) < min_peak_distance:
print "Peak -> " + str(mean)
plots[0].addMarker(mean, None, "N="+str(round(norm,2)), None)
else:
print "Invalid gaussian fit: " + str(mean)

View File

@@ -1,7 +0,0 @@
res = lscan(SINSB01_phase, BC1_energy, -90, 90, 21, latency = 1.0, relative = True)
y = res.getReadable(0)
x = res.getPositions(0)
fit(y, x)