Esempio n. 1
0
    def test_mtc_one_pixel_apart_for_diagonal_traces(self, diagonal_trace):
        pixel_size = 0.015
        spt = SpectralTrace(diagonal_trace)
        disp, wave = spt.get_max_dispersion()
        wave_edges = spt.get_pixel_wavelength_edges(pixel_size)  # wavelength edges
        dist_between_mtc = np.average(disp) * np.average(np.diff(wave_edges))

        assert dist_between_mtc == approx(pixel_size, rel=1e-5)
Esempio n. 2
0
    def test_monochromatic_trace_curves_are_one_pixel_apart(self, basic_trace):
        pixel_size = 0.015
        spt = SpectralTrace(basic_trace)
        disp, wave = spt.get_max_dispersion()
        wbedges = spt.get_pixel_wavelength_edges(pixel_size)     # wavelength edges
        dist_between_mtc = np.average(disp) * np.average(np.diff(wbedges))

        assert dist_between_mtc == approx(pixel_size, rel=1e-5)