cosmicrays / hermes

HERMES is a publicly available computational framework for the line of sight integration over galactic radiative processes which creates sky maps in the HEALPix-compatibile format.
GNU General Public License v3.0
23 stars 9 forks source link

CMZ region in CO not read #3

Closed carmeloevoli closed 3 years ago

carmeloevoli commented 3 years ago

https://github.com/cosmicrays/hermes/blob/1587c84bf0f4620852f9c3bc5b3165360202c003/src/neutralgas/RingModel.cpp#L73

carmeloevoli commented 3 years ago

To include the CMZ in the calculations I first implemented two different boundary vectors for the HI and the CO case: https://github.com/cosmicrays/hermes/blob/5db79b63919d97674f5365a478d800bf9b9cb8ad/include/hermes/neutralgas/RingModel.h#L50

then the correct order when using the rings is specified in https://github.com/cosmicrays/hermes/blob/5db79b63919d97674f5365a478d800bf9b9cb8ad/src/neutralgas/RingData.cpp#L62

QRemy commented 3 years ago

Thanks @carmeloevoli for the fix.

The far-CMZ component is truncated so better boundaries would be {0_kpc, 0.2_kpc, 0.86_kpc,... However the cut of the CMZ and the far-CMZ from the rings was not done in R but in (l,v) space so there is some overlap between the two maps in longitude near l=1.3. For these components it would be even better to compute Rmin, Rmax separately. I would do something like that : CMZ : Rmax = Rsun tan(lmax) with lmax = max(abs(l where Wco_CMZ>0)) far-CMZ : Rmax = Rsun tan(lmax) with lmax = max(l where Wco_farCMZ>0) Rmin = Rsun tan(lmin) with lmin = min(l where Wco_farCMZ>0)

A simpler alternative to avoid losing informations at the overlap would be to drop the CMZ/far-CMZ separation by summing the maps and use as boundaries {0_kpc, 0.86_kpc,...

carmeloevoli commented 3 years ago

Thanks @QRemy for the clarification.

I will implement the simpler alternative you suggested on Monday. I'm confident it will not significantly impact on large scale calculations. Implementing the cut in (l,v) space is not so trivial in the RingModel class as it is now, but I plan to design a specific integrator for the CMZ region to be used when high-resolution maps in this window will be needed.

QRemy commented 3 years ago

It also seems that rings 10 and 11 are still completely empty while there should be (weak) emission from the two last rings.

carmeloevoli commented 3 years ago

yes, I confirm the problem. Working on it.

carmeloevoli commented 3 years ago

I fixed a bug that was present when we read the ring boundaries at: https://github.com/cosmicrays/hermes/blob/0446fbe47a3f94fa8c6162ad91e39c50c5dea58a/src/neutralgas/RingModel.cpp#L59

After that change, the 11 rings of HI (the last is named `hvc' and I neglected) are read and accounted for computation.

The CO rings are computed as you suggested adding the last two rings in the 0-th ring from 0 to 0.86 kpc: https://github.com/cosmicrays/hermes/blob/0446fbe47a3f94fa8c6162ad91e39c50c5dea58a/src/neutralgas/RingData.cpp#L66

Still the last CO ring is empty, but that should be because the pixels where the CO column density for that ring is larger than 0 are always directions along which the cosmic-ray density is negligible.

You can have a quick look to the gamma-ray flux computed for each CO and HI ring (still NSIDE=128) by getting this file here.

carmeloevoli commented 3 years ago

Indeed, I repeated the calculations with higher resolutions (in particular NSIDE=256 for the skymap) and now also the last CO ring has been populated. See the plots (~31 Mb) here.

QRemy commented 3 years ago

Thanks, that looks good, no further comments.