diff --git a/src/legendhpges/base.py b/src/legendhpges/base.py index 0f95e95..6dbc45e 100644 --- a/src/legendhpges/base.py +++ b/src/legendhpges/base.py @@ -220,4 +220,6 @@ def surface_area(self, surface_indices: list | None = None) -> Quantity: r = r[surface_indices] z = z[surface_indices] - return np.sum(np.where(dr == 0, abs(dz) * r[:-1] * 2 * np.pi, abs(dr) * dl * np.pi)) + return np.sum( + np.where(dr == 0, abs(dz) * r[:-1] * 2 * np.pi, abs(dr) * dl * np.pi) + ) diff --git a/tests/test_det_properties.py b/tests/test_det_properties.py index e783977..c2dbdeb 100644 --- a/tests/test_det_properties.py +++ b/tests/test_det_properties.py @@ -2,7 +2,6 @@ import pathlib -import numpy as np import pytest from legendmeta import TextDB from legendtestdata import LegendTestData @@ -29,6 +28,5 @@ def test_surface_area(test_data_configs): reg = geant4.Registry() gedet = make_hpge(test_data_configs + "/C99000A.json", registry=reg) - assert gedet.surface_area(surface_indices=[])==0 - assert gedet.surface_area(surface_indices=None)>0 - + assert gedet.surface_area(surface_indices=[]) == 0 + assert gedet.surface_area(surface_indices=None) > 0