satpy.tests.reader_tests.test_mersi_l1b module

Tests for the ‘mersi2_l1b’ reader.

class satpy.tests.reader_tests.test_mersi_l1b.FakeHDF5FileHandler2(filename, filename_info, filetype_info, **kwargs)[source]

Bases: FakeHDF5FileHandler

Swap-in HDF5 File Handler.

Get fake file content from ‘get_test_content’.

_add_band_data_file_content()[source]
_add_geo_data_file_content()[source]
_add_tbb_coefficients(global_attrs)[source]
property _geo_prefix_for_file_type
_get_data_file_content()[source]
property _num_cols_for_file_type
property _rows_per_scan
_set_sensor_attrs(global_attrs)[source]
get_test_content(filename, filename_info, filetype_info)[source]

Mimic reader input file content.

num_cols = 2048
num_scans = 2
class satpy.tests.reader_tests.test_mersi_l1b.MERSI12llL1BTester[source]

Bases: MERSIL1BTester

Test MERSI1/2/LL L1B Reader.

bands_1000: list = []
bands_250: list = []
filenames_1000m: list = []
filenames_250m: list = []
filenames_all: list = []
ir_1000_bands: list = []
ir_250_bands: list = []
test_all_resolutions()[source]

Test loading data when all resolutions or specific one are available.

test_counts_calib()[source]

Test loading data at counts calibration.

test_rad_calib()[source]

Test loading data at radiance calibration. For MERSI-2/LL VIS/IR and MERSI-1 IR.

vis_1000_bands: list = []
vis_250_bands: list = []
yaml_file: str = ''
class satpy.tests.reader_tests.test_mersi_l1b.MERSIL1BTester[source]

Bases: object

Test MERSI1/2/LL/RM L1B Reader.

setup_method()[source]

Wrap HDF5 file handler with our own fake handler.

teardown_method()[source]

Stop wrapping the HDF5 file handler.

class satpy.tests.reader_tests.test_mersi_l1b.TestFY3AMERSI1L1B[source]

Bases: MERSI12llL1BTester

Test the FY3A MERSI1 L1B reader.

bands_1000: list = ['6', '7', '8', '11', '15', '19', '20']
bands_250: list = ['1', '2', '3', '4', '5']
filenames_1000m: list = ['FY3A_MERSI_GBAL_L1_20090601_1200_1000M_MS.hdf']
filenames_250m: list = ['FY3A_MERSI_GBAL_L1_20090601_1200_0250M_MS.hdf']
filenames_all: list = ['FY3A_MERSI_GBAL_L1_20090601_1200_1000M_MS.hdf', 'FY3A_MERSI_GBAL_L1_20090601_1200_0250M_MS.hdf']
ir_1000_bands: list = []
ir_250_bands: list = ['5']
vis_1000_bands: list = ['6', '7', '8', '11', '15', '19', '20']
vis_250_bands: list = ['1', '2', '3', '4']
yaml_file: str = 'fy3a_mersi1_l1b.yaml'
class satpy.tests.reader_tests.test_mersi_l1b.TestFY3BMERSI1L1B[source]

Bases: MERSI12llL1BTester

Test the FY3B MERSI1 L1B reader.

bands_1000: list = ['6', '7', '8', '11', '15', '19', '20']
bands_250: list = ['1', '2', '3', '4', '5']
filenames_1000m: list = ['FY3B_MERSI_GBAL_L1_20110824_1850_1000M_MS.hdf']
filenames_250m: list = ['FY3B_MERSI_GBAL_L1_20110824_1850_0250M_MS.hdf', 'FY3B_MERSI_GBAL_L1_20110824_1850_GEOXX_MS.hdf']
filenames_all: list = ['FY3B_MERSI_GBAL_L1_20110824_1850_1000M_MS.hdf', 'FY3B_MERSI_GBAL_L1_20110824_1850_0250M_MS.hdf', 'FY3B_MERSI_GBAL_L1_20110824_1850_GEOXX_MS.hdf']
ir_1000_bands: list = []
ir_250_bands: list = ['5']
vis_1000_bands: list = ['6', '7', '8', '11', '15', '19', '20']
vis_250_bands: list = ['1', '2', '3', '4']
yaml_file: str = 'fy3b_mersi1_l1b.yaml'
class satpy.tests.reader_tests.test_mersi_l1b.TestFY3CMERSI1L1B[source]

Bases: MERSI12llL1BTester

Test the FY3C MERSI1 L1B reader.

bands_1000: list = ['6', '7', '8', '11', '15', '19', '20']
bands_250: list = ['1', '2', '3', '4', '5']
filenames_1000m: list = ['FY3C_MERSI_GBAL_L1_20131002_1835_1000M_MS.hdf', 'FY3C_MERSI_GBAL_L1_20131002_1835_GEO1K_MS.hdf']
filenames_250m: list = ['FY3C_MERSI_GBAL_L1_20131002_1835_0250M_MS.hdf', 'FY3C_MERSI_GBAL_L1_20131002_1835_GEOQK_MS.hdf']
filenames_all: list = ['FY3C_MERSI_GBAL_L1_20131002_1835_1000M_MS.hdf', 'FY3C_MERSI_GBAL_L1_20131002_1835_GEO1K_MS.hdf', 'FY3C_MERSI_GBAL_L1_20131002_1835_0250M_MS.hdf', 'FY3C_MERSI_GBAL_L1_20131002_1835_GEOQK_MS.hdf']
ir_1000_bands: list = []
ir_250_bands: list = ['5']
vis_1000_bands: list = ['6', '7', '8', '11', '15', '19', '20']
vis_250_bands: list = ['1', '2', '3', '4']
yaml_file: str = 'fy3c_mersi1_l1b.yaml'
class satpy.tests.reader_tests.test_mersi_l1b.TestFY3DMERSI2L1B[source]

Bases: MERSI12llL1BTester

Test the FY3D MERSI2 L1B reader.

bands_1000: list = ['5', '8', '9', '11', '15', '17', '19', '20', '21', '23']
bands_250: list = ['1', '2', '3', '4', '24', '25']
filenames_1000m: list = ['tf2019071182739.FY3D-X_MERSI_1000M_L1B.HDF', 'tf2019071182739.FY3D-X_MERSI_GEO1K_L1B.HDF']
filenames_250m: list = ['tf2019071182739.FY3D-X_MERSI_0250M_L1B.HDF', 'tf2019071182739.FY3D-X_MERSI_GEOQK_L1B.HDF']
filenames_all: list = ['tf2019071182739.FY3D-X_MERSI_1000M_L1B.HDF', 'tf2019071182739.FY3D-X_MERSI_GEO1K_L1B.HDF', 'tf2019071182739.FY3D-X_MERSI_0250M_L1B.HDF', 'tf2019071182739.FY3D-X_MERSI_GEOQK_L1B.HDF']
ir_1000_bands: list = ['20', '21', '23']
ir_250_bands: list = ['24', '25']
vis_1000_bands: list = ['5', '8', '9', '11', '15', '17', '19']
vis_250_bands: list = ['1', '2', '3', '4']
yaml_file: str = 'mersi2_l1b.yaml'
class satpy.tests.reader_tests.test_mersi_l1b.TestFY3EMERSIllL1B[source]

Bases: MERSI12llL1BTester

Test the FY3D MERSI2 L1B reader.

bands_1000: list = ['1', '2', '3', '5']
bands_250: list = ['6', '7']
filenames_1000m: list = ['FY3E_MERSI_GRAN_L1_20230410_1910_1000M_V0.HDF', 'FY3E_MERSI_GRAN_L1_20230410_1910_GEO1K_V0.HDF']
filenames_250m: list = ['FY3E_MERSI_GRAN_L1_20230410_1910_0250M_V0.HDF', 'FY3E_MERSI_GRAN_L1_20230410_1910_GEOQK_V0.HDF']
filenames_all: list = ['FY3E_MERSI_GRAN_L1_20230410_1910_1000M_V0.HDF', 'FY3E_MERSI_GRAN_L1_20230410_1910_GEO1K_V0.HDF', 'FY3E_MERSI_GRAN_L1_20230410_1910_0250M_V0.HDF', 'FY3E_MERSI_GRAN_L1_20230410_1910_GEOQK_V0.HDF']
ir_1000_bands: list = ['2', '3', '5']
ir_250_bands: list = ['6', '7']
vis_1000_bands: list = ['1']
vis_250_bands: list = []
yaml_file: str = 'mersi_ll_l1b.yaml'
class satpy.tests.reader_tests.test_mersi_l1b.TestMERSIRML1B[source]

Bases: MERSIL1BTester

Test the FY3E MERSI-RM L1B reader.

filenames_500m = ['FY3G_MERSI_GRAN_L1_20230410_1910_0500M_V1.HDF', 'FY3G_MERSI_GRAN_L1_20230410_1910_GEOHK_V1.HDF']
test_500m_resolution()[source]

Test loading data when all resolutions are available.

test_rad_calib()[source]

Test loading data at radiance calibration.

yaml_file = 'mersi_rm_l1b.yaml'
satpy.tests.reader_tests.test_mersi_l1b._assert_bands_mda_as_exp(res, band_list, exp_result)[source]

Remove test code duplication.

satpy.tests.reader_tests.test_mersi_l1b._get_1km_data(num_scans, rows_per_scan, num_cols, filetype_info)[source]
satpy.tests.reader_tests.test_mersi_l1b._get_250m_data(num_scans, rows_per_scan, num_cols, filetype_info)[source]
satpy.tests.reader_tests.test_mersi_l1b._get_250m_ll_data(num_scans, rows_per_scan, num_cols)[source]
satpy.tests.reader_tests.test_mersi_l1b._get_500m_data(num_scans, rows_per_scan, num_cols)[source]
satpy.tests.reader_tests.test_mersi_l1b._get_calibration(num_scans, ftype)[source]
satpy.tests.reader_tests.test_mersi_l1b._get_geo_data(num_scans, rows_per_scan, num_cols, prefix)[source]
satpy.tests.reader_tests.test_mersi_l1b._test_find_files_and_readers(reader_config, filenames)[source]

Test file and reader search.

satpy.tests.reader_tests.test_mersi_l1b._test_multi_resolutions(available_datasets, band_list, test_resolution, cal_results_number)[source]

Test some bands have multiple resolutions.

satpy.tests.reader_tests.test_mersi_l1b.make_test_data(dims)[source]

Make test data.