diff --git a/tests/data/apical.yaml b/tests/data/apical.yaml index d6b37db..a27668e 100644 --- a/tests/data/apical.yaml +++ b/tests/data/apical.yaml @@ -1,24 +1,24 @@ 14a03569d26b949692e5dfe8cb1855fe: -- 5.5464959144592285 -- 113.9891357421875 -- -2.365058422088623 +- 4.3279709815979 +- 59.805320739746094 +- -0.6919530630111694 216363698b529b4a97b750923ceb3ffd: -- -4.380718231201172 -- 116.65441131591797 -- 6.396718978881836 +- -70.52275085449219 +- 129.78277587890625 +- -7.857072830200195 4462ebfc5f915ef09cfbac6e7687a66e: -- -44.474491119384766 -- 68.06861877441406 -- -7.087465286254883 +- 1.484359622001648 +- 52.40570831298828 +- -4.806603908538818 87751d4ca8501e2c44dcda6a797d76de: -- 4.237551689147949 -- 369.3919677734375 -- -0.3368062376976013 +- 13.616881370544434 +- 252.8784942626953 +- 4.428127288818359 e3e70682c2094cac629f6fbed82c07cd: -- -5.780806541442871 -- 164.6251678466797 -- 0.9229676723480225 +- -14.571318626403809 +- 114.34882354736328 +- 6.069221019744873 e8d79f49af6d114c4a6f188a424e617b: -- -28.59885025024414 -- 215.1460723876953 -- -12.506669998168945 +- -77.39925384521484 +- 345.1856994628906 +- -33.771915435791016 diff --git a/tests/data/apical_NRN_sections.yaml b/tests/data/apical_NRN_sections.yaml index 8f35849..18ecea6 100644 --- a/tests/data/apical_NRN_sections.yaml +++ b/tests/data/apical_NRN_sections.yaml @@ -1,12 +1,12 @@ 14a03569d26b949692e5dfe8cb1855fe: -- 9 +- 3 216363698b529b4a97b750923ceb3ffd: -- 9 +- 46 4462ebfc5f915ef09cfbac6e7687a66e: -- 12 +- 3 87751d4ca8501e2c44dcda6a797d76de: -- 35 +- 6 e3e70682c2094cac629f6fbed82c07cd: -- 50 +- 18 e8d79f49af6d114c4a6f188a424e617b: -- 20 +- 32 diff --git a/tests/data/apical_NRN_sections_no_axon.yaml b/tests/data/apical_NRN_sections_no_axon.yaml index 689248e..4d3a37a 100644 --- a/tests/data/apical_NRN_sections_no_axon.yaml +++ b/tests/data/apical_NRN_sections_no_axon.yaml @@ -1,28 +1,28 @@ 14a03569d26b949692e5dfe8cb1855fe: -- 9 +- 3 216363698b529b4a97b750923ceb3ffd: -- 9 +- 46 4462ebfc5f915ef09cfbac6e7687a66e: -- 12 +- 3 5bc8fbbcbde5c0994164d8399f767c45: -- 12 +- 3 6018366cf658f7a75ed34fe53a096533: -- 49 +- 3 6513270e269e0d37f2a74de452e6b438: -- 5 +- 56 7b89296c6dcbac5008577eb1924770d3: -- 5 +- 3 87751d4ca8501e2c44dcda6a797d76de: -- 35 +- 6 b8a1abcd1a6916c74da4f9fc3c6da5d7: -- 10 +- 58 cd613e30d8f16adf91b7584a2265b1f5: -- 6 +- 46 d95bafc8f2a4d27bdcf4bb99f4bea973: -- 3 +- 11 db5b5fab8f4d3e27dda1494c73cf256d: -- 7 +- 5 e3e70682c2094cac629f6fbed82c07cd: -- 50 +- 18 e8d79f49af6d114c4a6f188a424e617b: -- 20 +- 32 diff --git a/tests/data/apical_no_axon.yaml b/tests/data/apical_no_axon.yaml index 306c2d3..98737a0 100644 --- a/tests/data/apical_no_axon.yaml +++ b/tests/data/apical_no_axon.yaml @@ -1,56 +1,56 @@ 14a03569d26b949692e5dfe8cb1855fe: -- 5.5464959144592285 -- 113.9891357421875 -- -2.365058422088623 +- 4.3279709815979 +- 59.805320739746094 +- -0.6919530630111694 216363698b529b4a97b750923ceb3ffd: -- -4.380718231201172 -- 116.65441131591797 -- 6.396718978881836 +- -70.52275085449219 +- 129.78277587890625 +- -7.857072830200195 4462ebfc5f915ef09cfbac6e7687a66e: -- -44.474491119384766 -- 68.06861877441406 -- -7.087465286254883 +- 1.484359622001648 +- 52.40570831298828 +- -4.806603908538818 5bc8fbbcbde5c0994164d8399f767c45: -- -2.684163808822632 -- 112.33018493652344 -- 3.1389687061309814 +- 1.9180573225021362 +- 56.46493911743164 +- -4.888937473297119 6018366cf658f7a75ed34fe53a096533: -- -57.31629180908203 -- 105.37586975097656 -- -68.1922836303711 +- -1.085249662399292 +- 57.62152099609375 +- -4.8218231201171875 6513270e269e0d37f2a74de452e6b438: -- 0.15954150259494781 -- 112.9250717163086 -- -2.502075672149658 +- 8.458586692810059 +- 162.99160766601562 +- 4.474689960479736 7b89296c6dcbac5008577eb1924770d3: -- 0.4192541837692261 -- 57.192779541015625 -- 5.780771255493164 +- 0.7617863416671753 +- 57.46580123901367 +- 1.8977699279785156 87751d4ca8501e2c44dcda6a797d76de: -- 4.237551689147949 -- 369.3919677734375 -- -0.3368062376976013 +- 13.616881370544434 +- 252.8784942626953 +- 4.428127288818359 b8a1abcd1a6916c74da4f9fc3c6da5d7: -- -4.5237274169921875 -- 114.20574188232422 -- -1.732434630393982 +- -84.93132019042969 +- 116.4366455078125 +- -6.362834453582764 cd613e30d8f16adf91b7584a2265b1f5: -- -1.3810073137283325 -- 115.31499481201172 -- -1.1782004833221436 +- -71.48829650878906 +- 137.7943115234375 +- -5.734889030456543 d95bafc8f2a4d27bdcf4bb99f4bea973: -- 1.7359588146209717 -- 57.819026947021484 -- 0.7563515901565552 +- 7.555803298950195 +- 96.93486785888672 +- 2.7653095722198486 db5b5fab8f4d3e27dda1494c73cf256d: -- -45.093421936035156 -- 75.82533264160156 -- 6.015667915344238 +- -3.1312777996063232 +- 57.919647216796875 +- -0.5503649115562439 e3e70682c2094cac629f6fbed82c07cd: -- -5.780806541442871 -- 164.6251678466797 -- 0.9229676723480225 +- -14.571318626403809 +- 114.34882354736328 +- 6.069221019744873 e8d79f49af6d114c4a6f188a424e617b: -- -28.59885025024414 -- 215.1460723876953 -- -12.506669998168945 +- -77.39925384521484 +- 345.1856994628906 +- -33.771915435791016 diff --git a/tests/data/debug_data.pkl b/tests/data/debug_data.pkl index 0b2c747..b521d09 100644 Binary files a/tests/data/debug_data.pkl and b/tests/data/debug_data.pkl differ diff --git a/tests/test_cli.py b/tests/test_cli.py index 6e91d9d..718c7b1 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -196,28 +196,28 @@ def test_synthesize_morphologies( ) assert equal_infos.all() assert debug_data["apical_sections"].tolist() == [ - [72], + [55], None, - [23], + [46], None, - [42], + [49], None, - [38], + [62], None, - [67], - [74], + [34], + [49], ] assert debug_data["apical_NRN_sections"].tolist() == [ - [50], + [18], None, - [9], + [46], None, - [9], + [3], None, - [12], + [3], None, - [35], - [20], + [6], + [32], ] cols = ["apical_sections", "apical_NRN_sections", "apical_points", "debug_infos"] diff --git a/tests/test_modify.py b/tests/test_modify.py index edb79c7..587d952 100644 --- a/tests/test_modify.py +++ b/tests/test_modify.py @@ -140,9 +140,7 @@ def test_output_scaling_useless_min(self, root_sec): def test_output_scaling_min(self, root_sec): """Test with a min value that is greater than a few values (useful).""" - assert modify.output_scaling(root_sec, [0, 1, 0], 40.657597, None) == pytest.approx( - 1.7270042868523088 - ) + assert modify.output_scaling(root_sec, [0, 1, 0], 40.657597, None) == pytest.approx(1) def test_output_scaling_useless_max(self, root_sec): """Test with a max value that is greater than all values (useless).""" @@ -150,7 +148,9 @@ def test_output_scaling_useless_max(self, root_sec): def test_output_scaling_max(self, root_sec): """Test with a max value that is greater than a few values (useful).""" - assert modify.output_scaling(root_sec, [0, 1, 0], None, 27.105065) == pytest.approx(1) + assert modify.output_scaling(root_sec, [0, 1, 0], None, 27.105065) == pytest.approx( + 0.2607304228132 + ) def test_output_scaling_useless_min_useless_max(self, root_sec): """Test with an useless min value and useless max values.""" @@ -158,10 +158,12 @@ def test_output_scaling_useless_min_useless_max(self, root_sec): def test_output_scaling_useless_min_max(self, root_sec): """Test with an useless min value and useful max values.""" - assert modify.output_scaling(root_sec, [0, 1, 0], 1, 27.105065) == pytest.approx(1) + assert modify.output_scaling(root_sec, [0, 1, 0], 1, 27.105065) == pytest.approx( + 0.2607304228132 + ) def test_output_scaling_min_max(self, root_sec): """Test with an useful min value and useful max values.""" assert modify.output_scaling(root_sec, [0, 1, 0], 40.657597, 27.105065) == pytest.approx( - 1.7270042868523088 + 0.2607304228132996 ) diff --git a/tests/test_synthesize_morphologies.py b/tests/test_synthesize_morphologies.py index 590c4ec..09589d5 100644 --- a/tests/test_synthesize_morphologies.py +++ b/tests/test_synthesize_morphologies.py @@ -158,10 +158,10 @@ def test_synthesize( args["out_apical_nrn_sections"], ) if with_NRN and with_axon: - assert_allclose(max_y, 168.1047) + assert_allclose(max_y, 115.22123) else: if with_NRN and with_axon: - assert_allclose(max_y, 149.30412) + assert_allclose(max_y, 103.0715) def test_synthesize_empty_population( @@ -303,16 +303,16 @@ def test_synthesize_skip_write( "e8d79f49af6d114c4a6f188a424e617b", ] assert [[i[0].tolist()] if i else i for i in res["apical_points"].tolist()] == [ - [[-5.780806541442871, 164.6251678466797, 0.9229676723480225]], + [[-14.571318626403809, 114.34882354736328, 6.069221019744873]], None, - [[-4.380718231201172, 116.65441131591797, 6.396718978881836]], + [[-70.52275085449219, 129.78277587890625, -7.857072830200195]], None, - [[5.5464959144592285, 113.9891357421875, -2.365058422088623]], + [[4.3279709815979, 59.805320739746094, -0.6919530630111694]], None, - [[-44.474491119384766, 68.06861877441406, -7.087465286254883]], + [[1.484359622001648, 52.40570831298828, -4.806603908538818]], None, - [[4.237551689147949, 369.3919677734375, -0.3368062376976013]], - [[-28.59885025024414, 215.1460723876953, -12.506669998168945]], + [[13.616881370544434, 252.8784942626953, 4.428127288818359]], + [[-77.39925384521484, 345.1856994628906, -33.771915435791016]], ] # Check that the morphologies were not written