astropy/specutils — pull request #33 by kbarbary (2013-09-26 23:35:12+00:00)
Title: Tidy up reddening function docs

This PR makes superficial changes to the reddening functions:

* Allow functions to work on non-arrays.
* Fix function docstrings so that they compile cleanly in sphinx.
* Make some (not all) PEP8-related changes.
* Small fixes for numpy use, such as np.any() instead of any().

It also moves the module from `specutils.utils.reddening` to `specutils.extinction`. The `utils` submodule is intended to be analogous to `astropy.utils`, in that it contains non-astronomy-specific utilities.

There are still some improvements to be made to this module. Between the two functions `reddening_fm()` and `reddening_ccm()`, there are four model options:

* 'ccm89' (but uses O'Donnell 1994 coefficients, so not directly comparable to original paper)
* 'gcc09' (not currently working)
* 'f99'
* 'fm07' (not currently working)

As a casual user, it is a little unclear at first glance what the relation is between the two functions and multiple models in each function. I'm wondering if there should be four (or five) separate functions, one for each model:

* `reddening_ccm89()` (original CCM coefficients)
* `reddening_od94()` (updated coefficients)
* `reddening_gcc09()`
* `reddening_f99()`
* `reddening_fm07()`

The docs could include one or more plots illustrating the differences between the models.