Skip to content

Commit

Permalink
Add comments to clarify coordinate transformations for Stonyhurst in …
Browse files Browse the repository at this point in the history
…SolarMACH
  • Loading branch information
jgieseler committed Nov 15, 2024
1 parent f434ae2 commit 4f05185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions solarmach/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,7 @@ def pfss_3d(self, active_area=(None, None, None, None), color_code='object', rss
str_number = None
symbol = 'square'

# SkyCoord transformed to cartesian correspond to HEEQ for Stonyhurst
fig.add_trace(go.Scatter3d(x=[(body_pos.cartesian.x.to(u.m)/R_sun).value],
y=[(body_pos.cartesian.y.to(u.m)/R_sun).value],
z=[(body_pos.cartesian.z.to(u.m)/R_sun).value],
Expand Down Expand Up @@ -2334,6 +2335,7 @@ def plot_3d(self, plot_spirals=True, plot_sun_body_line=True, markers=False, num
symbol = 'square'

# customdata=[[dist_body], [body_long], [body_lat]]
# SkyCoord transformed to cartesian correspond to HEEQ for Stonyhurst
fig.add_trace(go.Scatter3d(x=[body_pos.cartesian.x.value],
y=[body_pos.cartesian.y.value],
z=[body_pos.cartesian.z.value],
Expand Down
5 changes: 4 additions & 1 deletion solarmach/pfss_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,10 @@ def check_field_line_alignment(coordinates):

def spheric2cartesian(r, theta, phi):
"""
Does a coordinate transformation from spherical to cartesian
Does a coordinate transformation from spherical to cartesian.
For Stonyhurst heliographic coordinates, this means converting to HEEQ
(Heliocentric Earth Equatorial), following Eq. (2) of Thompson (2006),
DOI: 10.1051/0004-6361:20054262
r : the distance to the origin
theta : the elevation angle (goes from -pi to pi)
Expand Down

0 comments on commit 4f05185

Please sign in to comment.