python/rwsims/spectrum.py