|
1 | 1 | """
|
2 | 2 | Visualizaition functions related to 1D fieldlines
|
3 | 3 | """
|
4 |
| -import numpy as np |
5 |
| -import matplotlib.pyplot as plt |
6 |
| -from matplotlib.colors import Normalize |
7 | 4 | import astropy.units as u
|
8 |
| -from astropy.time import Time |
| 5 | +import matplotlib.pyplot as plt |
| 6 | +import numpy as np |
| 7 | + |
9 | 8 | from astropy.coordinates import SkyCoord
|
| 9 | +from astropy.time import Time |
10 | 10 | from astropy.visualization import ImageNormalize
|
11 |
| -from sunpy.map import GenericMap, make_fitswcs_header |
12 | 11 | from sunpy.coordinates import Helioprojective
|
13 | 12 | from sunpy.coordinates.ephemeris import get_earth
|
| 13 | +from sunpy.map import GenericMap, make_fitswcs_header |
14 | 14 |
|
15 |
| -from synthesizAR.util import is_visible, find_minimum_fov |
| 15 | +from synthesizAR.util import find_minimum_fov |
16 | 16 |
|
17 | 17 | __all__ = ['set_ax_lims', 'plot_fieldlines']
|
18 | 18 |
|
@@ -55,20 +55,13 @@ def plot_fieldlines(*coords,
|
55 | 55 | If True, draw the HGS grid
|
56 | 56 | axes_limits : `tuple`, optional
|
57 | 57 | Tuple of world coordinates (axis1, axis2)
|
58 |
| -
|
59 |
| - Other Parameters |
60 |
| - ---------------- |
61 |
| - plot_kwargs : `dict` |
| 58 | + plot_kwargs : `dict`, optional |
62 | 59 | Additional parameters to pass to `~matplotlib.pyplot.plot` when
|
63 | 60 | drawing field lines.
|
64 |
| - grid_kwargs : `dict` |
| 61 | + grid_kwargs : `dict`, optional |
65 | 62 | Additional parameters to pass to `~sunpy.map.Map.draw_grid`
|
66 |
| - imshow_kwargs : `dict` |
| 63 | + imshow_kwargs : `dict`, optional |
67 | 64 | Additional parameters to pass to `~sunpy.map.Map.plot`
|
68 |
| -
|
69 |
| - See Also |
70 |
| - -------- |
71 |
| - synthesizAR.util.is_visible |
72 | 65 | """
|
73 | 66 | plot_kwargs = {'color': 'k', 'lw': 1}
|
74 | 67 | grid_kwargs = {'grid_spacing': 10*u.deg, 'color': 'k', 'alpha': 0.75}
|
@@ -100,7 +93,7 @@ def plot_fieldlines(*coords,
|
100 | 93 | for coord in coords:
|
101 | 94 | c = coord.transform_to(image_map.coordinate_frame)
|
102 | 95 | if check_visible:
|
103 |
| - c = c[is_visible(c, image_map.observer_coordinate)] |
| 96 | + c = c[c.is_visible()] |
104 | 97 | transformed_coords.append(c)
|
105 | 98 | if len(c) == 0:
|
106 | 99 | continue # Matplotlib throws exception when no points are visible
|
|
0 commit comments