good start of the phasing plots
improved phasing scan images and a few more generic functions