atomai
atomai copied to clipboard
Gaussian of coordinates close an edge can extend past the image boundary and cause an error.
Function: create_lattice_mask File: imgen.py Issue: XY coordinates close an edge can cause an error if their gaussian extends past the boundary.
Potential Solution: This can be avoided by including cases for the edges to remove the sections of the mask which extend beyond the image boundary and limit the indices to within the image width and height.
Additionally, the previous values of the mask are added to the new mask to allow smoother transitions between overlapping gaussians.
This sort of a solution can be seen in the image below.
@darianSmalley, thanks for noticing it. I think your solution makes sense - would you like to submit a pull request?