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_"
|
||||
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
|
||||
xmax=xmin+40
|
||||
ymin=161+20
|
||||
@ -25,22 +24,6 @@ indmin=1
|
||||
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
|
||||
|
||||
|
||||
@ -52,8 +35,8 @@ ietax=None
|
||||
ietay=None
|
||||
|
||||
for i in range(indmin,indmax+1):
|
||||
ff=fname
|
||||
#ff=fnameff+str(i)+".clust"
|
||||
#ff=fname
|
||||
ff=fnameff+str(i)+".clust"
|
||||
print(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)
|
||||
@ -69,10 +52,10 @@ intim=None
|
||||
etas=None
|
||||
sp=None
|
||||
|
||||
#for i in range(1,21):
|
||||
|
||||
for i in range(indmin,indmax+1):
|
||||
ff=fname
|
||||
#ff=fname+str(i)+".clust"
|
||||
#ff=fname
|
||||
ff=fname+str(i)+".clust"
|
||||
print(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)
|
||||
@ -83,15 +66,14 @@ imff=None
|
||||
intimff=None
|
||||
etasff=None
|
||||
spff=None
|
||||
"""
|
||||
|
||||
for i in range(1,21):
|
||||
for i in range(indmin,indmax):
|
||||
ff=fnameff+str(i)+".clust"
|
||||
print(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)
|
||||
|
||||
"""
|
||||
|
||||
|
||||
|
||||
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.show()
|
||||
"""
|
||||
cf.plot_colz(im)#/imff,1.1)
|
||||
cf.plot_colz(intim)#/intimff,1.1)
|
||||
cf.plot_colz(im/imff,1.1)
|
||||
cf.plot_colz(intim/intimff,1.1)
|
||||
|
||||
cf.plot_colz(etas,np.max(etas))
|
||||
cf.plot_colz(ietax,1.1)
|
||||
|
Reference in New Issue
Block a user