satpy.tests.reader_tests.test_viirs_sdr module

Module for testing the satpy.readers.viirs_sdr module.

class satpy.tests.reader_tests.test_viirs_sdr.FakeHDF5FileHandler2(filename, filename_info, filetype_info, include_factors=True)[source]

Bases: FakeHDF5FileHandler

Swap-in HDF5 File Handler.

Create fake file handler.

get_test_content(filename, filename_info, filetype_info)[source]

Mimic reader input file content.

class satpy.tests.reader_tests.test_viirs_sdr.FakeHDF5FileHandlerAggr(filename, filename_info, filetype_info, include_factors=True)[source]

Bases: FakeHDF5FileHandler2

Swap-in HDF5 File Handler with 4 VIIRS Granules per file.

Create fake file handler.

class satpy.tests.reader_tests.test_viirs_sdr.FakeShortHDF5FileHandlerAggr(filename, filename_info, filetype_info, include_factors=True)[source]

Bases: FakeHDF5FileHandler2

Fake file that has less scans than usual in a couple granules.

Create fake file handler.

class satpy.tests.reader_tests.test_viirs_sdr.TestAggrVIIRSSDRReader(methodName='runTest')[source]

Bases: TestCase

Test VIIRS SDR Reader.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Wrap HDF5 file handler with our own fake handler.

tearDown()[source]

Stop wrapping the HDF5 file handler.

test_bounding_box()[source]

Test bounding box.

yaml_file = 'viirs_sdr.yaml'
class satpy.tests.reader_tests.test_viirs_sdr.TestShortAggrVIIRSSDRReader(methodName='runTest')[source]

Bases: TestCase

Test VIIRS SDR Reader with a file that has truncated granules.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Wrap HDF5 file handler with our own fake handler.

tearDown()[source]

Stop wrapping the HDF5 file handler.

test_load_truncated_band()[source]

Test loading a single truncated band.

yaml_file = 'viirs_sdr.yaml'
class satpy.tests.reader_tests.test_viirs_sdr.TestVIIRSSDRReader(methodName='runTest')[source]

Bases: TestCase

Test VIIRS SDR Reader.

Create an instance of the class that will use the named test method when executed. Raises a ValueError if the instance does not have a method with the specified name.

setUp()[source]

Wrap HDF5 file handler with our own fake handler.

tearDown()[source]

Stop wrapping the HDF5 file handler.

test_init()[source]

Test basic init with no extra parameters.

test_init_end_time_beyond()[source]

Test basic init with end_time before the provided files.

test_init_start_end_time()[source]

Test basic init with end_time before the provided files.

test_init_start_time_beyond()[source]

Test basic init with start_time after the provided files.

test_load_all_i_bts()[source]

Load all I band brightness temperatures.

test_load_all_i_radiances()[source]

Load all I band radiances.

test_load_all_i_reflectances_provided_geo()[source]

Load all I band reflectances with geo files provided.

test_load_all_m_bts()[source]

Load all M band brightness temperatures.

test_load_all_m_radiances()[source]

Load all M band radiances.

test_load_all_m_reflectances_find_geo()[source]

Load all M band reflectances with geo files not specified but existing.

test_load_all_m_reflectances_no_geo()[source]

Load all M band reflectances with no geo files provided.

test_load_all_m_reflectances_provided_geo()[source]

Load all M band reflectances with geo files provided.

test_load_all_m_reflectances_use_nontc()[source]

Load all M band reflectances but use non-TC geolocation.

test_load_all_m_reflectances_use_nontc2()[source]

Load all M band reflectances but use non-TC geolocation because TC isn’t available.

test_load_dnb()[source]

Load DNB dataset.

test_load_dnb_no_factors()[source]

Load DNB dataset with no provided scale factors.

test_load_dnb_sza_no_factors()[source]

Load DNB solar zenith angle with no scaling factors.

The angles in VIIRS SDRs should never have scaling factors so we test it that way.

test_load_i_no_files()[source]

Load I01 when only DNB files are provided.

yaml_file = 'viirs_sdr.yaml'
satpy.tests.reader_tests.test_viirs_sdr.touch_geo_files(*prefixes)[source]

Create and then remove VIIRS SDR geolocation files.