match_coordinates_sky#

astropy.coordinates.match_coordinates_sky(matchcoord, catalogcoord, nthneighbor=1, storekdtree='kdtree_sky')[源代码]#

查找目录坐标集中一个或多个坐标的最近天空匹配。

这将找到天空上最近的邻居,它与三维匹配的唯一区别是 distance 设置为 matchcoordcatalogcoord .

参数:
火柴BaseCoordinateFrameSkyCoordBaseCoordinateFrame或SkyCoord

要与目录匹配的坐标。

目录坐标BaseCoordinateFrameSkyCoordBaseCoordinateFrame或SkyCoord

要在其中搜索匹配项的基目录。通常这是一个坐标对象,它是一个数组(即。, catalogcoord.isscalar == False

nthneighbor : int ,可选PYTHON:int,可选

Which closest neighbor to search for. Typically 1 is desired here, as that is correct for matching one set of coordinates to another. The next likely use case is 2, for matching a coordinate catalog against itself (1 is inappropriate because each point will find itself as the closest match).

storekdtree : boolstr ,可选Bool或python:str,可选

如果是字符串,则将用于计算的KD树存储在 catalogcoord 在里面 catalogcoord.cache 使用提供的名称。这大大加快了使用相同目录的后续调用。如果为False,则KD树在使用后被丢弃。

返回:
idx : int arrayPython:整型数组

索引 catalogcoord 得到每个匹配点 matchcoord . 形状匹配 matchcoord .

sep2d公司Angle角度

在天空中,每一个最接近匹配的间隔 matchcoord 以及 matchcoord . 形状匹配 matchcoord .

dist3d : Quantity [:ref: 'length' ]数量 [:ref: 'length']

最接近匹配项之间的三维距离 matchcoord 以及 matchcoord . 形状匹配 matchcoord . 如果任一 matchcoordcatalogcoord 没有距离,这是单位球体上的三维距离,而不是真实距离。

笔记

此功能需要 SciPy 否则它将失败。