Ok, after a bit more debugging, I found that there was an issue with the way visibility was being set.
I changed
rep.modify.visibility(rep.distribution.choice([True],[False]*(one_in_n_chance)))
to
a = [True]
a.extend([False]*(one_in_n_chance))
rep.modify.visibility(rep.distribution.choice(a))
Another issue on my end at least was running on Windows with ‘:’ characters in the output path is not allowed, so I removed now
from the output_dir and was able to run and get output.
eg.