search_around_sky#
- astropy.coordinates.search_around_sky(coords1, coords2, seplimit, storekdtree='kdtree_sky')[源代码]#
搜索角度间隔至少与指定角度接近的点对。
这适用于具有坐标数组的坐标对象,而不是标量。对于标量坐标,最好使用
separation
方法。- 参数:
- coords1 : astropy:coordinate-like占星体:类似于坐标
第一组坐标,将从中搜索匹配项
coords2
在内部seplimit
. 不能是标量坐标。- coords2 : astropy:coordinate-like占星体:类似于坐标
第二组坐标,将从中搜索匹配项
coords1
在内部seplimit
. 不能是标量坐标。- seplimit :
Quantity
[:ref: 'angle' ]数量 [:ref: 'angle'] 在天际分离中寻找。
- storekdtree : bool 或
str
,可选Bool或python:str,可选 如果是一个字符串,将存储KD树在搜索中使用的名称
storekdtree
在里面coords2.cache
. 这将加快对该函数的后续调用。如果为False,则不会保存KD树。
- 返回:
- idx1 :
int
array
Python:整型数组 索引
coords1
与的对应元素相匹配idx2
. 形状匹配idx2
.- idx2 :
int
array
Python:整型数组 索引
coords2
与的对应元素相匹配idx1
. 形状匹配idx1
.- sep2d公司 :
Angle
角度 在天空中坐标之间的间隔。形状匹配
idx1
和idx2
.- dist3d :
Quantity
[:ref: 'length' ]数量 [:ref: 'length'] 坐标之间的三维距离。形状匹配
idx1
和idx2
;单位为coords1
. 如果任一coords1
或coords2
没有距离,这是单位球体上的三维距离,而不是物理距离。
- idx1 :
笔记
此功能需要 SciPy 否则它将失败。
在当前实现中,返回值的排序顺序始终与
coords1
(所以idx1
以升序排列)。不过,这被认为是一个实现细节,因此它可能在将来的版本中更改。