Skip to content

Commit

Permalink
increase coverage on filters.py
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverba137 committed Aug 2, 2024
1 parent df1503a commit d114acd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions speclite/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,6 @@
default_flux_unit : :class:`astropy.units.Unit`
The default units for spectral flux density per unit wavelength.
"""
from __future__ import print_function, division # pragma: no cover

import os
import os.path
import glob
Expand Down Expand Up @@ -1769,7 +1767,7 @@ def pad_spectrum(self, spectrum, wavelength, axis=-1, method='median'):
padded_wavelength = np.asanyarray(wavelength)
for response in sorted_responses:
padded_spectrum, padded_wavelength = response.pad_spectrum(
padded_spectrum, padded_wavelength)
padded_spectrum, padded_wavelength, method=method)
return padded_spectrum, padded_wavelength


Expand Down
5 changes: 5 additions & 0 deletions speclite/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,11 @@ def test_load_filters():
def test_plot_filters():
plot_filters(load_filters('sdss2010-r'))
plot_filters(load_filters('sdss2010-g', 'sdss2010-r'))
# legend_loc=None turns off the legend.
plot_filters(load_filters('sdss2010-g', 'sdss2010-r'), legend_loc=None)
# Since legend_ncols has a default value, it's not clear why
# legend_ncols=None would ever be set. It is *not* the same as legend_loc=None.
plot_filters(load_filters('sdss2010-g', 'sdss2010-r'), legend_ncols=None)
plot_filters(load_filters('sdss2010-g', 'sdss2010-r'), legend_ncols=2)
plot_filters(load_filters('sdss2010-g', 'sdss2010-r'), response_limits=[0, 0.6])

Expand Down

0 comments on commit d114acd

Please sign in to comment.