match_coordinates_sky#
- astropy.coordinates.match_coordinates_sky(matchcoord, catalogcoord, nthneighbor=1, storekdtree='kdtree_sky')[源代码]#
查找目录坐标集中一个或多个坐标的最近天空匹配。
这将找到天空上最近的邻居,它与三维匹配的唯一区别是
distance
设置为matchcoord
或catalogcoord
.- 参数:
- 火柴 :
BaseCoordinateFrame
或SkyCoord
BaseCoordinateFrame或SkyCoord 要与目录匹配的坐标。
- 目录坐标 :
BaseCoordinateFrame
或SkyCoord
BaseCoordinateFrame或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 is2
, for matching a coordinate catalog against itself (1
is inappropriate because each point will find itself as the closest match).- storekdtree : bool 或
str
,可选Bool或python:str,可选 如果是字符串,则将用于计算的KD树存储在
catalogcoord
在里面catalogcoord.cache
使用提供的名称。这大大加快了使用相同目录的后续调用。如果为False,则KD树在使用后被丢弃。
- 火柴 :
- 返回:
- idx :
int
array
Python:整型数组 索引
catalogcoord
得到每个匹配点matchcoord
. 形状匹配matchcoord
.- sep2d公司 :
Angle
角度 在天空中,每一个最接近匹配的间隔
matchcoord
以及matchcoord
. 形状匹配matchcoord
.- dist3d :
Quantity
[:ref: 'length' ]数量 [:ref: 'length'] 最接近匹配项之间的三维距离
matchcoord
以及matchcoord
. 形状匹配matchcoord
. 如果任一matchcoord
或catalogcoord
没有距离,这是单位球体上的三维距离,而不是真实距离。
- idx :
笔记
此功能需要 SciPy 否则它将失败。