Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Commit 80034ab

Browse files
authored
Merge pull request #347 from dstansby/err-map-clean
Clean error map exampel
2 parents 769a8cc + ec24dee commit 80034ab

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

examples/testing/plot_error_map.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""
2-
Analytic dipole field lines
3-
===========================
2+
Field line error map
3+
====================
4+
This script produces a map of errors between analytic field line equations
5+
and field lines numerically traced by pfsspy.
46
"""
57
import astropy.constants as const
68
import astropy.units as u
@@ -15,10 +17,6 @@
1517

1618
quantity_support()
1719

18-
19-
###############################################################################
20-
# Compare the the pfsspy solution to the analytic solutions. Cuts are taken
21-
# on the source surface at a constant phi value to do a 1D comparison.
2220
l = 3
2321
m = 3
2422
nphi = 360
@@ -33,7 +31,7 @@
3331

3432
rss = rss * const.R_sun
3533
###############################################################################
36-
# Trace some field lines
34+
# Trace field lines
3735
n = 90
3836
# Create 1D theta, phi arrays
3937
phi = np.linspace(0, 360, n * 2)
@@ -72,13 +70,6 @@
7270
theta_analytic = theta_fline_coords(r_out, rss, l, m, theta)
7371
dtheta = theta_solar - theta_analytic
7472

75-
fig, axs = plt.subplots(nrows=2, sharex=True)
76-
axs[0].scatter(phi_solar.to(u.deg), phi_analytic.to(u.deg), label='phi')
77-
axs[1].scatter(theta_solar.to(u.deg), theta_analytic.to(u.deg), label='theta')
78-
[ax.legend() for ax in axs]
79-
80-
###########################################################################
81-
# Calculate analytical solution
8273
fig, axs = plt.subplots(nrows=2, sharex=True, sharey=True)
8374

8475

0 commit comments

Comments
 (0)