Fix Problem with 1st Pixel & Field Offset
Up till now we applied possible offsets of the electric field (via field_offset
) in negative direction, i.e.
\vec{x}' = \vec{x} - \vec{o}
which leads to problematic behavior if the absolute position is negative after correcting for the half-pitch shift arising from the definition of the local coordinate system.
This MR corrects this by simply using a positive offset.
Problematic behavior
These images show three consecutive pixel cells: (0,0), (0,1), (0,2). In the field magnitude, the problem is not visible because the field is pretty symmetric. However, when looking at the y-component of the field only, one can see that the leftmost half-pitch has a wrong field assigned.
Corrected behavior
With this patch applied, also the first pixel cell is properly treated (same fields as above):