Pyplot is very slow at saving png or pdf figures. plt.imsave is much faster but without annotation.
fits creation is much faster but it is not the most convenient way of visualising the results
Can reuse the pyplot axes instead creating new ones. But this requires provide the list of cutouts as input as not provide them one by one as it is now.
Can create a function to first create the sub-array and a new one for creating the plots.
Can look at PIL instead of pyplot.
Pyplot is very slow at saving png or pdf figures. plt.imsave is much faster but without annotation.
fits creation is much faster but it is not the most convenient way of visualising the results
Can reuse the pyplot axes instead creating new ones. But this requires provide the list of cutouts as input as not provide them one by one as it is now.
Can create a function to first create the sub-array and a new one for creating the plots.
Can look at PIL instead of pyplot.