diff --git a/solarmach/__init__.py b/solarmach/__init__.py index 7c01c0b..51b899c 100644 --- a/solarmach/__init__.py +++ b/solarmach/__init__.py @@ -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], @@ -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], diff --git a/solarmach/pfss_utilities.py b/solarmach/pfss_utilities.py index 33d284f..9f6541c 100644 --- a/solarmach/pfss_utilities.py +++ b/solarmach/pfss_utilities.py @@ -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)