Document workflows for intensity calculations
Both issue #243 and #244 suggest ways of calculating the mean and standard deviations within a spectrum, respectively:
Oh and I guess the snippet above is now (v0.4) np.mean(extract_region(spectrum, reg).flux) or astropy.stats.sigma_clip(extract_region(spectrum, reg).flux, cenfunc=np.mean) if you want sigma-clipping
and
For completeness, in v0.4 that would be np.std(extract_region(spectrum, reg).flux)
These do not rise to the level of needing dedicated analysis functions but (as suggested in the linked issues) should be documented.
What is the intended workflow if you need to sigma clip before doing a calculation? Is it simply to create a new spectrum, e.g.:
new_spec = Spectrum(sigma_clip(old_spec.flux), ...)
or is there a way to perform generic astropy/scipy/numpy functions on an array while preserving the underlying metadata, e.g.:
new_spec = sigma_clip(old_spec)
(this doesn't work out-of-the-box, at least)