@GaS - It looks like python behavior has gotten stricter since I original wrote the script. Apparently the ‘/’ division operator now always outputs a float type. Changing those to the ‘//’ integer round-down division operator should fix the error. Here is an updated version (be sure to remove “.txt” from the end of its name after downloading):
grayscale_square_gen.py.txt (967 Bytes)
Here is an alternative version of the script that uses transparent pixels instead of white around the edge tick marks. This is helpful because transparent == laser off regardless of the Min Power setting.
grayscale_square_gen_transparent.py.txt (1.1 KB)
This is the file that it outputs: