File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535MILLIGRAMS_PER_LITER = "mg/L"
3636MICROGRAMS_PER_LITER = "ug/L"
3737PARTS_PER_MILLION = "ppm"
38+ PARTS_PER_BILLION = "ppb"
3839TONS_PER_ACRE_FOOT = "tons/ac ft"
3940FEET = "ft"
4041METERS = "m"
Original file line number Diff line number Diff line change 2323from backend .constants import (
2424 MILLIGRAMS_PER_LITER ,
2525 PARTS_PER_MILLION ,
26+ PARTS_PER_BILLION ,
2627 FEET ,
2728 METERS ,
2829 TONS_PER_ACRE_FOOT ,
@@ -181,6 +182,7 @@ def convert_units(
181182 mgl = MILLIGRAMS_PER_LITER .lower ()
182183 ugl = MICROGRAMS_PER_LITER .lower ()
183184 ppm = PARTS_PER_MILLION .lower ()
185+ ppb = PARTS_PER_BILLION .lower ()
184186 tpaf = TONS_PER_ACRE_FOOT .lower ()
185187 ft = FEET .lower ()
186188 m = METERS .lower ()
@@ -210,7 +212,7 @@ def convert_units(
210212 conversion_factor = 0.004427
211213 elif input_units == "pci/l" :
212214 conversion_factor = 0.00149
213- elif input_units == ugl :
215+ elif input_units in ( ugl , ppb ) :
214216 conversion_factor = 0.001
215217 elif input_units == tpaf :
216218 conversion_factor = 735.47
You can’t perform that action at this time.
0 commit comments