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.

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.