Skip to content

Commit

Permalink
pass kwargs to skyview
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Aug 25, 2024
1 parent 9ce8444 commit c530136
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions astroplan/plots/finder.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
@u.quantity_input(fov_radius=u.deg)
def plot_finder_image(target, survey='DSS', fov_radius=10*u.arcmin,
log=False, ax=None, grid=False, reticle=False,
style_kwargs=None, reticle_style_kwargs=None):
style_kwargs=None, reticle_style_kwargs=None,
skyview_kwargs={}
):
"""
Plot survey image centered on ``target``.
Expand Down Expand Up @@ -48,6 +50,9 @@ def plot_finder_image(target, survey='DSS', fov_radius=10*u.arcmin,
The `~matplotlib.axes.Axes` object to be drawn on.
If None, uses the current `~matplotlib.axes.Axes`.
grid : bool, optional.
Grid is drawn if `True`. `False` by default.
reticle : bool, optional
Draw reticle on the center of the FOV if `True`. Default is `False`.
Expand All @@ -59,6 +64,11 @@ def plot_finder_image(target, survey='DSS', fov_radius=10*u.arcmin,
A dictionary of keywords passed into `~matplotlib.pyplot.axvline` and
`~matplotlib.pyplot.axhline` to set reticle style.
skyview_kwargs : dict or `None`, optional.
A dictionary of keywords passed into
`~astroquery.skyview.SkyView.get_images` to set parameters of the
retrieved image.
Returns
-------
ax : `~matplotlib.axes.Axes`
Expand All @@ -83,7 +93,8 @@ def plot_finder_image(target, survey='DSS', fov_radius=10*u.arcmin,
target_name = None if isinstance(target, SkyCoord) else target.name

hdu = SkyView.get_images(position=position, coordinates=coordinates,
survey=survey, radius=fov_radius)[0][0]
survey=survey, radius=fov_radius,
**skyview_kwargs)[0][0]
wcs = WCS(hdu.header)

# Set up axes & plot styles if needed.
Expand Down

0 comments on commit c530136

Please sign in to comment.