diff --git a/geomagio/ChannelConverter_test.py b/geomagio/ChannelConverter_test.py index 00fe4bb6e5f98beae82402d369ff52b2f0a1277a..0c33b4b04b6f5cec4ad957a58eb36b412f204694 100644 --- a/geomagio/ChannelConverter_test.py +++ b/geomagio/ChannelConverter_test.py @@ -45,6 +45,21 @@ class ChannelConverterTest: length to be cos(angle) and the opposite length to be sin(angle) """ + def test_get_computed_f_using_sqaures(self): + """geomag.ChannelConverterTest.test_get_computed_f_using_sqaures + + Computed f is the combination of the 3 vector components from + either the geographic coordinate system (X,Y,Z), or the observatory + coordinate system (h,e,z). + """ + h = 2 + e = 2 + z = 2 + fv = channel.get_computed_f_using_squares(h, e, z) + fs = math.sqrt(12) + assert_almost_equal(fv, fs, 8, 'Expect fv to almost equal sqrt(12)', + True) + def test_get_geo_from_obs(self): """geomag.ChannelConverterTest.test_get_geo_from_obs()