Looking a tithe code in getImage_jit, I think this can be sped up by testing if a position is >0. This will avoid testing if an array element is inside the ROI box when we know its not an electron strike and instead a part of the zero padding.
|
t1 = rows[ii, jj, kk] > left |
Solution to test:
Add if rows[ii, jj, kk] > 0: at the line above. No need to test cols since that will always be zero if rows is zero.
Looking a tithe code in
getImage_jit, I think this can be sped up by testing if a position is>0. This will avoid testing if an array element is inside the ROI box when we know its not an electron strike and instead a part of the zero padding.DuSC_explorer/DuSC_explorer/__init__.py
Line 836 in abd9048
Solution to test:
Add
if rows[ii, jj, kk] > 0:at the line above. No need to testcolssince that will always be zero ifrowsis zero.