Commit 8924690e authored by Martin Reinecke's avatar Martin Reinecke
Browse files

fixes

parent cd7dfa8c
......@@ -260,11 +260,11 @@
mask = np.full(s_space.shape, 1.)
mask[l:h] = 0
mask = ift.Field.from_global_data(s_space, mask)
R = ift.DiagonalOperator(mask)*HT
n = n.to_global_data()
n = n.to_global_data().copy()
n[l:h] = 0
n = ift.Field.from_global_data(s_space, n)
d = R(sh) + n
```
......@@ -299,11 +299,11 @@
# Get signal data and reconstruction data
s_data = s.to_global_data()
m_data = HT(m).to_global_data()
m_var_data = m_var.to_global_data()
uncertainty = np.sqrt(m_var_data)
d_data = d.to_global_data()
d_data = d.to_global_data().copy()
# Set lost data to NaN for proper plotting
d_data[d_data == 0] = np.nan
```
......@@ -360,11 +360,11 @@
mask = np.full(s_space.shape, 1.)
mask[l:h,l:h] = 0.
mask = ift.Field.from_global_data(s_space, mask)
R = ift.DiagonalOperator(mask)*HT
n = n.to_global_data()
n = n.to_global_data().copy()
n[l:h, l:h] = 0
n = ift.Field.from_global_data(s_space, n)
curv = Curvature(R=R, N=N, Sh=Sh)
D = curv.inverse
......
......@@ -93,12 +93,12 @@ if __name__ == '__main__':
for sample in samples:
sam = signal.at(sample + position).value
powers.append(A.at(sample+position).value)
avrg += sam
va += sam**2
avrg = avrg + sam
va = va + sam**2
avrg /= len(samples)
va /= len(samples)
va -= avrg**2
avrg = avrg /len(samples)
va = va / len(samples)
va = va - avrg**2
std = ift.sqrt(va)
ift.plot(avrg, name='avrg.pdf')
ift.plot(std, name='std.pdf')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment