desihub / speclite

Lightweight utilities for working with spectroscopic data
14 stars 19 forks source link

Allow negative redhift values in redshift module #6

Closed kgage closed 8 years ago

kgage commented 8 years ago

Fix for #5

dkirkby commented 8 years ago

I think we should remove the z range check completely, as you did originally. Although z < -1 is unlikely to ever be used, its better to trust the that the user knows what they are doing.

However, there is a unit test (helpfully called test_negative_z) that verifies that a negative z raises a ValueError, so you will need to remove that to get the automated tests working again.

Also, update the redshift.py docstring to reflect this change, e.g. modify:

Redshift(s) of the input spectral data, which must all be >= 0.

to:

Redshift(s) of the input spectral data. Negative values are allowed.