Skip to content

Commit

Permalink
clean-up utils
Browse files Browse the repository at this point in the history
  • Loading branch information
mscheltienne committed Nov 7, 2024
1 parent 19e0260 commit c47d582
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mne_icalabel/megnet/_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# %%
import numpy as np


# Conversion functions
def cart2sph(x, y, z):
"""Convert cartesian coordinates to spherical coordinates."""
xy = np.sqrt(x * x + y * y)
r = np.sqrt(x * x + y * y + z * z)
theta = np.arctan2(y, x)
Expand All @@ -12,6 +11,7 @@ def cart2sph(x, y, z):


def pol2cart(rho, phi):
"""Convert polar coordinates to cartesian coordinates."""
x = rho * np.cos(phi)
y = rho * np.sin(phi)
return x, y
Expand Down

0 comments on commit c47d582

Please sign in to comment.