def test_joint_class_to_flux(): classes = ['A3.49', 'A0.23', 'M1', 'X2.3', 'M5.8', 'C2.3', 'B3.45', 'X20'] for c in classes: assert c == goes.flux_to_flareclass(goes.flareclass_to_flux(c))
def test_class_to_flux(): classes = ['A3.49', 'A0.23', 'M1', 'X2.3', 'M5.8', 'C2.3', 'B3.45', 'X20'] results = Quantity( [3.49e-8, 2.3e-9, 1e-5, 2.3e-4, 5.8e-5, 2.3e-6, 3.45e-7, 2e-3], 'W/m2') for c, r in zip(classes, results): assert_almost_equal(r.value, goes.flareclass_to_flux(c).value)
def test_class_to_flux(): classes = ['A3.49', 'A0.23', 'M1', 'X2.3', 'M5.8', 'C2.3', 'B3.45', 'X20'] results = Quantity([3.49e-8, 2.3e-9, 1e-5, 2.3e-4, 5.8e-5, 2.3e-6, 3.45e-7, 2e-3], 'W/m2') for c, r in zip(classes, results): assert_almost_equal(r.value, goes.flareclass_to_flux(c).value)