def test_from_hdr(self): """WaveCoord class: testing constructor """ h = fits.getheader(get_data_file('obj', 'Spectrum_Novariance.fits')) wave = WaveCoord(h) h2 = wave.to_header() wave2 = WaveCoord(h2) wave2.shape = wave.shape assert wave.isEqual(wave2)
def test_copy(self): """WaveCoord class: testing copy""" wave = WaveCoord(crval=0, cunit=u.nm, shape=10) wave2 = wave.copy() assert wave.isEqual(wave2)