ampl_spectrum python scripts improved