satpy.tests.reader_tests.test_avhrr_l0_hrpt module

Tests for the hrpt reader.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.CalibratorPatcher(methodName='runTest')[source]

Bases: PygacPatcher

Patch pygac.

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.

_classSetupFailed = False
_class_cleanups = []
setUp() None[source]

Patch pygac’s calibration.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTChannel3(methodName='runTest')[source]

Bases: TestHRPTWithPatchedCalibratorAndFile

Test case for reading calibrated brightness temperature from hrpt data.

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.

_classSetupFailed = False
_class_cleanups = []
_get_channel_3a_counts()[source]

Get the channel 4 bt.

_get_channel_3a_reflectance()[source]

Get the channel 4 bt.

_get_channel_3b_bt()[source]

Get the channel 4 bt.

test_channel_3a_masking()[source]

Test that channel 3a is split correctly.

test_channel_3b_masking()[source]

Test that channel 3b is split correctly.

test_uncalibrated_channel_3a_masking()[source]

Test that channel 3a is split correctly.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTGetCalibratedBT(methodName='runTest')[source]

Bases: TestHRPTWithPatchedCalibratorAndFile

Test case for reading calibrated brightness temperature from hrpt data.

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.

_classSetupFailed = False
_class_cleanups = []
_get_channel_4_bt()[source]

Get the channel 4 bt.

test_calibrated_bt_values()[source]

Test the calibrated reflectance values.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTGetCalibratedReflectances(methodName='runTest')[source]

Bases: TestHRPTWithPatchedCalibratorAndFile

Test case for reading calibrated reflectances from hrpt data.

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.

_classSetupFailed = False
_class_cleanups = []
_get_channel_1_reflectance()[source]

Get the channel 1 reflectance.

test_calibrated_reflectances_values()[source]

Test the calibrated reflectance values.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTGetUncalibratedData(methodName='runTest')[source]

Bases: TestHRPTWithFile

Test case for reading uncalibrated hrpt data.

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.

_classSetupFailed = False
_class_cleanups = []
_get_channel_1_counts()[source]
test_get_dataset_returns_a_dataarray()[source]

Test that get_dataset returns a dataarray.

test_no_calibration_values_are_1()[source]

Test that the values of non-calibrated data is 1.

test_platform_name()[source]

Test that the platform name is correct.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTNavigation(methodName='runTest')[source]

Bases: TestHRPTWithFile

Test case for computing HRPT navigation.

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.

_classSetupFailed = False
_class_cleanups = []
_prepare_mocks(Orbital, SatelliteInterpolator, get_lonlatalt)[source]

Prepare the mocks.

setUp() None[source]

Set up the test case.

test_latitudes_are_returned(Orbital, compute_pixels, get_lonlatalt, SatelliteInterpolator)[source]

Check that latitudes are returned properly.

test_longitudes_are_returned(Orbital, compute_pixels, get_lonlatalt, SatelliteInterpolator)[source]

Check that latitudes are returned properly.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTReading(methodName='runTest')[source]

Bases: TestHRPTWithFile

Test case for reading hrpt data.

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.

_classSetupFailed = False
_class_cleanups = []
test_reading()[source]

Test that data is read.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTWithFile(methodName='runTest')[source]

Bases: TestCase

Test base class with writing a fake file.

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.

_classSetupFailed = False
_class_cleanups = []
_get_dataset(dataset_id)[source]
setUp() None[source]

Set up the test case.

tearDown() None[source]

Tear down the test case.

class satpy.tests.reader_tests.test_avhrr_l0_hrpt.TestHRPTWithPatchedCalibratorAndFile(methodName='runTest')[source]

Bases: CalibratorPatcher, TestHRPTWithFile

Test case with patched calibration routines and a synthetic file.

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.

_classSetupFailed = False
_class_cleanups = []
setUp() None[source]

Set up the test case.

tearDown()[source]

Tear down the test case.

satpy.tests.reader_tests.test_avhrr_l0_hrpt.fake_calibrate_solar(data, *args, **kwargs)[source]

Fake calibration.

satpy.tests.reader_tests.test_avhrr_l0_hrpt.fake_calibrate_thermal(data, *args, **kwargs)[source]

Fake calibration.