Page History
...
Test Data
Looking at det.raw(eatevt) it appears inter inner panels for xcs1008621 run 340 are in fixed-low-gain mode and outer panels are in fixed-high-gain mode:
The first few events:
Test Script And Results
I believe the Shannon-entropy is the number of bits of information in each 16-bit word, so we only see a 10% improvement in the compressibility of the data with this approach. Feels like there is quite a bit of entropy in the "noise" of the image even if they appear visually similar.
Code Block | ||
---|---|---|
| ||
from psana import *
import numpy as np
import matplotlib.pyplot as plt
from skimage.measure import shannon_entropy
import gzip
ds = DataSource('exp=xcsl1008621:run=340')
det = Detector('epix10k2M')
ref=None
for nevt,evt in enumerate(ds.events()):
raw = (det.raw(evt).astype(np.int32))&0xbfff # eliminate gain bit
img = det.image(evt)
img_med = np.median(img[612:680,663:726]) # a "normalization area" in the water-ring
if ref is None:
ref = raw
ref_med = img_med
residuals = (raw-(img_med/ref_med)*ref).astype(np.int16)
f = open('junk%d.dat'%nevt,'w')
residuals.tofile(f)
f.close()
#plt.hist(residuals.flatten(),bins=1000)
#plt.show()
print(shannon_entropy(residuals),shannon_entropy(det.raw(evt))
if nevt==4: break |
...
Overview
Content Tools