Beispiel #1
0
    def residuals(self):
        residuals = getattr(self, '_residuals', None)
        if residuals is None:
            residuals = Spectrum1D.from_array(
                self.spectrum.wavelength,
                self.best_fit_spectrum.flux - self.spectrum.flux)
            self._residuals = residuals

        return residuals
Beispiel #2
0
    def residuals(self):
        residuals = getattr(self, '_residuals', None)
        if residuals is None:
            residuals = Spectrum1D.from_array(self.spectrum.wavelength,
                                              self.best_fit_spectrum.flux -
                                              self.spectrum.flux)
            self._residuals = residuals

        return residuals
Beispiel #3
0
def test_spectrum():
    wave, flux = np.loadtxt(data_path('test_spec.txt'), unpack=True)
    return Spectrum1D.from_array(wave * u.angstrom,
                                 flux * u.erg / u.s / u.cm**2 / u.angstrom)
Beispiel #4
0
def test_spectrum():
    wave, flux = np.loadtxt(data_path('test_spec.txt'), unpack=True)
    return Spectrum1D.from_array(wave * u.angstrom,
                                 flux * u.erg / u.s / u.cm**2 / u.angstrom)