First one needs to make a fake pedestal from a fixed-gain file. This can be done for e.g. run 666 using
python CalcNoiseAndMean.py -r 666 --skipNevents 1000
This creates
CalcNoiseAndMean_mean_r666_step0.npy
which has the shape of an epixHR frame and can be subtracted as a pedestal. The point of skipping N events is to get to a more T-settled period so adjust 1000 as needed.
One can look at test pixels vs timestamp and as a 1d histogram using e.g.
python EventScanParallelSlice.py -r 777 --fakePedestal CalcNoiseAndMean_mean_r666_step0.npy --special regionCommonMode
and
python EventScanParallelSlice.py -r 777 -f ../scan/EventScanParallel_c0_r777_n1.h5 -L cm
One can run the clustering by doing
python SimpleClustersParallelSlice.py -r 777 --fakePedestal CalcNoiseAndMean_mean_r666_step0.npy --special regionCommonMode,FH
and
python SimpleClustersParallelSlice.py -r 777 -f ../lowFlux/SimpleClustersParallel_c0_r777_n1.h5 -L cm
Or do the usual equivalent with sbatch if you don't want to wait forever.
This makes per-pixel gain histograms with fits and plots all the slice pixel gains (peaks). It also makes a histogram of all slice pixels energy across the run before clustering.