satpy.tests.reader_tests._li_test_utils module

Common utility modules used for LI mock-oriented unit tests.

class satpy.tests.reader_tests._li_test_utils.FakeLIFileHandlerBase(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

Class for faking the NetCDF4 Filehandler.

Get fake file content from ‘get_test_content’.

get_test_content(filename, filename_info, filetype_info)[source]

Get the content of the test data.

Here we generate the default content we want to provide depending on the provided filename infos.

get_variable_writer(dset, settings)[source]

Get a variable writer.

schema_parameters = None
write_sector_variables(settings, write_variable)[source]

Write the sector variables.

write_variables(settings, write_variable)[source]

Write raw (i.e. not in sectors) variables.

satpy.tests.reader_tests._li_test_utils.accumulation_dimensions(nacc, nobs)[source]

Set dimensions for the accumulated products.

satpy.tests.reader_tests._li_test_utils.add_attributes(attribs, ignored_attrs, desc)[source]

Add all the custom properties directly as attributes.

satpy.tests.reader_tests._li_test_utils.extract_filetype_info(filetype_infos, filetype)[source]

Extract Satpy-conform filetype_info from filetype_infos fixture.

satpy.tests.reader_tests._li_test_utils.fci_grid_definition(axis, nobs)[source]

FCI grid definition on X or Y axis.

satpy.tests.reader_tests._li_test_utils.get_product_schema(pname, settings=None)[source]

Retrieve an LI product schema given its name.

satpy.tests.reader_tests._li_test_utils.l2_af_schema(settings=None)[source]

Define schema for LI L2 AF product.

satpy.tests.reader_tests._li_test_utils.l2_afa_schema(settings=None)[source]

Define schema for LI L2 AFA product.

satpy.tests.reader_tests._li_test_utils.l2_afr_schema(settings=None)[source]

Define schema for LI L2 AFR product.

satpy.tests.reader_tests._li_test_utils.l2_le_schema(settings=None)[source]

Define schema for LI L2 LE product.

satpy.tests.reader_tests._li_test_utils.l2_lef_schema(settings=None)[source]

Define schema for LI L2 LEF product.

satpy.tests.reader_tests._li_test_utils.l2_lfl_schema(settings=None)[source]

Define schema for LI L2 LFL product.

satpy.tests.reader_tests._li_test_utils.l2_lgr_schema(settings=None)[source]

Define schema for LI L2 LGR product.

satpy.tests.reader_tests._li_test_utils.mtg_geos_projection()[source]

MTG geos projection definition.

satpy.tests.reader_tests._li_test_utils.populate_dummy_data(data, names, details)[source]

Populate variable with dummy data.

satpy.tests.reader_tests._li_test_utils.set_variable_path(var_path, desc, sname)[source]

Replace variable default path if applicable and ensure trailing separator.