I have looked at my commit notes and I never actually used writeImageAtIndex as a function. I wanted to add some of the captureImage formatting that was borrowed/brought over from the ISL, so I copied the writeImageAtIndex function and added the extra details of colorbar, labeling, etc. In my first commit, I have a comment about how nextStep is failing randomly. In creating the animation for the GOES-16 sectors (https://www.youtube.com/watch?v=m1_XfLFeY840), I never tried to use a time driver via a script. This may have helped.
My commit message (perhaps a bit muddled and not super helpful for the MUG programmers) is
Version which does most of the work to display a fd, conus and meso together, with M1 and M2 sectors. (Known BUGS) - FD is not looping, even though there are three different images in FD data object and array - animation next step fails, nearly randomly. While the time moves ahead, the image sometimes doesn't and vice versa perhaps this can be fixed by using a index in steps and making sure that we begin at index one.