Title: Undulator physics and coherent harmonic generation at the MAX-lab electron storage ring