satpy.tests.reader_tests.test_viirs_l1b module

Module for testing the satpy.readers.viirs_l1b module.

class satpy.tests.reader_tests.test_viirs_l1b.FakeNetCDF4FileHandlerDay(filename, filename_info, filetype_info, auto_maskandscale=False, xarray_kwargs=None, cache_var_size=0, cache_handle=False, extra_file_content=None)[source]

Bases: FakeNetCDF4FileHandler

Swap-in NetCDF4 File Handler.

Get fake file content from ‘get_test_content’.

I_BANDS = ['I01', 'I02', 'I03', 'I04', 'I05']
I_BT_BANDS = ['I04', 'I05']
I_REFL_BANDS = ['I01', 'I02', 'I03']
M_BANDS = ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11', 'M12', 'M13', 'M14', 'M15', 'M16']
M_BT_BANDS = ['M12', 'M13', 'M14', 'M15', 'M16']
M_REFL_BANDS = ['M01', 'M02', 'M03', 'M04', 'M05', 'M06', 'M07', 'M08', 'M09', 'M10', 'M11']
get_test_content(filename, filename_info, filetype_info)[source]

Mimic reader input file content.

class satpy.tests.reader_tests.test_viirs_l1b.FakeNetCDF4FileHandlerNight(filename, filename_info, filetype_info, auto_maskandscale=False, xarray_kwargs=None, cache_var_size=0, cache_handle=False, extra_file_content=None)[source]

Bases: FakeNetCDF4FileHandlerDay

Same as the day file handler, but some day-only bands are missing.

This matches what happens in real world files where reflectance bands are removed in night data to save space.

Get fake file content from ‘get_test_content’.

I_BANDS = ['I04', 'I05']
M_BANDS = ['M12', 'M13', 'M14', 'M15', 'M16']
class satpy.tests.reader_tests.test_viirs_l1b.TestVIIRSL1BReaderDay[source]

Bases: object

Test VIIRS L1B Reader.

fake_cls

alias of FakeNetCDF4FileHandlerDay

has_reflectance_bands = True
setup_method()[source]

Wrap NetCDF4 file handler with our own fake handler.

teardown_method()[source]

Stop wrapping the NetCDF4 file handler.

test_available_datasets_m_bands()[source]

Test available datasets for M band files.

test_init()[source]

Test basic init with no extra parameters.

test_load_dnb_angles()[source]

Test loading all DNB angle datasets.

test_load_dnb_radiance()[source]

Test loading the main DNB dataset.

test_load_every_m_band_bt()[source]

Test loading all M band brightness temperatures.

test_load_every_m_band_rad()[source]

Test loading all M bands as radiances.

test_load_every_m_band_refl()[source]

Test loading all M band reflectances.

yaml_file = 'viirs_l1b.yaml'
class satpy.tests.reader_tests.test_viirs_l1b.TestVIIRSL1BReaderDayNight[source]

Bases: TestVIIRSL1BReaderDay

Test VIIRS L1b with night data.

Night data files don’t have reflectance bands in them.

fake_cls

alias of FakeNetCDF4FileHandlerNight

has_reflectance_bands = False