The zero after the last non-zero transmission point, when present in the original transmission function, is removed when instantiating a Filter object using observate.
In a python terminal can try e.g.
from sedpy import observate
filt = observate.Filter("sdss_r0")
filt.transmission
filt.wavelength
and you can see the final 0 is removed, even though present in the original tranmsission function.
This is due to line 156 in the function _remove_extra_zeros in observate.py which could be changed from
inds = slice(max(v.min() - 1 , 0), min(v.max() + 1, len(transmission)))
to
inds = slice(max(v.min() - 1 , 0), min(v.max() + 2, len(transmission)))
in order to keep the zero after the last non-zero tranmission point.
Note that at least according to the function _remove_extra_zeros description, that final zero should not be removed.
Happy to make a pull request with required fix, if you agree with the change.
The zero after the last non-zero transmission point, when present in the original transmission function, is removed when instantiating a Filter object using observate.
In a python terminal can try e.g. from sedpy import observate filt = observate.Filter("sdss_r0") filt.transmission filt.wavelength
and you can see the final 0 is removed, even though present in the original tranmsission function.
This is due to line 156 in the function _remove_extra_zeros in observate.py which could be changed from inds = slice(max(v.min() - 1 , 0), min(v.max() + 1, len(transmission))) to inds = slice(max(v.min() - 1 , 0), min(v.max() + 2, len(transmission))) in order to keep the zero after the last non-zero tranmission point.
Note that at least according to the function _remove_extra_zeros description, that final zero should not be removed.
Happy to make a pull request with required fix, if you agree with the change.