nice example to read cluster files, apply cuts and interpolate added
This commit is contained in:
parent
8473f4d86a
commit
9bae601e95
@ -8,7 +8,6 @@ import clustersFunctions as cf
|
|||||||
|
|
||||||
fname = "/mnt/myData/230914_30s_star_100um_nofi/star_"
|
fname = "/mnt/myData/230914_30s_star_100um_nofi/star_"
|
||||||
fnameff = "/mnt/myData/230914_30s_flat_100um_nofi/flat_"
|
fnameff = "/mnt/myData/230914_30s_flat_100um_nofi/flat_"
|
||||||
fname = "/mnt/jungfrau_data1/POLLUX20230815/clust_5Sigma/clust_mountain/Position2_500eV_W17_300V_-40deg_Xrays_d0_f22_1.clust"
|
|
||||||
xmin=161+20
|
xmin=161+20
|
||||||
xmax=xmin+40
|
xmax=xmin+40
|
||||||
ymin=161+20
|
ymin=161+20
|
||||||
@ -25,22 +24,6 @@ indmin=1
|
|||||||
indmax=20
|
indmax=20
|
||||||
|
|
||||||
|
|
||||||
fname="/mnt/moench_data/tests20231005/sample_20kV_2mA_d0_f0_0.clust"
|
|
||||||
|
|
||||||
ymin=0
|
|
||||||
ymax=400
|
|
||||||
xmin=0
|
|
||||||
xmax=400
|
|
||||||
emin=0
|
|
||||||
emax=50
|
|
||||||
ecutmin=0
|
|
||||||
ecutmax=50
|
|
||||||
gain=150
|
|
||||||
indmin=0
|
|
||||||
indmax=0
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
subpix=5
|
subpix=5
|
||||||
|
|
||||||
|
|
||||||
@ -52,8 +35,8 @@ ietax=None
|
|||||||
ietay=None
|
ietay=None
|
||||||
|
|
||||||
for i in range(indmin,indmax+1):
|
for i in range(indmin,indmax+1):
|
||||||
ff=fname
|
#ff=fname
|
||||||
#ff=fnameff+str(i)+".clust"
|
ff=fnameff+str(i)+".clust"
|
||||||
print(ff)
|
print(ff)
|
||||||
r = cr.ClusterFileReader(ff)
|
r = cr.ClusterFileReader(ff)
|
||||||
im, sp, ebins, etas, etabinsx, etabinsy=cf.analyze_clusters(r, emin, emax, ecutmin, ecutmax, xmin, xmax, ymin, ymax, ietax, ietay, im, sp, etas, intim,csize, gain, nbins, etabins)
|
im, sp, ebins, etas, etabinsx, etabinsy=cf.analyze_clusters(r, emin, emax, ecutmin, ecutmax, xmin, xmax, ymin, ymax, ietax, ietay, im, sp, etas, intim,csize, gain, nbins, etabins)
|
||||||
@ -69,10 +52,10 @@ intim=None
|
|||||||
etas=None
|
etas=None
|
||||||
sp=None
|
sp=None
|
||||||
|
|
||||||
#for i in range(1,21):
|
|
||||||
for i in range(indmin,indmax+1):
|
for i in range(indmin,indmax+1):
|
||||||
ff=fname
|
#ff=fname
|
||||||
#ff=fname+str(i)+".clust"
|
ff=fname+str(i)+".clust"
|
||||||
print(ff)
|
print(ff)
|
||||||
r = cr.ClusterFileReader(ff)
|
r = cr.ClusterFileReader(ff)
|
||||||
im, intim, sp, ebins, etas, etabinsx, etabinsy=cf.analyze_clusters(r, emin, emax, ecutmin, ecutmax, xmin, xmax, ymin, ymax, ietax, ietay, im, sp, etas, intim, csize, gain, nbins, etabins, subpix)
|
im, intim, sp, ebins, etas, etabinsx, etabinsy=cf.analyze_clusters(r, emin, emax, ecutmin, ecutmax, xmin, xmax, ymin, ymax, ietax, ietay, im, sp, etas, intim, csize, gain, nbins, etabins, subpix)
|
||||||
@ -83,15 +66,14 @@ imff=None
|
|||||||
intimff=None
|
intimff=None
|
||||||
etasff=None
|
etasff=None
|
||||||
spff=None
|
spff=None
|
||||||
"""
|
|
||||||
|
|
||||||
for i in range(1,21):
|
for i in range(indmin,indmax):
|
||||||
ff=fnameff+str(i)+".clust"
|
ff=fnameff+str(i)+".clust"
|
||||||
print(ff)
|
print(ff)
|
||||||
r = cr.ClusterFileReader(ff)
|
r = cr.ClusterFileReader(ff)
|
||||||
imff, intimff, spff, ebins, etasff, etabinsx, etabinsy=cf.analyze_clusters(r, emin, emax, ecutmin, ecutmax, xmin, xmax, ymin, ymax,ietax, ietay, imff, spff, etasff, intimff, csize, gain, nbins, etabins, subpix)
|
imff, intimff, spff, ebins, etasff, etabinsx, etabinsy=cf.analyze_clusters(r, emin, emax, ecutmin, ecutmax, xmin, xmax, ymin, ymax,ietax, ietay, imff, spff, etasff, intimff, csize, gain, nbins, etabins, subpix)
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
|
|
||||||
fig, ax = plt.subplots()
|
fig, ax = plt.subplots()
|
||||||
@ -104,8 +86,8 @@ vv=axs1.imshow(intim/intimff,vmax=1.,origin='upper',cmap=plt.cm.jet)
|
|||||||
fig1.colorbar(vv, ax=axs1)
|
fig1.colorbar(vv, ax=axs1)
|
||||||
fig1.show()
|
fig1.show()
|
||||||
"""
|
"""
|
||||||
cf.plot_colz(im)#/imff,1.1)
|
cf.plot_colz(im/imff,1.1)
|
||||||
cf.plot_colz(intim)#/intimff,1.1)
|
cf.plot_colz(intim/intimff,1.1)
|
||||||
|
|
||||||
cf.plot_colz(etas,np.max(etas))
|
cf.plot_colz(etas,np.max(etas))
|
||||||
cf.plot_colz(ietax,1.1)
|
cf.plot_colz(ietax,1.1)
|
||||||
|
Reference in New Issue
Block a user