Square gratings at 45 degrees

Hello,

I’m creating filter banks which I feed into a neural network using this library. When I however create these filter banks I get some artefacts like this:

You can see the bump in the 45 degree gratings.

Additionally there seems to be some inconsistency in the sense that some white stripes are 2 pixels thick and others 3 pixels thick:

I had a scan through the forum and the documentation but was unable to find a solution for this. Hopefully I am not asking a stupid question here! For my experiment it is important that the gratings are consistent, so if there is a setting for this I would be very grateful to hear about that!

~Bas