=reimplemented fig3.  looks like it works the same as before
=comments
=simplified the way target images are generated and the way fits are initialized and executed
=fig4 now works again