1、数据下载:
(1)下载Brusa+2010,ApJ,716:248
“The XMM-Newton Wide-field Survey in the Cosmos Field
(XMM-COSMOS): Demography and Multiwavelength Properties of
Obscured and Unobscured Luminous Active Galactic Nuclei”
http://adsabs.harvard.edu/abs/2010ApJ...716..348B
Table 2 ==>
http://iopscience.iop.org/0004-637X/716/1/348/suppdata/apj341700t2_mrt.txt
==> AGN716_1_348.tbl
(2)下载George+2011,ApJ,742:125
“Galaxies in X-Ray Groups. I. Robust Membership Assignment
and the Impact of Group Environments on Quenching”
http://adsabs.harvard.edu/abs/2011ApJ...742..125G
电子版
Electronic
Refereed Journal Article (HTML) 6. Member Catalog
==>http://irsa.ipac.caltech.edu/Missions/cosmos.html
==> COSMOS Catalog Listing ==> Groups下载其中的
README_galaxies.txt和xg_galaxies.tbl
作为比较,另附:
(1)Cappelluti+2009 “The XMM-Newton wide-field
survey in the COSMOS field——The point-like X-ray
source catalogue”
1,887个 point-like X-ray source ==>
download······
(2)Allevato+2012 “Occupation of X-Ray-selected
Galaxy Groups by X-Ray Active Galactic Nuclei”
Table 2 “58 AGNs in Galaxy Groups”==>
download······
2、(1)将AGN716_1_348.tbl分成两个文件:前72行文字说明==>xAGN.head;73~最后一行数据==>xAGN.tbl(1,797行
,ref.
Brusa+2010 sec. 2.1. X-ray ……includes 1848 point-like
sources……)
(方法:vi
AGN716_1_348.tbl => :1,72w xAGN.head和:73,$w
xAGN.tbl)
(2)将xg_galaxies.tbl分成两个文件:前24行文字说明==>xg_gal.head;25~最后一行数据==>xg_gal.tbl
(115,844行)
(方法:vi
xg_galaxies.tbll => :1,24w xg_gal.head和:25,$w
xg_gal.tbl)
3、(1)在
xAGN.tbl表中挑选流量限制样本(第8列“Source
in flux limited sample?”-CFlag=1)+可靠的光学对应体(第11列“Optical
identification flag”-IFlag=1)+分类为AGN(第23列“Source
class”-Class=1或2)的样本==>
xAGN_BNL_lim.tbl(730行)
(方法:awk
'$8==1 && $11==1 && $23<2.5 && $23
>0' xAGN.tbl > xAGN_BNL_lim.tbl)
在红移0<z<1.0范围内,这730个AGN中有光学光谱证认的AGN有338个(338/730
~ 46.3%)
(方法:awk
'$22>0 && $22 <1.0' xAGN_BNL_lim.tbl |
wc)
运行frac_BNL_AGN.f
或直接用awk命令(awk
'$23==1' xAGN_BNL_lim.tbl |
wc)统计宽线AGN(Class=1)和窄线AGN(Class=2)比例==>BL
AGN(403,~55%);
NL
AGN(327,~45%)
(2)在xg_gal.tbl中挑选P_MEM_ZBEST
> 0的星系==>
xg_gal_p0.tbl
(7,984行)
(方法:awk
'$16>0.0' xg_gal.tbl > xg_gal_p0.tbl)
若选P_MEM
> 0的星系==>
xg_gal_p0.tbl
(8,644行)
(方法:awk
'$11>0.0' xg_gal.tbl > xg_gal_p0.tbl)
4、运行cross_id.f将
xAGN_BNL_lim.tbl和
xg_gal_p0.tbl根据ra、dec信息进行交叉证认==>
cross_agn_gal.tbl(43行)
说明:cross_agn_gal.tbl(43行)
表中选取的是id_group_zbest,P_mem_zbest,R_ratio_zbest
如果用P_MEM
>
0选出来的8,644个星系表xg_gal_p0.tbl和xAGN_BNL_lim.tbl交叉证认得到的cross_agn_gal.tbl(44行)
说明:cross_agn_gal.tbl(44行)
表中选取的是id_group,P_mem,R_ratio,并在S_Class后面增加一列mmggs(群内最大质量星系),类似于星系团里的cD星系,BCG星系),mmggs=1,yes;mmggs=0,no
5、
根据Pmem_zbest>0.1和|zAGN-zgroup|/(1+zgroup)>0.01这两个条件,运行sel_zbest_agn.f,在cross_agn_gal.tbl
中筛选出符合条件的数据==>sel_agn_gal.tbl(27行,其中id_group=124的有2行,筛除掉16行)
根据Pmem>0.1和|zAGN-zgroup|/(1+zgroup)>0.01这两个条件,运行sel_z_agn.f,在cross_agn_gal.tbl
中筛选出符合条件的数据==>sel_agn_gal.tbl(28行,其中id_group=124的有2行,筛除掉16行)
6、截取sel_agn_gal.tbl
中第3列id_group
==> sel_id_group.txt,并按从小到大进行排序
==>
id_group.txt,目的是制作下面的awk批处理文件
(方法:awk
'{print $3}' sel_agn_gal.tbl > sel_id_group.txt)
(方法:sort
-n -k1,1 sel_id_group.txt > id_group.txt)
(方法:如制作
Pmem>0.1的计数可执行文件count_mem_0.1,根据第17列GROUP_ID_ZBEST和第16列P_MEM_ZBEST进行选取
awk
'{if($17==17 && $16>0.1) print $0}' xg_gal_p0.tbl
| wc
awk
'{if($17==19 && $16>0.1) print $0}' xg_gal_p0.tbl
| wc
awk
'{if($17==29 && $16>0.1) print $0}' xg_gal_p0.tbl
| wc
awk
'{if($17==35 && $16>0.1) print $0}' xg_gal_p0.tbl
| wc
awk
'{if($17==39 && $16>0.1) print $0}' xg_gal_p0.tbl
| wc
awk
'{if($17==65 && $16>0.1) print $0}' xg_gal_p0.tbl
| wc
awk
'{if($17==87 && $16>0.1) print $0}' xg_gal_p0.tbl
| wc
……
同理制作:
Pmem>0.3的计数可执行文件count_mem_0.3
Pmem>0.5的计数可执行文件count_mem_0.5
Pmem>0.7的计数可执行文件count_mem_0.7)
第二次截取sel_agn_gal.tbl中第3列id_group
==> sel_id_group.txt,并按从小到大进行排序
==>
id_group.txt,目的是制作下面的awk批处理文件
(方法:awk
'{print $3}' sel_agn_gal.tbl > sel_id_group.txt)
(方法:sort
-n -k1,1 sel_id_group.txt > id_group.txt)
(方法:如制作
Pmem>0.1的计数可执行文件count_mem_0.1,根据第12列GROUP_ID和第11列P_MEM进行选取
awk
'{if($12==17 && $11>0.1) print $0}' xg_gal_p0.tbl
| wc
awk
'{if($12==19 && $11>0.1) print $0}' xg_gal_p0.tbl
| wc
……
同理制作:
Pmem>0.3的计数可执行文件count_mem_0.3
Pmem>0.5的计数可执行文件count_mem_0.5
Pmem>0.7的计数可执行文件count_mem_0.7)
7、首先sort
-n -k3,3 sel_agn_gal.tbl >
pmem_agn_gal.tbl制作一个按第3列id_group
排序的文件pmem_agn_gal.tbl;
然后,分别执行count_mem_0.1;count_mem_0.3;count_mem_0.5和count_mem_0.7,将wc输出的第1列行数(星系个数)依次贴在
pmem_agn_gal.tbl右边
第二次同样先
sort
-n -k3,3 sel_agn_gal.tbl >
pmem_agn_gal.tbl制作一个按第3列id_group
排序的文件pmem_agn_gal.tbl;
然后,分别执行count_mem_0.1;count_mem_0.3;count_mem_0.5和count_mem_0.7,将wc输出的第1列行数(星系个数)依次贴在
pmem_agn_gal.tbl右边
8、运行agn_ratio.f计算Pmem>0.1、Pmem>0.3、Pmem>0.5、Pmem>0.7
每一个group中fAGN(n_AGN/n_gal)及其误差,并将结果继续贴在pmem_agn_gal.tbl右侧
==>
final_agn_gal.tbl
9、筛选AGN和galaxy的Pmem数据:
awk
'{print $12}' final_agn_gal.tbl > agn_pmem.tbl
(这个final_agn_gal.tbl中第12列是Pmem_zbest数据,第二次工作是根据Pmem进行选取的,所以数值不同,所画柱状图也不同)
awk
'{print $16}' xg_gal_p0.tbl > gal_pmem.tbl
(这个xg_gal_p0.tbl
中第16列是Pmem_zbest数据,第二次工作是根据Pmem进行选取xg_gal_p0.tbl中第11列Pmem数据,所以数值不同,所画柱状图也不同)
运行plot_AGN_gal_Pmem.f,分别画出AGN和galaxy的Pmem分布柱状图==>plot_AGN_gal_Pmem.eps
(fig1.eps)
10、筛选final_agn_gal.tbl
中第10列AGN光谱红移数据:
awk
'{print $10}' final_agn_gal.tbl > agn_zspec.tbl
(28行)
根据第16列P_MEM_ZBEST范围筛选xg_gal_p0.tbl
中galaxy测光红移数据,分成Pmem>0.1、Pmem>0.3、Pmem>0.5、Pmem>0.7
awk
'{if($7>0 && $7<1.0 && $16>0.1)'
xg_gal_p0.tbl > gal_zpho_0.1.tbl(6136行)
awk
'{if($7>0 && $7<1.0 && $16>0.3)'
xg_gal_p0.tbl > gal_zpho_0.3.tbl(5255行)
awk
'{if($7>0 && $7<1.0 &&
$16>0.5)xg_gal_p0.tbl > gal_zpho_0.5.tbl(4324行)
awk
'{if($7>0 && $7<1.0 && $16>0.7)'
xg_gal_p0.tbl > gal_zpho_0.7.tbl
(2909行)
运行plot_num_AGN_gal_z.f画出AGN和galaxy的4种样本随z的分布
==>
plot_num_AGN_gal_z.eps
若根据第11列P_MEM范围筛选xg_gal_p0.tbl
中galaxy测光红移数据,则
awk
'{if($7>0 && $7<1.0 && $11>0.1) print
$7}' xg_gal_p0.tbl > gal_zpho_0.1.tbl(6597行)
awk
'{if($7>0 && $7<1.0 && $11>0.3) print
$7}' xg_gal_p0.tbl > gal_zpho_0.3.tbl(5617行)
awk
'{if($7>0 && $7<1.0 && $11>0.5) print
$7}' xg_gal_p0.tbl > gal_zpho_0.5.tbl(4606行)
awk
'{if($7>0 && $7<1.0 && $11>0.7) print
$7}' xg_gal_p0.tbl > gal_zpho_0.7.tbl
(3028行)
运行plot_num_AGN_gal_z.f画出AGN和galaxy的4种样本随z的分布
==>
plot_num_AGN_gal_z.eps
(fig2.eps)
11、运行plot_R200_zspec.f
==>
plot_R200_zspec.eps(fig3.eps),分析AGN的R/R200随光谱红移的演化关系,其中R表示AGN距星系群中最亮星系的距离
12、运行plot_fAGN_group_zbin.f画出各group中AGN
占该group所有星系的比例fAGN随红移z的变化==>plot_fAGN_group_zbin.eps
(fig4.eps)
13、运行gal_count_zbin.f逐次统计Pmem>0.1、Pmem>0.3、Pmem>0.5
z=1~10的10个测光红移bin区间星系个数,贴在一起==>gal_count_zbin.tbl
运行agn_ratio_bin.f计算各红移区间、各Pmem阈值的AGN比例及误差==>agn_ratio_bin.tbl
运行plot_fAGN_zbin.f画出三种样本各红移区间包含AGN的星系个数占该红移区间所有星系的fAGN随红移zbin的变化(由于有的zbin可能没有包含AGN的星系,所以每个sample中都出现了两个fAGN的点)==>plot_fAGN_zbin.eps
(fig5.eps)
14、
(1)统计各红移间隔(0~1.0,Δz=0.1)group星系个数(此处xg_gal_p0.tbl为Pmem>0之7,984个星系):
awk
'$7>0.0…0.9 && $7<0.1…1.0' xg_gal_p0.tbl |
wc
分别得到:232,845,1228,1903,782,521,836,898,753,578个
(共8576个)
(2)统计各红移间隔(0~1.0,Δz=0.1)field星系个数(此处xg_gal.tbl为原下载之115,825个星系):
awk
'$7>=0.0 …0.9 && $7<0.1…1.0 &&
$11==0 && $12==-1' xg_gal.tbl | wc
分别得到:1514,3149,4975,9235,7574,10311,1514,9975,10239,10139个
(共74350个)
(3)统计各红移间隔(0~1.0,Δz=0.1)AGN个数(即有z_spec确认的)
awk
'$22>= 0.0 …0.9 && $22<0.1…1.0'
xAGN_BNL_lim.tbl | wc
分别得到:3,12,12,41,21,27,50,50,62,60
(共338个)
(4)统计各红移间隔(0~1.0,Δz=0.1)group中AGN个数(在交叉证认过的文件cross_agn_gal.tbl中)
awk
'$10>= 0.0 …0.9 && $10<0.1…1.0'
final_agn_gal.tbl | wc
分别得到:0,5,1,7,1,3,5,4,4,2
(共32个)
15、运行plot_fAGN_field_zbin.f画出场星系fAGN随红移z的变化==>plot_fAGN_field_zbin.eps
(fig6-1.eps)
|