-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreference_cros_25.pipe
More file actions
304 lines (259 loc) · 7.24 KB
/
reference_cros_25.pipe
File metadata and controls
304 lines (259 loc) · 7.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
#########################################################################
# #
# This pipeline is used to get the reference for #
# cross transfer function using simulation maps #
# #
#########################################################################
import os
pipe_modules = []
pipe_processes = 1
WORKROOT = os.getenv('YICHAO_WORK')
""" simulation maps """
MODE = 25
FLAG = '_noconv'
BEAM = '_beam'
output_root = WORKROOT+'simulation_cros_%02dmodes%s%s/'%(MODE, FLAG, BEAM)
resultf = 'simmaps'
sim_flag = ''
if BEAM == '_beam':
sim_flag = '_beam'
if FLAG == '':
sim_flag = sim_flag + '_conv'
MAPPATH = os.getenv('MAP_15hr_SIM')
WETPATH = os.getenv('MAP_15hr_WiggleZ')
imap_root = [MAPPATH, MAPPATH,]
imap_list = ['sim%s_000.npy'%sim_flag, 'sim_000.npy',]
nmap_root = [WETPATH,]
nmap_list = ['reg15montecarlo.npy',]
WETPATH = os.getenv('MAP_15hr_COMBINED')
nmap_root.append(WETPATH)
nmap_list.append('GBT_15hr_map_cleaned%s_%dmode_weight.npy'%(FLAG, MODE))
pk_imap_pair = ('sim%s_000.npy'%sim_flag, 'sim_000.npy')
pk_nmap_pair = ('GBT_15hr_map_cleaned%s_%dmode_weight.npy'%(FLAG, MODE),
'reg15montecarlo.npy')
FKPweight = False
kmin = 0.07
kmax = 0.9
kbinNum = 15
#""" Pipe line """
from mkpower import prepare
pipe_modules.append(prepare.Prepare)
from mkpower import mkpower
pipe_modules.append(mkpower.PowerSpectrumMaker)
#from mkpower import pycamb
#pipe_modules.append(pycamb.CAMB)
#
#from mkpower import plot_single
#pipe_modules.append(plot_single.PowerSpectrumPlot)
#
#from mkpower import bias
#pipe_modules.append(bias.BiasCalibrate)
""" End """
""" Prepare """
#from mkpower import prepare
#pipe_modules.append(prepare.Prepare)
pre_processes = 5
pre_plot = False
#pre_plot = True
pre_output_root = output_root
pre_imap_root = imap_root
pre_nmap_root = nmap_root
pre_imap_list = imap_list
pre_nmap_list = nmap_list
pre_boxshape = (512, 128, 64)
pre_discrete = 2
pre_boxunit = 2.
pre_Xrange = (1400, pre_boxunit*pre_boxshape[0]+1400)
pre_Yrange = (-pre_boxunit*pre_boxshape[1]*0.5,
pre_boxunit*pre_boxshape[1]*0.5)
pre_Zrange = (10.0, pre_boxunit*pre_boxshape[2]+10.0)
#pre_Zrange = (-pre_boxunit*pre_boxshape[2]*0.5,
# pre_boxunit*pre_boxshape[2]*0.5)
""" Add Noise to the Map"""
#from mkpower import noisemk
#pipe_modules.append(noisemk.MakeNoise)
nmk_processes = 3
nmk_plot = False
#nmk_plot = True
#nmk_input_root = input_root
#nmk_output_root = output_root
nmk_sigma = 2.0
nmk_mu = 0.0
nmk_boxshape = (512, 128, 64)
nmk_discrete = 2
nmk_boxunit = 2.
nmk_Xrange = (1400, pre_boxunit*pre_boxshape[0]+1400)
nmk_Yrange = (-pre_boxunit*pre_boxshape[1]*0.5,
pre_boxunit*pre_boxshape[1]*0.5)
nmk_Zrange = (10.0, pre_boxunit*pre_boxshape[2]+10.0)
""" Calculate the Pk """
#from mkpower import mkpower
#pipe_modules.append(mkpower.PowerSpectrumMaker)
pk_processes = 1
pk_plot = False
#pk_plot = True
pk_saveweight = True
pk_input_root = output_root
pk_output_root = output_root
pk_resultf = resultf
pk_boxshape = pre_boxshape
pk_discrete = pre_discrete
pk_boxunit = pre_boxunit
pk_Xrange = pre_Xrange
pk_Yrange = pre_Yrange
pk_Zrange = pre_Zrange
pk_kbinNum = kbinNum
pk_kmin = kmin
pk_kmax = kmax
#pk_FKPweight = True
pk_FKPweight = FKPweight
pk_OmegaHI = 1.e-3
pk_Omegam = 0.24
pk_OmegaL = 0.76
""" Calculate the combined Pk """
#from mkpower import mkpower_combine
#pipe_modules.append(mkpower_combine.CrossPowerSpectrumMaker)
pkc_processes = 3
pkc_plot = False
pkc_saveweight = True
pkc_input_root = output_root
pkc_output_root = output_root
pkc_resultf = resultf
pkc_boxshape = pre_boxshape
pkc_discrete = pre_discrete
pkc_boxunit = pre_boxunit
pkc_Xrange = pre_Xrange
pkc_Yrange = pre_Yrange
pkc_Zrange = pre_Zrange
pkc_kbinNum = pk_kbinNum
pkc_kmin = kmin
pkc_kmax = kmax
#pkc_FKPweight = True
pkc_FKPweight = FKPweight
pkc_OmegaHI = 1.e-3
pkc_Omegam = 0.24
pkc_OmegaL = 0.76
pkc_sme = False
""" Calling CAMB """
#from mkpower import pycamb
#pipe_modules.append(pycamb.CAMB)
pcb_output_root = output_root + 'cambio/'
pcb_do_nonlinear = 1
pcb_transfer_redshift = 0.7
pcb_transfer_high_precision = 'T'
pcb_transfer_kmax = 1.5
#pcb_transfer_k_per_logint = 400
""" Calculate the WindowF """
#from mkpower import windowf
#pipe_modules.append(windowf.WindowFunctionMaker)
wd_processes = 1
#wd_plot = False
wd_plot = True
wd_input_root = output_root
wd_output_root = output_root
wd_boxshape = pk_boxshape
wd_boxunit = pk_boxunit
wd_FKPweight = FKPweight
wd_discrete = 2
wd_Xrange = (1400, pk_boxunit*pk_boxshape[0]+1400)
wd_Yrange = (-pk_boxunit*pk_boxshape[1]*0.5,
pk_boxunit*pk_boxshape[1]*0.5)
wd_Zrange = (0.0, pk_boxunit*pk_boxshape[2])
""" Calculate the nonlinear Power Spectrum """
#from mkpower import nonlpower
#pipe_modules.append(nonlpower.TheoryPowerSpectrumMaker)
nl_processes = 1
nl_plot = True
#nl_plot = False
#nl_input_root = input_root
nl_camb_input_root = pcb_output_root
nl_output_root = output_root
#nl_boxshape = pk_boxshape
#nl_boxunit = pk_boxunit
nl_boxshape = (256, 256, 256)
nl_boxunit = 32.
nl_boxshapelist = ((256,256,256),(256,256,256))
nl_boxunitlist = (32.0, 8.0)
nl_FKPweight = FKPweight
nl_discrete = 2
nl_Xrange = (1400, pk_boxunit*pk_boxshape[0]+1400)
nl_Yrange = (-pk_boxunit*pk_boxshape[1]*0.5,
pk_boxunit*pk_boxshape[1]*0.5)
nl_Zrange = (0.0, pk_boxunit*pk_boxshape[2])
nl_OmegaHI = 1.e-3
nl_Omegam = 0.24
nl_OmegaL = 0.76
nl_z = 1.
""" Calibrate the Bias of the Power Spectrum """
#form mkpower import bias
#pipe_modules.append(bias.BiasCalibrate)
bc_processes = 1
bc_plot = True
bc_input_root = output_root
bc_output_root = bc_input_root
bc_resultf = resultf
bc_PKunit = 'mK'
""" Window Function Plot """
#from mkpower import plot
#pipe_modules.append(plot.PowerSpectrumPlot)
wpt_processes = 1
wpt_input_root = nl_output_root
wpt_output_root = output_root
wpt_FKPweight = True
wpt_boxshape = ((256,256,256), (256,256,256))
wpt_boxunit = (8.0, 32.0)
""" Make JackKnife Map """
#from mkpower import jkmap
#pipe_modules.append(jkmap.JackKnifeErrorMap)
jm_processes = 4
jm_plot = False
#jm_input_root = input_root
jm_jkn0 = 8
jm_jkn1 = 4
jm_jkn2 = 4
jm_output_root = output_root + 'jkmap/'
jm_boxshape = pre_boxshape
jm_discrete = pre_discrete
jm_boxunit = pre_boxunit
jm_Xrange = pre_Xrange
jm_Yrange = pre_Yrange
jm_Zrange = pre_Zrange
""" Calculate the jk error (Better run in mpi)"""
#from mkpower import jkerror
#pipe_modules.append(jkerror.JackKnifeError)
jk_processes = 4
jk_plot = False
jk_input_root = jm_output_root
jk_jknumber = jm_jkn0*jm_jkn1*jm_jkn2
jk_output_root = output_root
jk_boxshape = pk_boxshape
jk_discrete = pk_discrete
jk_boxunit = pk_boxunit
jk_Xrange = pk_Xrange
jk_Yrange = pk_Yrange
jk_Zrange = pk_Zrange
jk_kbinNum = pk_kbinNum
#jk_FKPweight = False
jk_FKPweight = pk_FKPweight
jk_OmegaHI = 1.e-3
jk_Omegam = 0.24
jk_OmegaL = 0.76
jk_z = 1.
""" Plot """
#from mkpower import plot
#pipe_modules.append(plot.PowerSpectrumPlot)
pt_processes = 1
pt_input_root = output_root
pt_output_root = output_root
pt_FKPweight = FKPweight
pt_OmegaHI = 1.e-3
pt_Omegam = 0.24
pt_OmegaL = 0.76
pt_z = 1.
pt_ymin = 1.e-10
pt_ymax = 1.e-6
pt_PKunit = 'K'
pt_resultf = resultf
pt_kmin = pkc_kmin
pt_kmax = pkc_kmax
pt_delta_plot = True