Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split into two files for binned and unbinned #70

Draft
wants to merge 71 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
4449e46
split into two files for binned and unbinned
eunseongleee Jun 28, 2022
e3c50aa
split unbinned / binned cluster likelihoods
itrharrison Jul 13, 2022
b302208
added test yaml
itrharrison Jul 13, 2022
f19d9c3
merge conflicts
itrharrison Jul 13, 2022
d9722e7
Update clusters.py
borisbolliet Jul 13, 2022
203cb91
Update clusters.py
borisbolliet Jul 13, 2022
293d1b0
merging
borisbolliet Jul 14, 2022
46dadab
Update .gitignore
borisbolliet Jul 14, 2022
d2e3752
works with so files and print n(z) from unbinned lkl
borisbolliet Jul 14, 2022
e6488ac
fix to get the unbinned code run fast
borisbolliet Jul 14, 2022
c56aadb
merging in progreess: adding ccl
borisbolliet Sep 2, 2022
3e9cc12
Update test_binned_lkl_ccl.yaml
borisbolliet Sep 2, 2022
b5a779f
merging done
borisbolliet Sep 3, 2022
2afc946
Create DR5-compare-SOLikeT-mocks-sim-kit_NemoCCL_A10tSZ_DR5White_ACT-…
borisbolliet Sep 3, 2022
c199193
starting modifying unbinned lkl
borisbolliet Sep 3, 2022
47cb0c3
in progress (fails)
borisbolliet Sep 4, 2022
6ef757f
unbinned works with dr5 sims but minor bug with ccl unbinned
borisbolliet Sep 4, 2022
7dea653
wip
borisbolliet Sep 6, 2022
a1db65d
working
borisbolliet Sep 6, 2022
c6a8376
deleting unused files
borisbolliet Sep 6, 2022
d1c0b2c
sync in progress
borisbolliet Sep 6, 2022
305b57a
Update clusters.py
borisbolliet Sep 7, 2022
ff2bde4
tidying a bit
borisbolliet Sep 7, 2022
923fa90
fixed discrepancy between binned and unbinned
borisbolliet Sep 7, 2022
15e158d
added directions in yaml file
borisbolliet Sep 7, 2022
dfc798e
instructions
borisbolliet Sep 7, 2022
c7f3198
commented class_sz
borisbolliet Sep 8, 2022
8025b8e
Merge branch 'master' into dev-clusters-both
borisbolliet Sep 8, 2022
596b8ba
vectorized unbinned lkl
borisbolliet Sep 8, 2022
172e145
binned_lkl_camb
borisbolliet Sep 9, 2022
fa7ac43
merging
borisbolliet Sep 9, 2022
f2531bc
Update clusters.py
borisbolliet Sep 9, 2022
769e83b
Added scatter for injection completeness.
anicola Sep 12, 2022
53f80b7
Adding notebooks.
anicola Sep 12, 2022
23b96cd
Injection-based completeness in terms of observed y.
anicola Sep 13, 2022
d692aa2
Adding notebook for more mock comparisons.
anicola Sep 13, 2022
66074a6
Added scatter to Qfit completeness.
anicola Sep 13, 2022
03b8d87
Adapted config files.
anicola Sep 13, 2022
4f00066
Added mass conversion to unbinned likelihood.
anicola Sep 13, 2022
9bb089c
beginning of speeding up binned likelihood
eunseongleee Sep 21, 2022
9fa268f
removing obsolete options
eunseongleee Sep 22, 2022
78ecf4d
Update .gitignore
eunseongleee Sep 22, 2022
9f0ba06
Delete soliket/clusters/data/act directory
eunseongleee Sep 22, 2022
016b5da
speeding up binned lkl
eunseongleee Sep 28, 2022
a9468c5
correcting the average Q computation in an injection method
eunseongleee Oct 18, 2022
401b1bc
added nemo-sz as a requirement
itrharrison Oct 22, 2022
4494e52
Update test_unbinned_lkl_camb_dr5.yaml
borisbolliet Dec 6, 2022
5d8b0c8
synchronising binned and unbinned lkl and tidying up options regardin…
eunseongleee Dec 15, 2022
6e00212
Merge branch 'dev-clusters-both' of https://github.com/simonsobs/SOLi…
eunseongleee Dec 15, 2022
1b1f537
update pytest for both cluster lkl
eunseongleee Dec 20, 2022
035227e
tidying up
eunseongleee Dec 20, 2022
fb8c8ad
speeding up unbinned lkl (no scatter)
eunseongleee Dec 23, 2022
dc7ab7c
speeding up the unbinned lkl (no scatter)
eunseongleee Jan 4, 2023
6ac62a4
switching the error func in completeness to the step func
eunseongleee Jan 19, 2023
74aa92d
tidying up
eunseongleee Feb 13, 2023
41a45f8
tidying up unbinned lkl
eunseongleee Feb 16, 2023
85ebfab
updating the unbinned likelihood
eunseongleee Mar 20, 2023
0ad184d
Adding functionality to compute gof for Poisson statistics.
anicola Mar 21, 2023
f0b7d29
tidying up
eunseongleee Jun 9, 2023
5790c69
note added for cash statistics
eunseongleee Jun 9, 2023
2462855
porting class_sz
borisbolliet Sep 13, 2023
526d974
class_sz works for binned lkl
borisbolliet Sep 13, 2023
b7814bd
class_sz for unbinned
borisbolliet Sep 13, 2023
540f523
implemented debiasing at theory level in soliket/ccl binned lkl. Many…
borisbolliet Sep 13, 2023
a183bb7
added catalog for class_sz and skyfrac dependence in unbinned lkl
borisbolliet Sep 13, 2023
c1ba3b1
test yaml files
borisbolliet Sep 21, 2023
cb7bd50
push cib x lensing
borisbolliet Mar 12, 2024
1bf904a
provider/theory renaming
May 22, 2024
932e441
added new optimization correction factor to binned and unbinned
nbatta Jul 9, 2024
080c7a2
opt_bias_func checked for binned
eunseongleee Jul 15, 2024
cd3d4dd
version check
eunseongleee Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: install reqs
run: |
conda install pip compilers pytest pytest-cov pyccl cython
pip install cobaya
pip install cobaya nemo-sz

env:
MATRIX_OS: ${{ matrix.os }}
Expand Down
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,22 @@ venv.bak/

# mypy
.mypy_cache/


# clusters
soliket/clusters/data/selFn*
soliket/clusters/data/*zip
soliket/clusters/data/*fits
soliket/clusters/chains
soliket/clusters/notebooks/figures
soliket/clusters/data/act/*
soliket/clusters/data/advact/*
.DS_Store
soliket/ymap
soliket/cosmopower
soliket/clusters/checks/*
soliket/clusters/notebooks/figs/*
soliket/clusters/notebooks/ongoing/*

# cibxlensing
soliket/cibxlensing/chains
117 changes: 117 additions & 0 deletions chains/test_unbinned_classy_sz_evaluate.input.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
theory:
classy_szfast.classy_sz.classy_sz:
use_class_sz_fast_mode: 1
stop_at_error: true
extra_args:
output: sz_cluster_counts_fft,m500c_to_m200c,m200c_to_m500
mass function: T08M200c
concentration parameter: B13
B: 1.0
N_ncdm: 1
N_ur: 2.0328
m_ncdm: 0.06
T_ncdm: 0.71611
M_min: 10000000000000.0
M_max: 1.0e+16
ndim_redshifts: 100
szcounts_fft_nz: 100,
n_m_dndlnM: 100,
n_z_dndlnM: 100,
has_selection_function: 1
experiment: 1
y_m_relation: 1
signal-to-noise_cut-off_for_survey_cluster_completeness: 5.0
sz_selection_function_thetas_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/nemo_sim_thetas_120923_30bins.txt
sz_selection_function_skyfracs_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/nemo_sim_skyfracs_120923_30bins.txt
sz_selection_function_ylims_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/nemo_sim_ylims_120923_30bins.txt
SZ_cat_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/SZ_cat_nemosimkit_130923.txt
A_ym: 1.9e-05
B_ym: 0.08
C_ym: 0.0
sigmaM_ym: 0.173
m_pivot_ym_[Msun]: 425000000000000.0
use_m500c_in_ym_relation: 0
use_m200c_in_ym_relation: 1
use_skyaveraged_noise: 0
N_samp_fftw: 2048
z_min: 0.0
z_max: 2.0
szcounts_fft_z_min: 0.0
szcounts_fft_z_max: 2.0
tol_dlnm_dlnq: 0.01
ntab_dlnm_dlnq: 80
szcounts_qmax_fft_padded: 200.0
sigma_derivative: 0
szcc_dof: 3.0
szcc_qtrunc: 2.0
HMF_prescription_NCDM: 1
no_spline_in_tinker: 1
likelihood:
soliket.UnbinnedClusterLikelihood:
stop_at_error: true
verbose: false
data:
data_path: data/advact/DR5CosmoSims/sim-kit_NemoCCL_A10tSZ_DR5White_ACT-DR5_tenToA0Tuned/NemoCCL_A10tSZ_DR5White_ACT-DR5_tenToA0Tuned/
cat_file: NemoCCL_A10tSZ_DR5White_ACT-DR5_tenToA0Tuned_mass.fits
Q_file: selFn/QFit.fits
tile_file: selFn/tileAreas.txt
rms_file: selFn/RMSTab.fits
theorypred:
choose_theory: classy_sz
massfunc_mode: ccl
md_hmf: 200c
md_ym: 200c
compl_mode: erf_diff
rel_correction: false
YM:
Mpivot: 425000000000000.0
selfunc:
SNRcut: 5.0
method: SNRbased
whichQ: fit
resolution: downsample
dwnsmpl_bins: 30
save_dwsmpld: false
debiasDOF: 0.0
debias_cutoff: 0.0
binning:
z:
zmin: 0.0
zmax: 2.0
dz: 0.1
q:
log10qmin: 0.6
log10qmax: 2.0
dlog10q: 0.25
M:
Mmin: 50000000000000.0
Mmax: 1.0e+16
dlogM: 0.01
exclude_zbin: 0
params:
h: 0.68
n_s: 0.965
Omega_b: 0.049
Omega_cdm: 0.261
tau_reio: 0.06
tenToA0: 1.9e-05
B0: 0.08
scatter_sz: 0.2
bias_sz: 1
C0: 0.0
sigma8:
prior:
min: 0.0
max: 4.0
ref:
dist: norm
loc: 0.8
scale: 0.001
proposal: 0.001
latex: \sigma_8
sampler:
evaluate:
override:
sigma8: 0.81
output: test_unbinned_classy_sz_evaluate
stop_at_error: true
185 changes: 185 additions & 0 deletions chains/test_unbinned_classy_sz_evaluate.updated.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
theory:
classy_szfast.classy_sz.classy_sz:
use_class_sz_fast_mode: 1
lensing_lkl: SOLikeT
ell_factor: false
path: null
speed: 0.2
stop_at_error: true
extra_args:
output: sz_cluster_counts_fft,m500c_to_m200c,m200c_to_m500
mass function: T08M200c
concentration parameter: B13
B: 1.0
N_ncdm: 1
N_ur: 2.0328
m_ncdm: 0.06
T_ncdm: 0.71611
M_min: 10000000000000.0
M_max: 1.0e+16
ndim_redshifts: 100
szcounts_fft_nz: 100,
n_m_dndlnM: 100,
n_z_dndlnM: 100,
has_selection_function: 1
experiment: 1
y_m_relation: 1
signal-to-noise_cut-off_for_survey_cluster_completeness: 5.0
sz_selection_function_thetas_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/nemo_sim_thetas_120923_30bins.txt
sz_selection_function_skyfracs_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/nemo_sim_skyfracs_120923_30bins.txt
sz_selection_function_ylims_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/nemo_sim_ylims_120923_30bins.txt
SZ_cat_file: /Users/boris/Work/CLASS-SZ/SO-SZ/class_sz/class_sz_auxiliary_files/SZ_cat_nemosimkit_130923.txt
A_ym: 1.9e-05
B_ym: 0.08
C_ym: 0.0
sigmaM_ym: 0.173
m_pivot_ym_[Msun]: 425000000000000.0
use_m500c_in_ym_relation: 0
use_m200c_in_ym_relation: 1
use_skyaveraged_noise: 0
N_samp_fftw: 2048
z_min: 0.0
z_max: 2.0
szcounts_fft_z_min: 0.0
szcounts_fft_z_max: 2.0
tol_dlnm_dlnq: 0.01
ntab_dlnm_dlnq: 80
szcounts_qmax_fft_padded: 200.0
sigma_derivative: 0
szcc_dof: 3.0
szcc_qtrunc: 2.0
HMF_prescription_NCDM: 1
no_spline_in_tinker: 1
ignore_obsolete: false
use_renames: false
renames:
As: A_s
ns: n_s
nrun: alpha_s
nrunrun: beta_s
nt: n_t
ntrun: alpha_t
rdrag: rs_drag
omegak: Omega_k
omegal: Omega_Lambda
w: w0_fld
wa: wa_fld
omegabh2: omega_b
omegab: Omega_b
omegach2: omega_cdm
omegac: Omega_cdm
omegam: Omega_m
omegan: Omega_nu
tau: tau_reio
zrei: z_reio
deltazrei: reionization_width
helium_redshift: helium_fullreio_redshift
helium_delta_redshift: helium_fullreio_width
yhe: YHe
yheused: YHe
version: null
likelihood:
soliket.UnbinnedClusterLikelihood:
name: Unbinned Clusters
columns:
- z
- tsz_signal
- tsz_signal_err
- tile_name
verbose: false
data:
data_path: data/advact/DR5CosmoSims/sim-kit_NemoCCL_A10tSZ_DR5White_ACT-DR5_tenToA0Tuned/NemoCCL_A10tSZ_DR5White_ACT-DR5_tenToA0Tuned/
cat_file: NemoCCL_A10tSZ_DR5White_ACT-DR5_tenToA0Tuned_mass.fits
Q_file: selFn/QFit.fits
tile_file: selFn/tileAreas.txt
rms_file: selFn/RMSTab.fits
theorypred:
choose_theory: classy_sz
massfunc_mode: ccl
md_hmf: 200c
md_ym: 200c
compl_mode: erf_diff
rel_correction: false
selfunc:
SNRcut: 5.0
method: SNRbased
whichQ: fit
resolution: downsample
dwnsmpl_bins: 30
save_dwsmpld: false
debiasDOF: 0.0
debias_cutoff: 0.0
binning:
z:
zmin: 0.0
zmax: 2.0
dz: 0.1
q:
log10qmin: 0.6
log10qmax: 2.0
dlog10q: 0.25
M:
Mmin: 50000000000000.0
Mmax: 1.0e+16
dlogM: 0.01
exclude_zbin: 0
YM:
Mpivot: 425000000000000.0
type: []
speed: -1
stop_at_error: true
version: null
params:
h:
value: 0.68
n_s:
value: 0.965
renames:
- ns
Omega_b:
value: 0.049
renames:
- omegab
Omega_cdm:
value: 0.261
renames:
- omegac
tau_reio:
value: 0.06
renames:
- tau
tenToA0:
derived: false
value: 1.9e-05
B0:
derived: false
value: 0.08
scatter_sz:
derived: false
value: 0.2
bias_sz:
derived: false
value: 1
C0:
derived: false
value: 0.0
sigma8:
prior:
min: 0.0
max: 4.0
ref:
dist: norm
loc: 0.8
scale: 0.001
proposal: 0.001
latex: \sigma_8
sampler:
evaluate:
N: 1
override:
sigma8: 0.81
seed: null
version: null
output: test_unbinned_classy_sz_evaluate
stop_at_error: true
version: '3.3'
12 changes: 6 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@
"*.yaml",
"*.bibtex",
# "data/simulated*/*.txt",
"clusters/data/*",
"clusters/data/selFn_equD56/*",
"lensing/data/*.txt",
# "clusters/data/*",
# "clusters/data/selFn_equD56/*",
# "lensing/data/*.txt",
]
},
install_requires=[
"astropy",
"scikit-learn",
"cobaya",
#"cobaya",
"sacc",
"pyccl",
"fgspectra @ git+https://github.com/simonsobs/fgspectra@act_sz_x_cib#egg=fgspectra", # noqa E501
"mflike @ git+https://github.com/simonsobs/lat_mflike@master"
#"fgspectra @ git+https://github.com/simonsobs/fgspectra@act_sz_x_cib#egg=fgspectra", # noqa E501
#"mflike @ git+https://github.com/simonsobs/lat_mflike@master"
],
test_suite="soliket.tests",
include_package_data=True,
Expand Down
7 changes: 6 additions & 1 deletion soliket/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
from .lensing import LensingLiteLikelihood, LensingLikelihood # noqa: F401
from .gaussian import GaussianLikelihood, MultiGaussianLikelihood # noqa: F401
from .ps import PSLikelihood, BinnedPSLikelihood # noqa: F401
from .clusters import ClusterLikelihood # noqa: F401
try:
from .clusters import BinnedClusterLikelihood, UnbinnedClusterLikelihood # noqa: F401
except ImportError:
print('Skipping clusters module as not all requirements installed')
pass
from .mflike import MFLike # noqa: F401
from .mflike import TheoryForge_MFLike
from .xcorr import XcorrLikelihood # noqa: F401
from .foreground import Foreground
from .bandpass import BandPass
from .cibxlensing import CIBxKAPPA_Likelihood

try:
import pyccl as ccl # noqa: F401
Expand Down
Loading
Loading