SED from Cube code

Made a pull request while I work on this in case you have comments.
The `* np.ones(30)` here should be surperfluous, because numpy broadcasting takes care of this, no?