-
Notifications
You must be signed in to change notification settings - Fork 23
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
Implement 3D model of dust emission #38
Comments
There is no python implementation yet. |
Thanks @delabrou, We have these models for dust: Do you think it would be feasible to modify one of the classes in |
I think it might be doable to modify one of the classes. What we need is just a sum of six blackbodies, i.e. six dust blackbody components. |
if you can only do nside 2048 no problem, we can use those, PySM will ud_grade them to the requested nside. so you could start working on a pull request to this repository which adds a class to |
@delabrou any updates on this? |
I got back to this recently, I found a bug in my code when Nside is different from 512. I am fixing it now and checking everything. More later. |
@delabrou any progress? |
from @delabrou:
There are also nside 256 versions at https://www.apc.univ-paris7.fr/Downloads/Planck/PSM-Data/MKD-MODEL-PanExGal/ |
Hi Brandon
Thanks, this is useful. While the general amplitude of the I857/I353 ratio fluctuates with an amplitude similar to that we see on real data, It is not distributed as that of real data, so this probably requires further investigations / refinements in the future (again, along the line of correlation of color with total amplitude)…
Jacques
|
I will create a single model |
ok, started to work on this in #87 |
@brandonshensley can you please run your notebook starting from the maps at nside 2048 but |
copied templates to NERSC: https://portal.nersc.gov/project/cmb/pysm-data/mkd_dust/ |
@delabrou we discussed about this model at the call today. I was wondering if it would be possible for you to run again your model at 2048 but extract all the parameters that are necessary to fill-in the small scales, and then we could have small scales generated inside PySM on the fly at the required resolution. For example this is what we want to implement for one of GNILC models: see https://gist.github.com/zonca/fa6e78df72230028ac027cf0e338aa74 I save:
Then use those inputs to generate small scales on the fly. Do you think we could do something similar? |
@Andrea in principle, what you suggest should be doable. Let me have a look.
… On 6 Oct 2021, at 17:15, Andrea Zonca ***@***.***> wrote:
@delabrou <https://github.com/delabrou> we discussed about this model at the call today.
I was wondering if it would be possible for you to run again your model at 2048 but extract all the parameters that are necessary to fill-in the small scales, and then we could have small scales generated inside PySM on the fly at the required resolution.
For example this is what we want to implement for one of GNILC models: see https://gist.github.com/zonca/fa6e78df72230028ac027cf0e338aa74 <https://gist.github.com/zonca/fa6e78df72230028ac027cf0e338aa74>
I save:
Large scale Alms
modulation maps in amplitude and polarization
The C_ell of the small scales (up to ell of 2*8192, just need to extrapolate the small scales power spectrum you already have, this also includes suppression of large scales)
Then use those inputs to generate small scales on the fly.
Do you think we could do something similar?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#38 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACXLM5I4FJDXPGCTE6UAUXDUFTRBTANCNFSM4KOJIAMQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Hi @zonca, I updated my notebook to include an NSIDE=8 test. All units are MJy/sr (which are the units of the input amplitude maps from @delabrou). Happy to make changes and provide my copies of the output maps if needed. Let me know if this is what you had in mind. |
yes, @brandonshensley, can you please share your nside8 maps? |
nevermind, I just ran your notebook |
@delabrou @brandonshensley while debugging the implementation I found something strange, the last 3 layers of the maps at N_side 2048 are zero:
|
The last three layers correspond to distant shells. They are non-zero only close to the galactic plane. Where are you checking those values?
… On 13 Oct 2021, at 08:38, Andrea Zonca ***@***.***> wrote:
@delabrou <https://github.com/delabrou> @brandonshensley <https://github.com/brandonshensley> while debugging the implementation I found something strange, the last 3 layers of the maps at N_side 2048 are zero:
>>> for i in range(1 , nlayers+1):
print(i, hp.read_map(('thermaldust/thermaldust_ampl%d.fits' % i))[:5])
1 [0.05139871 0.05129357 0.05620123 0.05712916 0.05806479]
2 [0.01265912 0.01180437 0.01253842 0.01286273 0.01333025]
3 [0.00046295 0.00057229 0.00038549 0.00088876 0.00075269]
4 [0. 0. 0. 0. 0.]
5 [0. 0. 0. 0. 0.]
6 [0. 0. 0. 0. 0.]
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#38 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACXLM5KJWGFOEODUVQHJ44DUGWRXVANCNFSM4KOJIAMQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
thanks @delabrou, now I understand, maps are fine, sorry, it seemed like a bug to have all those identically zeros. |
I fixed some issues, I still get a discrepancy of a few percent, too big to be due to rounding errors. I am worried about the unit conversions. So in @brandonshensley 's notebook if I consider pixel 0 of the first layer and scale it to 857 GHz: 353GHz 0.06112886862365485 MJ/sr In my code: first the input is converted to 15.967064316226011 uK_RJ (freq / freq_ref) ** (mbb_index[i_layer][0] - 2.0) blackbody_ratio(freq, freq_ref, mbb_temperature[i_layer])[0] (Pdb) p freq, freq_ref the output of just the first layer is
it is about 4% off. |
Hi @zonca, trying to get on the same page. For my NSIDE=8 maps, I have:
which doesn't quite match the numbers you quote above? Am I looking at the right thing? |
@brandonshensley I am loading the nside 2048 maps and ud_grading them to nside 8 |
T = 17.66577373725886 |
Ah ok, I see now that I am working with the NSIDE=512 template maps. Let me try numerics by hand. =) |
Using that temperature, I recover from WolframAlpha your mbb factor of 2.4865919382728716 to seven digits to the right of the decimal. Sticking to MJy/sr and a 353 GHz flux density of 0.06112886, I arrive at 0.651285 MJy/sr at 857 GHz, which is what you quote above. Not sure if that helps. |
Ok so doing the scaling in UK RJ is 4% different than using MJy/sr? Is it reasonable? |
No, they really should be identical. 0.651285 MJy/sr at 857 GHz is what I get doing it by hand, so believe that is correct. Is the 0.635876 MJy/sr you quote above using my code? If so, there must be something amiss in my implementation (hard coded units?). |
Yes, I also swapped the units with the astropy contants but got same
result. I can check more carefully later.
…On Wed, Oct 13, 2021, 15:53 brandonshensley ***@***.***> wrote:
No, they really should be identical. 0.651285 MJy/sr at 857 GHz is what I
get doing it by hand, so believe that is correct. Is the 0.635876 MJy/sr
you quote above using my code? If so, there must be something amiss in my
implementation (hard coded units?).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#38 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAC5Q4VNPX2J5BITJJ3IQITUGYEWZANCNFSM4KOJIAMQ>
.
|
Mea culpa, I swapped nu and T in my B_nu function:
instead of
That should fix it. |
ok, now tests pass, the model at 2048 is ready. #87 |
|
completed in #87 |
Got in touch with Ginés Martínez-Solaeche and Jacques Delabrouille about implementing the model: "A 3-D model of polarised dust emission in the Milky Way" published in https://arxiv.org/abs/1706.04162
Would like first to complete and merge #37 that we could use as a reference.
It would be nice to know:
The text was updated successfully, but these errors were encountered: