Closedown
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#Thu May 04 17:08:24 CEST 2017
|
||||
#Fri May 05 08:12:42 CEST 2017
|
||||
colormap=Flame
|
||||
colormapAutomatic=false
|
||||
colormapMax=500.0
|
||||
@@ -21,9 +21,9 @@ rotation=0.0
|
||||
rotationCrop=false
|
||||
scale=1.0
|
||||
serverURL=localhost\:10000
|
||||
spatialCalOffsetX=-1292.504909252311
|
||||
spatialCalOffsetY=-1062.4919313975568
|
||||
spatialCalScaleX=-8.699279809007425
|
||||
spatialCalScaleY=-8.85445509712251
|
||||
spatialCalOffsetX=-1057.4895329398094
|
||||
spatialCalOffsetY=-1420.5549062527236
|
||||
spatialCalScaleX=-8.510638153514359
|
||||
spatialCalScaleY=-8.235817137431614
|
||||
spatialCalUnits=mm
|
||||
transpose=false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#Thu May 04 17:08:13 CEST 2017
|
||||
defaultSpeed=6000.0
|
||||
#Thu May 04 18:12:02 CEST 2017
|
||||
defaultSpeed=282.842712474619
|
||||
estbilizationDelay=0
|
||||
hasEnable=false
|
||||
homingType=None
|
||||
|
||||
@@ -160,9 +160,8 @@ class WireScanner(WireScanInfo):
|
||||
self.wait_in_selection()
|
||||
|
||||
def wait_in_selection(self):
|
||||
#time.sleep(3.0)
|
||||
time.sleep(0.5) #Some time for the status change
|
||||
scanner.waitValue("At start", 60000)
|
||||
time.sleep(3.0)
|
||||
|
||||
def scan(self):
|
||||
self.cycles = self.nb_cycles.get()
|
||||
|
||||
@@ -162,11 +162,12 @@ finally:
|
||||
|
||||
for i in range (cycles):
|
||||
for j in range(len(blms)):
|
||||
bg = get_attributes("background/" + str(j+1))["Mean"]
|
||||
path = wire+"_" + ("%04d" % (i+1)) + "/blm" + str(j+1)
|
||||
d = load_data(path)
|
||||
d = blm_remove_spikes(d)
|
||||
if bkg_mean is not None:
|
||||
d = [v-bkg_mean for v in d]
|
||||
d = [v-bg for v in d]
|
||||
[com, rms] = profile_rms_stats(x, nor,noise_std=0, n_sigma=3.5)
|
||||
set_attribute(path, "RMS", rms)
|
||||
set_attribute(path, "RMS centroid", com)
|
||||
|
||||
@@ -22,7 +22,7 @@ def blm_remove_spikes(x):
|
||||
:param x: input array
|
||||
:return: output array
|
||||
"""
|
||||
|
||||
print "0"
|
||||
x = copy.copy(x)
|
||||
if x.size > 5: # Must have enough sample points
|
||||
d_x = x[1:] - x[:-1]
|
||||
@@ -37,16 +37,20 @@ def blm_remove_spikes(x):
|
||||
# 2 point spikes
|
||||
x[i+2] = (x[i:i+2].sum() + x[i+4])/3
|
||||
x[i+3] = (x[i+1] + x[i+4:i+6].sum())/3
|
||||
|
||||
print "A"
|
||||
# Handle edge points
|
||||
if d_x[-1] > 0.5 * maximum:
|
||||
print "B"
|
||||
x[-1] = x[-3:-1].sum() / 2
|
||||
|
||||
if d_x[-2] > 0.5 * maximum:
|
||||
print "C"
|
||||
x[-2] = (x[-1] + x[-4:-2].sum()) / 3
|
||||
if d_x[0] < -0.5 * maximum:
|
||||
print "D"
|
||||
x[0] = x[1:3].sum() / 2
|
||||
if d_x[1] < -0.5*maximum:
|
||||
print "E"
|
||||
x[1] = (x[0] + x[2:4].sum()) / 3
|
||||
return x
|
||||
|
||||
|
||||
Reference in New Issue
Block a user