Skip to content

Commit

Permalink
Merge pull request #144 from KentWheeler/master
Browse files Browse the repository at this point in the history
Added testing for mets_part_differentials
  • Loading branch information
BatchelorJ authored Feb 14, 2023
2 parents 097b9a8 + 952179c commit 4d6d0a7
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions geodepy/tests/test_survey.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import unittest
from geodepy.convert import DMSAngle
from geodepy.survey import (first_vel_params, first_vel_corrn,
precise_inst_ht, va_conv, radiations, joins)

from geodepy.survey import (first_vel_params, first_vel_corrn,
mets_partial_differentials, precise_inst_ht,
va_conv, radiations, joins)

class TestSurveyConvert(unittest.TestCase):
def test_first_vel_params(self):
Expand All @@ -25,6 +25,22 @@ def test_first_vel_corrn(self):
obs_pressure, obs_relative_humidity)
corrected_obs_distance = raw_obs_distance + correction
self.assertEqual(round(corrected_obs_distance, 4), 1117.8624)

def test_mets_partial_differentials(self):
group_ref_Index = 1.00028
temp = 15
pressure = 1013.25
rel_humidity = 60
K = round(0.91973804217265260,2)
L = round(0.2619533756724471,2)
M = round(0.03911157383307305,2)
differ_new = mets_partial_differentials(group_ref_Index,
temp,
pressure,
rel_humidity)
self.assertEqual(round(differ_new[0], 2), K)
self.assertEqual(round(differ_new[1], 2), L)
self.assertEqual(round(differ_new[2], 2), M)

def test_va_conv(self):
test1 = va_conv(92.24305555555556, 2116.254)
Expand Down

0 comments on commit 4d6d0a7

Please sign in to comment.