def test_get_high_res_images(self): provider = AerosolsProvider(CubeConfig(grid_width=4320, grid_height=2160, spatial_res=1 / 12, end_time=datetime(2003, 1, 1)), dir=SOURCE_DIR) provider.prepare() images = provider.compute_variable_images(datetime(2002, 7, 27), datetime(2002, 8, 4)) self.assertIsNotNone(images) self.assertTrue('aerosol_optical_thickness_1610' in images) image = images['aerosol_optical_thickness_1610'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_550' in images) image = images['aerosol_optical_thickness_550'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_555' in images) image = images['aerosol_optical_thickness_555'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_659' in images) image = images['aerosol_optical_thickness_659'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_865' in images) image = images['aerosol_optical_thickness_865'] self.assertEqual((2160, 4320), image.shape)
def test_get_high_res_images(self): provider = AerosolsProvider(CubeConfig(grid_width=4320, grid_height=2160, spatial_res=1 / 12, end_time=datetime(2003, 1, 1)), dir=SOURCE_DIR) provider.prepare() images = provider.compute_variable_images(datetime(2002, 7, 27), datetime(2002, 8, 4)) self.assertIsNotNone(images) self.assertTrue('aerosol_optical_thickness_1610' in images) image = images['aerosol_optical_thickness_1610'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_550' in images) image = images['aerosol_optical_thickness_550'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_555' in images) image = images['aerosol_optical_thickness_555'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_659' in images) image = images['aerosol_optical_thickness_659'] self.assertEqual((2160, 4320), image.shape) self.assertTrue('aerosol_optical_thickness_865' in images) image = images['aerosol_optical_thickness_865'] self.assertEqual((2160, 4320), image.shape)
def test_get_images(self): provider = AerosolsProvider(CubeConfig(end_time=datetime(2003, 1, 1)), dir=SOURCE_DIR) provider.prepare() images = provider.compute_variable_images(datetime(2002, 7, 27), datetime(2002, 8, 4)) self.assertIsNotNone(images) self.assertTrue('aerosol_optical_thickness_1610' in images) image = images['aerosol_optical_thickness_1610'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_550' in images) image = images['aerosol_optical_thickness_550'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_555' in images) image = images['aerosol_optical_thickness_555'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_659' in images) image = images['aerosol_optical_thickness_659'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_865' in images) image = images['aerosol_optical_thickness_865'] self.assertEqual((720, 1440), image.shape)
def test_get_images(self): provider = AerosolsProvider(CubeConfig(end_time=datetime(2003, 1, 1)), dir=SOURCE_DIR) provider.prepare() images = provider.compute_variable_images(datetime(2002, 7, 27), datetime(2002, 8, 4)) self.assertIsNotNone(images) self.assertTrue('aerosol_optical_thickness_1610' in images) image = images['aerosol_optical_thickness_1610'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_550' in images) image = images['aerosol_optical_thickness_550'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_555' in images) image = images['aerosol_optical_thickness_555'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_659' in images) image = images['aerosol_optical_thickness_659'] self.assertEqual((720, 1440), image.shape) self.assertTrue('aerosol_optical_thickness_865' in images) image = images['aerosol_optical_thickness_865'] self.assertEqual((720, 1440), image.shape)