Added support for wigglers (partly) but $flagWriteSpectrum wont work