match_coordinates_3d#
- astropy.coordinates.match_coordinates_3d(matchcoord, catalogcoord, nthneighbor=1, storekdtree='kdtree_3d')[源代码]#
查找目录坐标集中一个或多个坐标的最接近的三维匹配。
这将找到三维最近的邻居,它与天空中的距离不同,如果
distance设置为matchcoord或catalogcoord.- 参数:
- 火柴 :
BaseCoordinateFrame或SkyCoordBaseCoordinateFrame或SkyCoord 要与目录匹配的坐标。
- 目录坐标 :
BaseCoordinateFrame或SkyCoordBaseCoordinateFrame或SkyCoord 要在其中搜索匹配项的基目录。通常这是一个坐标对象,它是一个数组(即。,
catalogcoord.isscalar == False)- nthneighbor :
int,可选PYTHON:int,可选 Which closest neighbor to search for. Typically
1is 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 (1is inappropriate because each point will find itself as the closest match).- storekdtree : bool 或
str,可选Bool或python:str,可选 如果是字符串,则将用于计算的KD树存储在
catalogcoord,如catalogcoord.cache使用提供的名称。这大大加快了使用相同目录的后续调用。如果为False,则KD树在使用后被丢弃。
- 火柴 :
- 返回:
- idx :
intarrayPython:整型数组 索引
catalogcoord得到每个匹配点matchcoord. 形状匹配matchcoord.- sep2d公司 :
Angle角度 在天空中,每一个最接近匹配的间隔
matchcoord以及matchcoord. 形状匹配matchcoord.- dist3d :
Quantity[:ref: 'length' ]数量 [:ref: 'length'] 最接近匹配项之间的三维距离
matchcoord以及matchcoord. 形状匹配matchcoord.
- idx :
笔记
此功能需要 SciPy 否则它将失败。