-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.py
76 lines (55 loc) · 2.86 KB
/
variables.py
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
import numpy as np
#List and values of all the variables and functions used in the code
#Photo-z Bins (minimum, maximum and intermediate bins)
Z_BINS = [0.15,0.29,0.43,0.57,0.70,0.90,1.10,1.30]
#CFHTlens specifications
CFHTlens_dZ = 0.05
#Define ell_min and ell_max
L_MIN = 2
L_MAX = 2000
#Cosmology mean from MIDRUN Joudaki et al. 2016
h=6.1197750E-01
Omega_c=1.1651890E-01/h**2.
Omega_b=3.2744850E-02/h**2.
sigma8=6.0773680E-01
n_s=1.2577130E+00
#correlation function and covariance matrix files, plus number of simulations used
CORR_FILE = './xipm.dat'
COVMAT_FILE = './xipm_cov.dat'
N_SIMULATIONS = 1988
#Define Machine Precision Threshold, above which a warning is raised
MP_THRESHOLD = 1.e-14
#Criteria used to select the data
def select_data(data, z_min, z_max):
sel = data['Z_B']>=z_min
sel = (data['Z_B']<z_max)*sel
sel = (data['MASK']==0)*sel
sel = (data['weight']>0.)*sel
sel = (data['star_flag']==0)*sel
sel = np.array([x[:6] in good_fit_patterns for x in data['id']])*sel
return sel
#Good fit patterns
good_fit_patterns = ['W1m0m0', 'W1m0m3', 'W1m0m4', 'W1m0p1', 'W1m0p2', 'W1m0p3', 'W1m1m0',
'W1m1m2', 'W1m1m3', 'W1m1m4', 'W1m1p3', 'W1m2m1', 'W1m2m2', 'W1m2m3',
'W1m2p1', 'W1m2p2', 'W1m3m0', 'W1m3m2', 'W1m3m4', 'W1m3p1', 'W1m3p3',
'W1m4m0', 'W1m4m1', 'W1m4m3', 'W1m4m4', 'W1m4p1', 'W1p1m1', 'W1p1m2',
'W1p1m3', 'W1p1m4', 'W1p1p1', 'W1p1p2', 'W1p1p3', 'W1p2m0', 'W1p2m2',
'W1p2m3', 'W1p2m4', 'W1p2p1', 'W1p2p2', 'W1p2p3', 'W1p3m1', 'W1p3m2',
'W1p3m3', 'W1p3m4', 'W1p3p1', 'W1p3p2', 'W1p3p3', 'W1p4m0', 'W1p4m1',
'W1p4m2', 'W1p4m3', 'W1p4m4', 'W1p4p1', 'W1p4p2', 'W1p4p3',
'W2m0m0', 'W2m0m1', 'W2m0p1', 'W2m0p2', 'W2m1m0', 'W2m1m1', 'W2m1p1',
'W2m1p3', 'W2p1m0', 'W2p1p1', 'W2p1p2', 'W2p2m0', 'W2p2m1', 'W2p2p1',
'W2p2p2', 'W2p3m0', 'W2p3m1', 'W2p3p1', 'W2p3p3',
'W3m0m1', 'W3m0m2', 'W3m0m3', 'W3m0p2', 'W3m0p3', 'W3m1m0', 'W3m1m2',
'W3m1m3', 'W3m1p1', 'W3m1p2', 'W3m1p3', 'W3m2m1', 'W3m2m2', 'W3m2m3',
'W3m2p1', 'W3m2p2', 'W3m3m0', 'W3m3m1', 'W3m3m2', 'W3m3m3', 'W3m3p1',
'W3m3p2', 'W3p1m0', 'W3p1m1', 'W3p1m2', 'W3p1m3', 'W3p1p2', 'W3p1p3',
'W3p2m0', 'W3p2m3', 'W3p2p3', 'W3p3m1', 'W3p3m3', 'W3p3p1', 'W3p3p2',
'W3p3p3',
'W4m0m2', 'W4m0p1', 'W4m1m0', 'W4m1m1', 'W4m1m2', 'W4m1p1', 'W4m2m0',
'W4m2p1', 'W4m2p3', 'W4m3m0', 'W4m3p1', 'W4m3p2', 'W4m3p3', 'W4p1m0',
'W4p1m1', 'W4p1m2', 'W4p2m0', 'W4p2m1', 'W4p2m2']
#Angles of the correlation functions
THETA_ARCMIN = [1.41, 2.79, 5.53, 11.0, 21.7, 43.0, 85.2]
NEGLECT_THETA_PLUS = [6]
NEGLECT_THETA_MINUS = [0, 1, 2]