def spectra_from_coord(self, inp, tol=0.5*u.arcsec, **kwargs):
""" Return spectra and meta data from an input coordinate
Radial search at that location within a small tolerance
Returns closet source if multiple are found
Warning: Only returns meta entires that have corresponding spectra
Parameters
----------
inp : str, tuple, SkyCoord
See linetools.utils.radec_to_coord
Only one coord may be input
tol : Angle or Quantity, optional
Search radius
kwargs :
fed to grab_specmeta
Returns
-------
spec : XSpectrum1D
All spectra corresponding to the closest source within tolerance
meta : Table
Meta data describing to spec
"""
# Grab meta
meta = self.meta_from_position(inp, tol, max_match=1, **kwargs)
if meta is None:
return None, None
# Grab spec and return
return self.spectra_from_meta(meta, subset=True)
评论列表
文章目录