Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tdixon97 committed Nov 11, 2024
1 parent b976dac commit cc3330d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/legendhpges/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,15 +279,14 @@ def surface_area(self, surface_indices: list | None = None) -> list[Quantity]:
dr = np.array([r2 - r1 for r1, r2 in zip(r[:-1], r[1:])])
dz = np.array([z2 - z1 for z1, z2 in zip(z[:-1], z[1:])])
dl = np.sqrt(np.power(dr, 2) + np.power(dz, 2))
r0=r[:-1]
r0 = r[:-1]

if surface_indices is not None:
dr = dr[surface_indices]
dz = dz[surface_indices]
dl = dl[surface_indices]
r0 = r0[surface_indices]


return np.where(
dr == 0,
abs(dz) * r0 * 2 * np.pi * u.mm**2,
Expand Down

0 comments on commit cc3330d

Please sign in to comment.