Beispiel #1
0
 def test_save_datasets(self):
     """Test basic writer operation save_datasets."""
     import os
     import numpy as np
     from libtiff import TIFF
     from satpy.writers.mitiff import MITIFFWriter
     expected = np.full((100, 200), 0)
     dataset = self._get_test_datasets()
     w = MITIFFWriter(base_dir=self.base_dir)
     w.save_datasets(dataset)
     filename = (dataset[0].attrs['metadata_requirements']['file_pattern']).format(
         start_time=dataset[0].attrs['start_time'])
     tif = TIFF.open(os.path.join(self.base_dir, filename))
     for image in tif.iter_images():
         np.testing.assert_allclose(image, expected, atol=1.e-6, rtol=0)
Beispiel #2
0
 def test_save_datasets(self):
     """Test basic writer operation."""
     from satpy.writers.mitiff import MITIFFWriter
     dataset = self._get_test_dataset()
     w = MITIFFWriter(base_dir=self.base_dir)
     w.save_datasets(dataset)