desihub / speclite

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

Add new filters #37

Closed dkirkby closed 6 years ago

dkirkby commented 6 years ago

Add filter curves for MzLS-z, BASS-g and BASS-r:

desi_imaging

Fixes #11.

dkirkby commented 6 years ago

@moustakas @sbailey please check the following:

dkirkby commented 6 years ago

Travis tests are failing because they span numpy versions with different whitespace in their formatted output and I don't know how to tell doctest to do the right thing (even after trying #doctest: +NORMALIZE_WHITESPACE).

For example:

>>> print((result['flux'][:5]))
Expected:
    [ 0.5  0.5  0.5  0.5  0.5]
Got:
    [0.5 0.5 0.5 0.5 0.5]

Unless @weaverba137 knows the answer, I will remove these doctests (which seems a shame).

weaverba137 commented 6 years ago

@dkirkby, what specific lines in what files have this issue?

weaverba137 commented 6 years ago

PS, I've had success with +NORMALIZE_WHITESPACE. I've also had success using print(). However, I don't think I've done both at the same time.

dkirkby commented 6 years ago

@weaverba137 I tried both print(...) and +NORMALIZE_WHITESPACE (individually).

The 3 lines causing problems are speclite/filters.py #564 and speclite/redshift.py #40 and #56. A sample travis failure log is here.

sbailey commented 6 years ago

Let's go ahead and keep the full wavelength range as you currently have committed. The tails don't seem excessive. Comments in the metadata seem fine (though I haven't checked in detail).

weaverba137 commented 6 years ago

I remember a fix now: make numpy print strings using 1.13 format. See https://github.com/weaverba137/pydl/blob/master/pydl/__init__.py#L42.