def test_create_glob_kw(CALLISTO_IMAGE, CALLISTO_IMAGE_GLOB_INDEX, CALLISTO_IMAGE_GLOB_KEY): PATTERN = os.path.join( os.path.dirname(CALLISTO_IMAGE), CALLISTO_IMAGE_GLOB_KEY ) ca = CallistoSpectrogram.create(pattern=PATTERN)[CALLISTO_IMAGE_GLOB_INDEX] assert_allclose(ca.data, CallistoSpectrogram.read(CALLISTO_IMAGE).data)
def test_create_glob(CALLISTO_IMAGE_GLOB_KEY): PATTERN = os.path.join( os.path.dirname(sunpy.data.test.__file__), CALLISTO_IMAGE_GLOB_KEY ) ca = CallistoSpectrogram.create(PATTERN) assert len(ca) == 2
def test_create_glob(): PATTERN = os.path.join( os.path.dirname(sunpy.data.test.__file__), "BIR_*" ) ca = CallistoSpectrogram.create(PATTERN) assert len(ca) == 2
def test_create_url_kw(): URL = ( "http://soleil.i4ds.ch/solarradio/data/2002-20yy_Callisto/2011/09/22/" "BIR_20110922_050000_01.fit.gz" ) ca = CallistoSpectrogram.create(url=URL) assert np.array_equal(ca, CallistoSpectrogram.read(URL))
def test_create_glob_kw(): PATTERN = os.path.join( os.path.dirname(CALLISTO_IMAGE), "BIR_*" ) ca = CallistoSpectrogram.create(pattern=PATTERN)[0] assert np.array_equal(ca, CallistoSpectrogram.read(CALLISTO_IMAGE))
def test_create_single_glob(): PATTERN = os.path.join( os.path.dirname(CALLISTO_IMAGE), "BIR_*" ) ca = CallistoSpectrogram.create(PATTERN) assert np.array_equal(ca.data, CallistoSpectrogram.read(CALLISTO_IMAGE).data)
def test_create_glob_kw(): PATTERN = os.path.join(os.path.dirname(CALLISTO_IMAGE), "BIR_*") ca = CallistoSpectrogram.create(pattern=PATTERN)[0] assert np.array_equal(ca, CallistoSpectrogram.read(CALLISTO_IMAGE))
def test_create_url_kw(): URL = ( "http://soleil.i4ds.ch/solarradio/data/2002-20yy_Callisto/2011/09/22/" "BIR_20110922_050000_01.fit.gz") ca = CallistoSpectrogram.create(url=URL) assert np.array_equal(ca, CallistoSpectrogram.read(URL))
def test_create_file(): ca = CallistoSpectrogram.create(CALLISTO_IMAGE) assert np.array_equal(ca, CallistoSpectrogram.read(CALLISTO_IMAGE))
def test_extend(CALLISTO_IMAGE): im = CallistoSpectrogram.create(CALLISTO_IMAGE) im2 = im.extend() # Not too stable test, but works. assert im2.data.shape == (200, 7200)
def test_create_glob(CALLISTO_IMAGE_GLOB_KEY): PATTERN = os.path.join(os.path.dirname(sunpy.data.test.__file__), CALLISTO_IMAGE_GLOB_KEY) ca = CallistoSpectrogram.create(PATTERN) assert len(ca) == 2
def test_create_glob(): PATTERN = os.path.join(os.path.dirname(sunpy.data.test.__file__), "BIR_*") ca = CallistoSpectrogram.create(PATTERN) assert len(ca) == 2
def test_create_single_glob(CALLISTO_IMAGE, CALLISTO_IMAGE_GLOB_INDEX, CALLISTO_IMAGE_GLOB_KEY): PATTERN = os.path.join(os.path.dirname(CALLISTO_IMAGE), CALLISTO_IMAGE_GLOB_KEY) ca = CallistoSpectrogram.create(PATTERN) assert_allclose(ca[CALLISTO_IMAGE_GLOB_INDEX].data, CallistoSpectrogram.read(CALLISTO_IMAGE).data)
def test_create_file_kw(CALLISTO_IMAGE): ca = CallistoSpectrogram.create(filename=CALLISTO_IMAGE) assert np.array_equal(ca.data, CallistoSpectrogram.read(CALLISTO_IMAGE).data)
def test_create_file(): ca = CallistoSpectrogram.create(CALLISTO_IMAGE) assert np.array_equal(ca.data, CallistoSpectrogram.read(CALLISTO_IMAGE).data)
def test_extend(): im = CallistoSpectrogram.create(CALLISTO_IMAGE) im2 = im.extend() # Not too stable test, but works. assert im2.data.shape == (200, 7196)
def test_create_single_glob(CALLISTO_IMAGE): PATTERN = os.path.join(os.path.dirname(CALLISTO_IMAGE), "BIR_*") ca = CallistoSpectrogram.create(PATTERN) assert np.array_equal(ca[0].data, CallistoSpectrogram.read(CALLISTO_IMAGE).data)
def test_create_file_kw(): ca = CallistoSpectrogram.create(filename=CALLISTO_IMAGE) assert np.array_equal(ca, CallistoSpectrogram.read(CALLISTO_IMAGE))
def test_create_glob_kw(CALLISTO_IMAGE, CALLISTO_IMAGE_GLOB_INDEX, CALLISTO_IMAGE_GLOB_KEY): PATTERN = os.path.join(os.path.dirname(CALLISTO_IMAGE), CALLISTO_IMAGE_GLOB_KEY) ca = CallistoSpectrogram.create(pattern=PATTERN)[CALLISTO_IMAGE_GLOB_INDEX] assert_allclose(ca.data, CallistoSpectrogram.read(CALLISTO_IMAGE).data)