Example #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
Example #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
Example #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)
Example #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)