Fixed bug; works with & detector pixel size changes