25 lines
984 B
Python
25 lines
984 B
Python
root = "2017/05/04/20170504_182411_WireScan.h5|/"
|
|
wire = "x"
|
|
blms = ["",""]
|
|
|
|
|
|
|
|
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)
|
|
#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)
|
|
#set_attribute(path, "Gauss COM", com)
|
|
#set_attribute(path, "Gauss Sigma", sigma)
|
|
print i, j, [off, amp, com, sigma]
|