Skip to content

Commit

Permalink
Correct values for the densities.
Browse files Browse the repository at this point in the history
  • Loading branch information
romulogoncalves committed Jan 25, 2018
1 parent 82ef159 commit 50f25d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions laserchicken/test_density.py
Expand Up @@ -18,7 +18,7 @@ def test_area_density_pc_None_Rad():
@staticmethod
def test_area_density_pc_rad_None():
""" None input raises Value Error. """
assert_pc_none_rad_raises_value_error(area_density)
assert_pc_none_rad_raises_value_error(area_density_rad)

@staticmethod
def test_area_density_pc_rad_Neg():
Expand All @@ -42,7 +42,7 @@ def test_area_density_pc_rad():
""" Selecting all points within a Polygon. """
pc_in = read_las.read("testdata/AHN2.las")
density = area_density_rad(pc_in, 75)
assert (density == 1212)
assert (density == 10.335196620948473)

class TestVolumneDensity(unittest.TestCase):
@staticmethod
Expand All @@ -53,7 +53,7 @@ def test_volume_density_pc_None():
@staticmethod
def test_volume_density_pc_None_Rad():
""" None input raises Value Error. """
assert_none_pc_rad_raises_value_error(volume_density)
assert_none_pc_rad_raises_value_error(volume_density_rad)

@staticmethod
def test_volume_density_pc_rad_None():
Expand All @@ -75,14 +75,14 @@ def test_volume_density_pc():
""" Selecting all points within a Polygon. """
pc_in = read_las.read("testdata/AHN2.las")
density = volume_density(pc_in)
assert(density == 6.868558718435157)
assert(density == 0.7986696184226926)

@staticmethod
def test_volume_density_pc_rad():
""" Selecting all points within a Polygon. """
pc_in = read_las.read("testdata/AHN2.las")
density = volume_density_rad(pc_in, 75)
assert (density == 1212)
assert (density == 1.201767048947497)


def assert_none_pc_raises_value_error(function):
Expand Down

0 comments on commit 50f25d0

Please sign in to comment.