Script execution
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
root = "2017/05/04/20170504_182411_WireScan.h5|/"
|
||||
wire = "x"
|
||||
blms = ["",""]
|
||||
cycles = 3
|
||||
|
||||
|
||||
|
||||
for i in range (cycles):
|
||||
for j in range(len(blms)):
|
||||
path_back = root + "background/blm" + str(j+1)
|
||||
bg = get_attributes(path_back)["Mean"]
|
||||
path = root + wire+"_" + ("%04d" % (i+1)) + "/blm" + str(j+1)
|
||||
d = load_data(path)
|
||||
print "d=", d
|
||||
d = blm_remove_spikes(d)
|
||||
if bkg_mean is not None:
|
||||
d = [v-bg for v in d]
|
||||
[com, rms] = profile_rms_stats(x, nor,noise_std=0, n_sigma=3.5)
|
||||
for i in range(len(blms)):
|
||||
path_back = root + "background/blm" + str(i+1)
|
||||
bg = get_attributes(path_back)["Mean"]
|
||||
for cycle in range (cycles):
|
||||
pos = load_data(root + wire+"_" + ("%04d" % (cycle+1)) + "/w_pos")
|
||||
sig = load_data(root + wire+"_" + ("%04d" % (cycle+1)) + "/blm" + str(j+1))
|
||||
sig = blm_remove_spikes(sig)
|
||||
if bg is not None:
|
||||
sig = [v-bg for v in sig]
|
||||
[com, rms] = profile_rms_stats(pos, sig,noise_std=0, n_sigma=3.5)
|
||||
#set_attribute(path, "RMS", rms)
|
||||
#set_attribute(path, "RMS centroid", com)
|
||||
print i, j, [com, rms]
|
||||
[off, amp, com, sigma] = profile_gauss_stats(x, nor, off=None, amp=None, com=None, sigma=None)
|
||||
[off, amp, com, sigma] = profile_gauss_stats(pos, sig, off=None, amp=None, com=None, sigma=None)
|
||||
#set_attribute(path, "Gauss COM", com)
|
||||
#set_attribute(path, "Gauss Sigma", sigma)
|
||||
print i, j, [off, amp, com, sigma]
|
||||
|
||||
Reference in New Issue
Block a user