fixed problem in the noise cut

This commit is contained in:
2024-04-29 13:55:54 +02:00
parent b43d4bff15
commit 33d387aac2
2 changed files with 36 additions and 11 deletions

View File

@@ -26,6 +26,7 @@ indmax=0
im=None
h3d=None
h3d1=None
@@ -41,8 +42,7 @@ for i in range(indmin,indmax+1):
print(ff)
r = cr.ClusterFileReader(ff)
#im, bins=cf.color_images(r, emin, emax, nbins, xmin, xmax, ymin, ymax, im, csize, gain)
h3d=cf.color_images_bh(r, emin, emax, nbins, xmin, xmax, ymin, ymax, h3d, csize, gain, 3*noisemap)
h3d=cf.color_images_bh(r, emin, emax, nbins, xmin, xmax, ymin, ymax, h3d, csize, gain, 2*noisemap)
@@ -50,11 +50,36 @@ im,xx,yy,ee=h3d.to_numpy()
sp=np.sum(im,axis=(0,1))
#fig, ax = plt.subplots()
#ax.plot(ee[:-1],sp)
#ax.plot(bins[2][:-1],sp)
##ax.set_yscale('log')
#fig.show()
cu=np.sum(im,axis=2)
#cf.plot_colz(cu)
for i in range(indmin,indmax+1):
#ff=fname
ff=fname.format(str(i))
print(ff)
r = cr.ClusterFileReader(ff)
h3d1=cf.color_images_bh(r, emin, emax, nbins, xmin, xmax, ymin, ymax, h3d1, csize, gain, None)
im,xx,yy,ee=h3d1.to_numpy()
sp1=np.sum(im,axis=(0,1))
fig, ax = plt.subplots()
ax.plot(ee[:-1],sp)
ax.plot(ee[:-1],sp1-sp)
#ax.plot(bins[2][:-1],sp)
##ax.set_yscale('log')
fig.show()
cu=np.sum(im,axis=2)
cf.plot_colz(cu)
cu1=np.sum(im,axis=2)
cf.plot_colz(cu1-cu)