satpy.tests.reader_tests.test_fci_l1c_nc module
Tests for the ‘fci_l1c_nc’ reader.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerAF(*args, **kwargs)[source]
Bases:
FakeFCIFileHandlerBase
Mock AF data.
Initiative fake file handler.
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerAF_fixture(channel, resolution)[source]
Get a fixture for the fake AF filehandler, it contains only one channel and one resolution.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerBase(*args, **kwargs)[source]
Bases:
FakeNetCDF4FileHandler
Class for faking the NetCDF4 Filehandler.
Initiative fake file handler.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerFDHSI(*args, **kwargs)[source]
Bases:
FakeFCIFileHandlerBase
Mock FDHSI data.
Initiative fake file handler.
- chan_patterns: Dict[str, Dict[str, List[int] | str]] = {'ir_{:>02d}': {'channels': [38, 87, 97, 105, 123, 133], 'grid_type': '2km'}, 'nir_{:>02d}': {'channels': [13, 16, 22], 'grid_type': '1km'}, 'vis_{:>02d}': {'channels': [4, 5, 6, 8, 9], 'grid_type': '1km'}, 'wv_{:>02d}': {'channels': [63, 73], 'grid_type': '2km'}}
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerFDHSIError_fixture()[source]
Get a fixture for the fake FDHSI filehandler, including channel and file names.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerFDHSIIQTI(*args, **kwargs)[source]
Bases:
FakeFCIFileHandlerFDHSI
Mock IQTI for FHDSI data.
Initiative fake file handler.
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerFDHSIIQTI_fixture()[source]
Get a fixture for the fake FDHSI IQTI filehandler, including channel and file names.
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerFDHSIQ4_fixture()[source]
Get a fixture for the fake FDHSI Q4 filehandler, including channel and file names.
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerFDHSI_fixture()[source]
Get a fixture for the fake FDHSI filehandler, including channel and file names.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerHRFI(*args, **kwargs)[source]
Bases:
FakeFCIFileHandlerBase
Mock HRFI data.
Initiative fake file handler.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerHRFIIQTI(*args, **kwargs)[source]
Bases:
FakeFCIFileHandlerHRFI
Mock IQTI for HRFI data.
Initiative fake file handler.
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerHRFIIQTI_fixture()[source]
Get a fixture for the fake HRFI IQTI filehandler, including channel and file names.
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerHRFIQ4_fixture()[source]
Get a fixture for the fake HRFI Q4 filehandler, including channel and file names.
- satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerHRFI_fixture()[source]
Get a fixture for the fake HRFI filehandler, including channel and file names.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeFCIFileHandlerWithBadData(*args, **kwargs)[source]
Bases:
FakeFCIFileHandlerFDHSI
Mock bad data.
Initiative fake file handler.
- class satpy.tests.reader_tests.test_fci_l1c_nc.FakeH5Variable(data, dims=(), attrs=None)[source]
Bases:
object
Class for faking h5netcdf.Variable class.
Initialize the class.
- property ndim
Get the number of dimensions.
- property shape
Get the shape.
- class satpy.tests.reader_tests.test_fci_l1c_nc.ModuleTestFCIL1cNcReader[source]
Bases:
object
Class containing parameters and modules useful for the test related to L1c reader.
- static _compare_rc_period_min_count_in_repeat_cycle(filetype, fh_param, reader_configs, compare_parameters_tuple)[source]
Test the count_in_repeat_cycle, rc_period_min.
- static _compare_sun_earth_distance(filetype, fh_param, reader_configs)[source]
Test the sun earth distance calculation.
- fh_param_for_filetype = {'fdhsi': {'channels': {'solar': ['vis_04', 'vis_05', 'vis_06', 'vis_08', 'vis_09', 'nir_13', 'nir_16', 'nir_22'], 'solar_grid_type': ['1km', '1km', '1km', '1km', '1km', '1km', '1km', '1km'], 'terran': ['ir_38', 'wv_63', 'wv_73', 'ir_87', 'ir_97', 'ir_105', 'ir_123', 'ir_133'], 'terran_grid_type': ['2km', '2km', '2km', '2km', '2km', '2km', '2km', '2km']}, 'filenames': ['W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--CHK-BODY--L2P-NC4E_C_EUMT_20170410114434_GTT_DEV_20170410113925_20170410113934_N__C_0070_0067.nc']}, 'fdhsi_iqti': {'channels': {'solar': ['vis_04', 'vis_05', 'vis_06', 'vis_08', 'vis_09', 'nir_13', 'nir_16', 'nir_22'], 'solar_grid_type': ['1km', '1km', '1km', '1km', '1km', '1km', '1km', '1km'], 'terran': ['ir_38', 'wv_63', 'wv_73', 'ir_87', 'ir_97', 'ir_105', 'ir_123', 'ir_133'], 'terran_grid_type': ['2km', '2km', '2km', '2km', '2km', '2km', '2km', '2km']}, 'filenames': ['W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-FD--CHK-BODY--MON-NC4_C_EUMT_20240307233956_IQTI_DEV_20231016125007_20231016125017_N__C_0078_0001.nc']}, 'fdhsi_q4': {'channels': {'solar': ['vis_04', 'vis_05', 'vis_06', 'vis_08', 'vis_09', 'nir_13', 'nir_16', 'nir_22'], 'solar_grid_type': ['1km', '1km', '1km', '1km', '1km', '1km', '1km', '1km'], 'terran': ['ir_38', 'wv_63', 'wv_73', 'ir_87', 'ir_97', 'ir_105', 'ir_123', 'ir_133'], 'terran_grid_type': ['2km', '2km', '2km', '2km', '2km', '2km', '2km', '2km']}, 'filenames': ['W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-FDHSI-Q4--CHK-BODY--DIS-NC4E_C_EUMT_20230723025408_IDPFI_DEV_20230722120000_20230722120027_N_JLS_C_0289_0001.nc']}, 'hrfi': {'channels': {'solar': ['vis_06', 'nir_22'], 'solar_grid_type': ['500m', '500m'], 'terran': ['ir_38', 'ir_105'], 'terran_grid_type': ['1km', '1km']}, 'filenames': ['W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-HRFI-FD--CHK-BODY--L2P-NC4E_C_EUMT_20170410114434_GTT_DEV_20170410113925_20170410113934_N__C_0070_0067.nc']}, 'hrfi_iqti': {'channels': {'solar': ['vis_06', 'nir_22'], 'solar_grid_type': ['500m', '500m'], 'terran': ['ir_38', 'ir_105'], 'terran_grid_type': ['1km', '1km']}, 'filenames': ['W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-HRFI-FD--CHK-BODY--MON-NC4_C_EUMT_20240307233956_IQTI_DEV_20231016125007_20231016125017_N__C_0078_0001.nc']}, 'hrfi_q4': {'channels': {'solar': ['vis_06', 'nir_22'], 'solar_grid_type': ['500m', '500m'], 'terran': ['ir_38', 'ir_105'], 'terran_grid_type': ['1km', '1km']}, 'filenames': ['W_XX-EUMETSAT-Darmstadt,IMG+SAT,MTI1+FCI-1C-RRAD-HRFI-Q4--CHK-BODY--DIS-NC4E_C_EUMT_20230723025408_IDPFI_DEV_20230722120000_20230722120027_N_JLS_C_0289_0001.nc']}}
- class satpy.tests.reader_tests.test_fci_l1c_nc.TestFCIL1cNCReader[source]
Bases:
ModuleTestFCIL1cNcReader
Test FCI L1c NetCDF reader with nominal data.
- test_area_definition_computation(reader_configs, fh_param, expected_area)[source]
Test that the geolocation computation is correct.
- test_compute_earth_sun_parameter(reader_configs, fh_param)[source]
Test the computation of the sun_earth_parameter.
- test_compute_earth_sun_parameter_AF(FakeFCIFileHandlerAF_fixture, reader_configs, channel, resolution)[source]
Test the rc_period_min value for each configuration.
- test_count_in_repeat_cycle_rc_period_min(reader_configs, fh_param, compare_tuples)[source]
Test the rc_period_min value for each configuration.
- test_count_in_repeat_cycle_rc_period_min_AF(FakeFCIFileHandlerAF_fixture, reader_configs, channel, resolution, compare_tuples)[source]
Test the rc_period_min value for each configuration.
- test_file_pattern_for_TRAIL_file(reader_configs, filenames)[source]
Test file pattern matching for TRAIL files, which should not be picked up.
- test_get_segment_position_info(reader_configs, fh_param, expected_pos_info)[source]
Test the segment position info method.
- test_load_calibration(reader_configs, fh_param, caplog, calibration, res_type)[source]
Test loading with counts,radiance,reflectance and bt.
- test_load_calibration_af(FakeFCIFileHandlerAF_fixture, reader_configs, channel, calibration, caplog)[source]
Test loading with counts,radiance,reflectance and bt for AF files.
- test_load_calibration_negative_rad(reader_configs, fh_param)[source]
Test calibrating negative radiances.
- test_load_map_and_pixel(reader_configs, fh_param, expected_res_n, calibration)[source]
Test loading of index_map and pixel_quality.
- test_load_map_and_pixel_af(FakeFCIFileHandlerAF_fixture, reader_configs, channel, calibration)[source]
Test loading with of index_map and pixel_quality for AF files.
- test_not_get_segment_info_called_af(FakeFCIFileHandlerAF_fixture, reader_configs, channel, resolution)[source]
Test that checks that the get_segment_position_info has not been called for AF data.
- test_orbital_parameters_attr(reader_configs, fh_param)[source]
Test the orbital parameter attribute.
- class satpy.tests.reader_tests.test_fci_l1c_nc.TestFCIL1cNCReaderBadData[source]
Bases:
object
Test the FCI L1c NetCDF Reader for bad data input.
- satpy.tests.reader_tests.test_fci_l1c_nc._get_reader_with_filehandlers(filenames, reader_configs, **reader_kwargs)[source]
- satpy.tests.reader_tests.test_fci_l1c_nc._get_test_geolocation_for_channel(data, ch_str, grid_type, n_rows_cols)[source]
- satpy.tests.reader_tests.test_fci_l1c_nc._get_test_image_data_for_channel(data, ch_str, n_rows_cols)[source]
- satpy.tests.reader_tests.test_fci_l1c_nc._get_test_index_map_for_channel(data, ch_str, n_rows_cols)[source]
- satpy.tests.reader_tests.test_fci_l1c_nc._get_test_pixel_quality_for_channel(data, ch_str, n_rows_cols)[source]
- satpy.tests.reader_tests.test_fci_l1c_nc._get_test_segment_position_for_channel(data, ch_str, n_rows_cols)[source]
- satpy.tests.reader_tests.test_fci_l1c_nc.clear_cache(reader)[source]
Clear the cache for file handlres in reader.
- satpy.tests.reader_tests.test_fci_l1c_nc.fill_chans_af()[source]
Fill the dict CHANS_AF and the list TEST_FILENAMES with the right channel and resolution.
- satpy.tests.reader_tests.test_fci_l1c_nc.generate_parameters(calibration)[source]
Generate dynamically the parameters.
- satpy.tests.reader_tests.test_fci_l1c_nc.get_list_channel_calibration(calibration)[source]
Get the channel’s list according the calibration.