Astropy:非对称目录匹配结果

时间:2015-11-18 13:27:13

标签: python astropy

我正在为一个项目进行一些目录匹配,发现当使用astropy时,我得到的结果与用于坐标匹配的其他软件包(例如Topcat)相比是不同的。特别是,我不明白为什么以下代码会产生不对称结果

select ROUND(3.17 *  450 , 2); /* = 1426.50 */
select ROUND(3.17 * '450', 2); /* = 1426.50 */

select ROUND(3.17 *  450 ); /* = 1427 */
select ROUND(3.17 * '450'); /* = 1426 !? */

打印:import numpy as np from astropy.coordinates import match_coordinates_sky, SkyCoord # Get some random coordinates ra1, ra2 = np.random.uniform(80, 90, size=1E6), np.random.uniform(80, 90, size=1E6) dec1, dec2 = np.random.uniform(20, 30, size=1E6), np.random.uniform(20, 30, size=1E6) # Define SkyCoord instances c1 = SkyCoord(ra1, dec1, frame="icrs", unit="deg") c2 = SkyCoord(ra2, dec2, frame="icrs", unit="deg") # Do matching idx1, dis1, _ = match_coordinates_sky(c1, c2, nthneighbor=1) idx1 = idx1[dis1.arcsec < 2] idx2, dis2, _ = match_coordinates_sky(c2, c1, nthneighbor=1) idx2 = idx2[dis2.arcsec < 2] # Print results print(len(idx1), len(idx2))

在这里,我只需反转目录顺序并获得不同的结果。特别是,对于我的项目,差异要大得多,我不确定问题是什么。

谢谢!

1 个答案:

答案 0 :(得分:2)

使用它时的assets/例程不是对称的。例如:

assets/config/