specdb.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:specdb 作者: specdb 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号