satpy.tests.reader_tests.test_msi_safe module

Module for testing the satpy.readers.msi_safe module.

class satpy.tests.reader_tests.test_msi_safe.TestMTDXML[source]

Bases: object

Test the SAFE MTD XML file handler.

setup_method()[source]

Set up the test case.

test_xml_calibration(process_level, mask_saturated, band_name, expected)[source]

Test the calibration to reflectance/radiance/counts.

test_xml_calibration_to_atmospheric(process_level, mask_saturated, band_name, expected)[source]

Test the calibration to L2A atmospheric products.

class satpy.tests.reader_tests.test_msi_safe.TestSAFEMSIL1C[source]

Bases: object

Test case for image reading (jp2k).

setup_method()[source]

Set up the test.

test_calibration_and_masking(mask_saturated, dataset_name, calibration, expected)[source]

Test that saturated is masked with inf when requested and that calibration is performed.

test_filename_dsname_mismatch(process_level, band_name, dataset_name)[source]

Test when dataset name and file band name mismatch, the data and its area definition should both be None.

test_start_time()[source]

Test that the correct start time is returned.

class satpy.tests.reader_tests.test_msi_safe.TestTileXML[source]

Bases: object

Test the SAFE TILE XML file handler.

Since L1C/L2A share almost the same Tile XML structure, we only use L1C Tile here.

test_angles(process_level, angle_name, angle_tag, expected)[source]

Test reading angles array.

test_navigation()[source]

Test the navigation.

test_start_time()[source]

Ensure start time is read correctly from XML.

satpy.tests.reader_tests.test_msi_safe.jp2_builder(process_level, band_name, mask_saturated=True)[source]

Build fake SAFE jp2 image file.

satpy.tests.reader_tests.test_msi_safe.make_alt_dataid(**items)[source]

Make a DataID with modified keys.

satpy.tests.reader_tests.test_msi_safe.xml_builder(process_level, mask_saturated=True, band_name=None)[source]

Build fake SAFE MTD/Tile XML.