|
1 | 1 | """ |
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. |
4 | 6 | """ |
5 | 7 | import astropy.constants as const |
6 | 8 | import astropy.units as u |
|
15 | 17 |
|
16 | 18 | quantity_support() |
17 | 19 |
|
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. |
22 | 20 | l = 3 |
23 | 21 | m = 3 |
24 | 22 | nphi = 360 |
|
33 | 31 |
|
34 | 32 | rss = rss * const.R_sun |
35 | 33 | ############################################################################### |
36 | | -# Trace some field lines |
| 34 | +# Trace field lines |
37 | 35 | n = 90 |
38 | 36 | # Create 1D theta, phi arrays |
39 | 37 | phi = np.linspace(0, 360, n * 2) |
|
72 | 70 | theta_analytic = theta_fline_coords(r_out, rss, l, m, theta) |
73 | 71 | dtheta = theta_solar - theta_analytic |
74 | 72 |
|
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 |
82 | 73 | fig, axs = plt.subplots(nrows=2, sharex=True, sharey=True) |
83 | 74 |
|
84 | 75 |
|
|
0 commit comments