Source: specutils Version: 1.4.1-1 Severity: serious Tags: ftbfs https://buildd.debian.org/status/logs.php?pkg=specutils&ver=1.4.1-1%2Bb1
... =================================== FAILURES =================================== __________________________ test_continuum_calculation __________________________ def test_continuum_calculation(): """ This test fits the first simulated spectrum from the fixture. The initial guesses are manually set here with bounds that essentially make sense as the functionality of the test is to make sure the fit works and we get a reasonable answer out **given** good initial guesses. """ x_single_continuum, y_single_continuum = single_peak_continuum() spectrum = Spectrum1D(flux=y_single_continuum*u.Jy, spectral_axis=x_single_continuum*u.um) g1_fit = fit_generic_continuum(spectrum) > spectrum_normalized = spectrum / g1_fit(spectrum.spectral_axis) specutils/tests/test_continuum.py:60: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ specutils/spectra/spectrum1d.py:568: in __truediv__ return self.divide(other) /usr/lib/python3/dist-packages/astropy/nddata/mixins/ndarithmetic.py:536: in divide return self._prepare_then_do_arithmetic(np.true_divide, operand, /usr/lib/python3/dist-packages/astropy/nddata/mixins/ndarithmetic.py:610: in _prepare_then_do_arithmetic operand2 = cls(operand2) specutils/spectra/spectrum1d.py:288: in __init__ spec_axis = self.wcs.pixel_to_world(np.arange(self.flux.shape[-1])) specutils/utils/wcs_utils.py:217: in pixel_to_world return super().pixel_to_world(*args, **kwargs).to( /usr/lib/python3/dist-packages/gwcs/api.py:299: in pixel_to_world return self(*pixels, with_units=True) /usr/lib/python3/dist-packages/gwcs/wcs.py:379: in __call__ result = self.output_frame.coordinates(result) /usr/lib/python3/dist-packages/gwcs/coordinate_frames.py:463: in coordinates return coord.SpectralCoord(*args).to(self.unit[0]) /usr/lib/python3/dist-packages/astropy/units/decorators.py:304: in wrapper return_ = wrapped_function(*func_args, **func_kwargs) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_coordinate.py:193: in __new__ obj = super().__new__(cls, value, unit=unit, **kwargs) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_quantity.py:57: in __new__ obj = super().__new__(cls, value, unit=unit, **kwargs) /usr/lib/python3/dist-packages/astropy/units/quantity.py:425: in __new__ value = value.view(cls) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_coordinate.py:242: in __array_finalize__ super().__array_finalize__(obj) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_quantity.py:72: in __array_finalize__ super().__array_finalize__(obj) /usr/lib/python3/dist-packages/astropy/units/quantity.py:550: in __array_finalize__ self._set_unit(unit) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("SpectralCoord instance has no attribute 'radial_velocity'") raised in repr()] SpectralCoord object at 0x7f389f6d3d10> unit = Unit(dimensionless) def _set_unit(self, unit): if unit is None or not unit.is_equivalent(self._equivalent_unit): > raise UnitTypeError( "{} instances require units equivalent to '{}'" .format(type(self).__name__, self._equivalent_unit) + (", but no unit was given." if unit is None else f", so cannot set it to '{unit}'.")) E astropy.units.core.UnitTypeError: SpectralCoord instances require units equivalent to '(Unit("Hz"), Unit("m"), Unit("J"), Unit("1 / m"), Unit("km / s"))', so cannot set it to ''. /usr/lib/python3/dist-packages/astropy/units/quantity.py:1933: UnitTypeError __________________________ test_continuum_full_window __________________________ def test_continuum_full_window(): """ This test fits the first simulated spectrum from the fixture, but with the fit_continuum function instead of fit_generic_continuum. Uses a window to select the entire spectrum and checks that it recovers the original, non-windowed fit. """ x_single_continuum, y_single_continuum = single_peak_continuum() spectrum = Spectrum1D(flux=y_single_continuum*u.Jy, spectral_axis=x_single_continuum*u.um) # Smooth in the same way fit_generic_continuum does. spectrum_smoothed = median_smooth(spectrum, 3) # Check that a full width window recovers the original, non-windowed fit. g1_fit = fit_continuum(spectrum_smoothed, window=(0.*u.um, 10.*u.um)) g1_fit_orig = fit_continuum(spectrum_smoothed) > sp_normalized = spectrum / g1_fit(spectrum.spectral_axis) specutils/tests/test_continuum.py:88: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ specutils/spectra/spectrum1d.py:568: in __truediv__ return self.divide(other) /usr/lib/python3/dist-packages/astropy/nddata/mixins/ndarithmetic.py:536: in divide return self._prepare_then_do_arithmetic(np.true_divide, operand, /usr/lib/python3/dist-packages/astropy/nddata/mixins/ndarithmetic.py:610: in _prepare_then_do_arithmetic operand2 = cls(operand2) specutils/spectra/spectrum1d.py:288: in __init__ spec_axis = self.wcs.pixel_to_world(np.arange(self.flux.shape[-1])) specutils/utils/wcs_utils.py:217: in pixel_to_world return super().pixel_to_world(*args, **kwargs).to( /usr/lib/python3/dist-packages/gwcs/api.py:299: in pixel_to_world return self(*pixels, with_units=True) /usr/lib/python3/dist-packages/gwcs/wcs.py:379: in __call__ result = self.output_frame.coordinates(result) /usr/lib/python3/dist-packages/gwcs/coordinate_frames.py:463: in coordinates return coord.SpectralCoord(*args).to(self.unit[0]) /usr/lib/python3/dist-packages/astropy/units/decorators.py:304: in wrapper return_ = wrapped_function(*func_args, **func_kwargs) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_coordinate.py:193: in __new__ obj = super().__new__(cls, value, unit=unit, **kwargs) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_quantity.py:57: in __new__ obj = super().__new__(cls, value, unit=unit, **kwargs) /usr/lib/python3/dist-packages/astropy/units/quantity.py:425: in __new__ value = value.view(cls) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_coordinate.py:242: in __array_finalize__ super().__array_finalize__(obj) /usr/lib/python3/dist-packages/astropy/coordinates/spectral_quantity.py:72: in __array_finalize__ super().__array_finalize__(obj) /usr/lib/python3/dist-packages/astropy/units/quantity.py:550: in __array_finalize__ self._set_unit(unit) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <[AttributeError("SpectralCoord instance has no attribute 'radial_velocity'") raised in repr()] SpectralCoord object at 0x7f389fa62ab0> unit = Unit(dimensionless) def _set_unit(self, unit): if unit is None or not unit.is_equivalent(self._equivalent_unit): > raise UnitTypeError( "{} instances require units equivalent to '{}'" .format(type(self).__name__, self._equivalent_unit) + (", but no unit was given." if unit is None else f", so cannot set it to '{unit}'.")) E astropy.units.core.UnitTypeError: SpectralCoord instances require units equivalent to '(Unit("Hz"), Unit("m"), Unit("J"), Unit("1 / m"), Unit("km / s"))', so cannot set it to ''. /usr/lib/python3/dist-packages/astropy/units/quantity.py:1933: UnitTypeError ... =========================== short test summary info ============================ FAILED specutils/tests/test_continuum.py::test_continuum_calculation - astrop... FAILED specutils/tests/test_continuum.py::test_continuum_full_window - astrop... FAILED specutils/tests/test_continuum.py::test_continuum_spectral_region - as... FAILED specutils/tests/test_continuum.py::test_continuum_window_no_noise - as... FAILED specutils/tests/test_continuum.py::test_double_continuum_window - astr... FAILED specutils/tests/test_continuum.py::test_double_continuum_window_alternate FAILED specutils/tests/test_correlation.py::test_autocorrelation - astropy.un... FAILED specutils/tests/test_correlation.py::test_correlation - astropy.units.... FAILED specutils/tests/test_correlation.py::test_correlation_zero_padding - a... FAILED specutils/tests/test_correlation.py::test_correlation_random_lines - a... FAILED specutils/tests/test_loaders.py::test_tabular_fits_writer[wavelength] FAILED specutils/tests/test_loaders.py::test_tabular_fits_writer[frequency] FAILED specutils/tests/test_loaders.py::test_tabular_fits_writer[energy] - As... FAILED specutils/tests/test_loaders.py::test_tabular_fits_writer[wavenumber] ==== 14 failed, 336 passed, 101 skipped, 7 xfailed, 193 warnings in 44.14s ===== E: pybuild pybuild:354: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.9/build; python3.9 -m pytest --remote-data=none --doctest-rst dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p "3.10 3.9" returned exit code 13 make: *** [debian/rules:8: binary-arch] Error 25