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

mbs 0016 d1s1 #54

Merged
merged 10 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,5 @@ venv.bak/
output
*.err
*.out
jobs
logs
2 changes: 2 additions & 0 deletions mbs-s0016-20241111/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Tag: `mbs-s0016-20241111`

## Updates

* 2025-01-18: Added `s1`, `d1`, and `galactic_foregrounds_d1s1` maps
* 2024-11-18: Finished map execution, also reconfigured `f1`, `a2` and `a1` to use `ud_grade` instead of spherical harmonics transforms to avoid ringing in the maps
* 2024-11-11: started map execution

Expand Down Expand Up @@ -74,6 +75,7 @@ Each of the components is available separately, see the TOML files in this repos
The available combination maps are, (see the [`combine_maps.py` script](combine_maps.py)):

* `galactic_foregrounds_mediumcomplexity`
* `galactic_foregrounds_d1s1`
* `galactic_foregrounds_lowcomplexity`
* `galactic_foregrounds_highcomplexity`
* `extragalactic_norg_nocib` (Websky extragalactic maps without CIB and Radio Galaxies, so only kSZ and tSZ)
Expand Down
4 changes: 4 additions & 0 deletions mbs-s0016-20241111/combine_maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
"ame_a1",
"co_co3",
],
"galactic_foregrounds_d1s1": [
"dust_d1",
"synchrotron_s1",
],
"galactic_foregrounds_lowcomplexity": [
"dust_d9",
"synchrotron_s4",
Expand Down
14 changes: 9 additions & 5 deletions mbs-s0016-20241111/compute_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,26 @@

from astropy.table import QTable

ID = int(os.environ["SLURM_ARRAY_TASK_ID"])

chs = QTable.read(
"instrument_model/instrument_model.tbl",
format="ascii.ipac",
)
folder = [f for f in glob("output/*") if not f.endswith("pkl")][ID]
cl = {}

import sys
if len(sys.argv) > 1:
folder = sys.argv[1]
else:
ID = int(os.environ["SLURM_ARRAY_TASK_ID"])
folder = [f for f in glob("output/*") if not f.endswith("pkl")][ID]
print(folder)
component = os.path.basename(folder)

output_filename = f"output/C_ell_{component}.pkl"
output_filename = f"output/C_ell/C_ell_{component}.pkl"
if os.path.exists(output_filename):
print(f"{output_filename} already exists")
sys.exit(0)

cl = {}
for ch in chs:
try:
filename = glob(folder + f"/*{ch['band']}*healpix*")[0]
Expand Down
3 changes: 1 addition & 2 deletions mbs-s0016-20241111/compute_cl.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
#SBATCH --error=logs/compute_cl_%j.out
#SBATCH --output=logs/compute_cl_%j.out
#SBATCH --cpus-per-task=48
#SBATCH --array=0-19
#SBATCH --array=0-22

export OMP_NUM_THREADS=48
export NUMBA_NUM_THREADS=$OMP_NUM_THREADS
export HDF5_USE_FILE_LOCKING=FALSE
export PYTHONUNBUFFERED=1

micromamba activate cmb
time python compute_cl.py
4 changes: 4 additions & 0 deletions mbs-s0016-20241111/dust_d1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tag = "dust_d1"

[pysm_components]
pysm_components_string = "d1"
4 changes: 4 additions & 0 deletions mbs-s0016-20241111/synchrotron_s1.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tag = "synchrotron_s1"

[pysm_components]
pysm_components_string = "s1"
25 changes: 25 additions & 0 deletions mbs-s0016-20241111/verification/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Simulation verification

## CO Lines

[Verify CO Lines notebook](verify_CO.ipynb)

## Power spectra

All components except CO and Radio Galaxies,
the B Spectra of the CMB components are affected by high noise due to `ud_grade` performed in the on-the-fly run with PySM inside the notebook.
If the run is properly executed at Nside 4096, no artificial noise is visible anymore.

* [SAT T](https://nbviewer.org/gist/zonca/a55ae7752c39c8274c17ed829dc7c138)
* [SAT E](https://nbviewer.org/gist/zonca/c4ca5c3b321788dae65c5d36eb7700b3)
* [SAT B](https://nbviewer.org/gist/zonca/e403f0adc49e50b42ebdacaf2c10f2c9)
* [LAT T](https://nbviewer.org/gist/zonca/950b8d863f1bbd751b50e29898fed2f5)
* [LAT E](https://nbviewer.org/gist/zonca/cb898d97386a8da9b0a5d0379b16188f)
* [LAT B](https://nbviewer.org/gist/zonca/4dc9d357afaa0af6514bf4aaa2683896)

# Visual inspection of maps

* [galactic_foregrounds_d1s1](https://nbviewer.org/gist/zonca/da7e9df97c499337e811c9f9fd9ec6f8)
* [galactic_foregrounds_lowcomplexity](https://nbviewer.org/gist/zonca/7ea202cd47a003b8592d6c816f1f2fe5)
* [galactic_foregrounds_mediumcomplexity](https://nbviewer.org/gist/zonca/3f6266027d674fd931e1895fc248b9f1)
* [galactic_foregrounds_highcomplexity](https://nbviewer.org/gist/zonca/2c7f768d2ab1acd026f64fb120192b3f)
Loading