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.