Skip to content

Commit

Permalink
added Jessie's hack to avoid params values to be printed to the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurmloureiro committed Dec 8, 2023
1 parent 89d1af7 commit 942ba19
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/blind_2pt_cosmosis/run_cosmosis_2pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ def setup_pipeline(inifile, angles_file=None, nz_file=None):
Initialize and set up the Cosmosis pipeline.
"""
ini = Inifile(inifile)
# These are necessary to make sure that the pipeline doesn't
# accidentally print information we are trying to conceal
if 'test' in ini.__dict__['_sections'].keys():
ini.__dict__['_sections']['test']['save_dir']=''
if 'output' in ini.__dict__['_sections'].keys():
ini.__dict__['_sections']['output']['filename']=''
ini.__dict__['_sections']['pipeline']['debug']='F'
ini.__dict__['_sections']['pipeline']['quiet']='T'

if 'camb' in ini.__dict__['_sections'].keys():
ini.__dict__['_sections']['camb']['feedback']=0

# Modify settings to suppress unnecessary outputs
ini = modify_settings(ini, angles_file, nz_file)
pipeline = LikelihoodPipeline(ini)
Expand Down
1 change: 0 additions & 1 deletion tests/test_run_cosmosis_2pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ def test_setup_pipeline():
# Setup
inifile = './src/blind_2pt_cosmosis/cosmosis_files/default_blinding_template.ini'
angles_file = './src/blind_2pt_cosmosis/cosmosis_files/sim_fiducial.fits'
nz_file = './src/blind_2pt_cosmosis/cosmosis_files/sim_fiducial.fits'

# Exercise
pipeline = setup_pipeline(inifile)
Expand Down

0 comments on commit 942ba19

Please sign in to comment.