“样本match”的版本间差异

来自Shiyin's note
跳到导航 跳到搜索
无编辑摘要
 
(未显示同一用户的6个中间版本)
第1行: 第1行:
==python==
==一维数组match==
ID1=list(zip(Brick,BOID))
[[astro_lib]]中的match和match2
ID2=list(zip(Brick2,BOID2))
*match,(数组中不能有重复)
xy,x_ind,y_ind=np.intersect1d(ID1,ID2,assume_unique=True,return_indices=True)
CALLING SEQUENCE:
参见[https://numpy.org/doc/stable/reference/generated/numpy.intersect1d.html]
match, a, b, suba, subb, [ COUNT =, /SORT, EPSILON = ]
''超大整数的match,比如SDSS的objID会出问题''


==[[idl中数组match]]==
*match2可以用在某一样本是另外一个样本的子样本,这样可以完全匹配
match2,a,b,suba,subb
如果a完全是b的子集,那么b[suba]=a

===多维数据的match===
:matchnd

==天球坐标的match==
*[[idlutils]]中的spherematch
:spherematch,Ra1,Dec1,Ra2,Dec2,matchlength,ID1,ID2,dis
:'''注意matchlength的单位是度'''

2023年7月17日 (一) 13:12的最新版本

python

ID1=list(zip(Brick,BOID))
ID2=list(zip(Brick2,BOID2))
xy,x_ind,y_ind=np.intersect1d(ID1,ID2,assume_unique=True,return_indices=True)

参见[1]

idl中数组match