Skip to content

Commit 3da4520

Browse files
author
Serena Giardiello
committed
modify fit_dust code
1 parent 6ad2234 commit 3da4520

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

project/SO/pISO/python/dust/fit_dust_amplitude.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
2-
This script uses 143/353 GHz spectra from Planck to fit dust amplitude within ACT survey
3-
if --use-220 is used , we will also fit the high ell 220 GHz ACT channel, the idea being to try to break the degeneracy between dust and CIB
2+
This script uses 143/353 GHz spectra from Planck to fit dust amplitude within the deep56 patch
3+
if --use-220 is used , we will also fit the high ell 220 GHz ACT channel, the idea being to try to break the degeneracy between dust and CIB. We will not use this in the first round of dust fits for ISO, will modify the relevant code later on if needed.
44
example use:
55
python fit_dust_amplitude.py global_dust.dict --mode BB
66
python fit_dust_amplitude.py global_dust.dict --mode TT --use-220 --dr6-result-path ./dr6
@@ -160,9 +160,9 @@ def get_fg_model(a_p, a_c, a_gtt, a_gte, a_gee, a_gbb, a_gtb, bandint_shift_dr6_
160160
Rminus1_cl_stop = 0.1
161161
mc_cov = True
162162

163-
result_dir = f"chains/dust_from_planck353_{mode}" # YOU MAY WANT TO CHANGE TO FULL PATH, AND/OR FROM PARAMFILE
164-
chain_name = f"{result_dir}/dust" # YOU MAY WANT TO CHANGE TO FULL PATH, AND/OR FROM PARAMFILE
165-
plot_dir = f"plots/dust_from_planck353_{mode}" # YOU MAY WANT TO CHANGE TO FULL PATH, AND/OR FROM PARAMFILE
163+
result_dir = d["chain_dir"] + f"/dust_from_planck353_{mode}"
164+
chain_name = f"{result_dir}/dust"
165+
plot_dir = d["plots_base_dir"] + f"/dust_from_planck353_{mode}"
166166

167167
if use_220:
168168
chain_name += "_with_220"
@@ -186,8 +186,8 @@ def get_fg_model(a_p, a_c, a_gtt, a_gte, a_gee, a_gbb, a_gtb, bandint_shift_dr6_
186186
lmin, lmax = 300, 2000
187187
idx_planck = np.where((bin_low >= lmin) & (bin_high <= lmax))[0]
188188
lb, res_planck, cov_res_planck = dust_utils.get_residual_and_cov(["Planck_f143", "Planck_f353"],
189-
"spectra", # YOU MAY WANT TO CHANGE TO FULL PATH, AND/OR FROM PARAMFILE
190-
"covariances", # YOU MAY WANT TO CHANGE TO FULL PATH, AND/OR FROM PARAMFILE
189+
d["spec_dir"],
190+
d["cov_dir"],
191191
mode,
192192
spectra,
193193
op="aa+bb-2ab",

project/SO/pISO/python/dust/global_dust.dict

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ binning_file = release_dir + "pspipe/binning/binning_50"
77
apply_kspace_filter = True
88
k_filter_Planck = {"type":'binary_cross', "vk_mask":[-90, 90], "hk_mask":[-50, 50], "weighted":False}
99
kspace_tf_path = release_dir + "pspipe/kspace_tf/dust_binning_50/"
10-
sim_spec_dir = release_dir + "pspipe/sim_spectra/dust_binning_50/"
10+
sim_spec_dir = "/global/cfs/cdirs/sobs/users/sgiardie/iso/dust/sim_spectra/dust_binning_50/"
1111
source_catalog = release_dir + "pspipe/source_catalog/cat_skn_multifreq_20220526_nightonly.txt"
1212

1313
mcm_dir = "/scratch/c.spxsg6/iso/dust/mcms"
@@ -21,7 +21,7 @@ cov_dir = "/scratch/c.spxsg6/iso/dust/covariances"
2121
montecarlo_dir = "/scratch/c.spxsg6/iso/dust/montecarlo"
2222
noise_alms_dir = "/scratch/c.spxsg6/iso/dust/noise_alms"
2323
catalog_dir = "/scratch/c.spxsg6/iso/dust/catalogs"
24-
24+
chain_dir = "/scratch/c.spxsg6/iso/dust/chains"
2525

2626
deconvolve_pixwin = True
2727
pixwin_Planck = {"pix": 'HEALPIX', "nside": 2048}

0 commit comments

Comments
 (0)