Page History
...
The mask created by this algorithm includes, along with the pixels above the threshold, their neighbors. The statistics will be poorer because there will be less pixels used in the common mode, but possible leakage from the pixels containing photons will not be included. The parameters are:
- img - image on which the common mode is applied
- rms - array of noise values for each pixel with same shape as img
maxCorr - (default = 30) maximum correction applied. If common mode correction is larger than this value, no correction will be applied
- histoRange - (default = 30) all pixels above this parameter are masked
colrow - (default = 3) decides what is corrected. If 1, only the columns are corrected. If 2, only the rows are corrected. And if 3, both are corrected
minFrac - (default = 0.25) the minimum fraction of pixels required to be left in a row or column after applying the mask and rejecting high pixels and their neighbors
normAll - (default = False) if true, will subtract the mean from the full image with the masked applied
Below is an example block of code showing how to call this algorithm and pass it arguments for some dataset and detector.
Code Block |
---|
for nevent, evt in enumerate(ds.events()):
if nevent == 10:
break
# cmpars = [6] because this is the 6th common mode algorithm and it must be in a list format
# Add arguments on as seen fit
nda = det.calib(evt, cmpars = [6], rms = det.rms(evt), maxCorr = 25) |
Test of the common mode correction for pnCCD
...