Ejemplo n.º 1
0
    def test_read_envi_file(self):
        s = extract_spectra_from_file(
            os.path.join(TEST_INPUTS_DIRECTORY,
                         "atsc15_targets_avg_all_envi.sli"), "envi")

        assert_allclose(s.wavelengths, self.correct_wavelengths)
        assert_allclose(s.values, self.correct_values)
Ejemplo n.º 2
0
    def test_read_sig_file(self):
        s = extract_spectra_from_file(os.path.join(TEST_INPUTS_DIRECTORY,
                                                   "wyken1_049.sig"),
                                                   "sig")

        assert_allclose(s.wavelengths, self.correct_wavelengths)
        assert_allclose(s.values, self.correct_values)
Ejemplo n.º 3
0
    def test_read_usgs_url(self):
        s = extract_spectra_from_file("http://speclab.cr.usgs.gov/spectral.lib06/ds231/ASCII/V/russianolive.dw92-4.30728.asc", 'usgs')

        assert_allclose(s.wavelengths, self.correct_wavelengths)
        assert_allclose(s.values, self.correct_values)
Ejemplo n.º 4
0
    def test_read_usgs_file(self):
        s = extract_spectra_from_file(os.path.join(TEST_INPUTS_DIRECTORY, "russianolive.dw92-4.30728.asc"), 'usgs')

        assert_allclose(s.wavelengths, self.correct_wavelengths)
        assert_allclose(s.values, self.correct_values)
Ejemplo n.º 5
0
    def test_read_sig_file(self):
        s = extract_spectra_from_file(
            os.path.join(TEST_INPUTS_DIRECTORY, "wyken1_049.sig"), "sig")

        assert_allclose(s.wavelengths, self.correct_wavelengths)
        assert_allclose(s.values, self.correct_values)