Closed oanguner closed 1 year ago
Hey @oanguner,
you can find the galactic mass distributions for both models here: https://syncandshare.desy.de/index.php/s/aR8wkqYYkDyfWgs
I will prepare a PR to add this to the documentation.
Hi @JulienDoerner
Thanks for your swift response.
I have just noticed the following two problems while trying to follow your example notebook:
1-) grid = Grid1f(origin, nX, nY, nZ, spacing) grid.setClipVolume(True) # return 0 outside of the volume
AttributeError: 'crpropa.Grid1f' object has no attribute 'setClipVolume'
2-) isHI = False, isH2 = True, isHII = False dens = DensityGrid(grid, isHI, isHII, isH2)
NameError: name 'DensityGrid' is not defined
I'm using the latest stable release (CRPropa3-3.2). I wonder if these errors are related to my installation (I use Ubuntu). For example, I could not really find the 'DensityGrid' class in the code, but there is another one called 'SourceDensityGrid'.
Hey @oanguner, The feature ClipVolume was introduced after the last stable release and will be included in 3.2.1. You can use the current master branch to use this feature.
I'm trying to follow your 'Example of grid based densities of the Milky Way and sampling source position' tutorial [1]. I could not find the 'H2_dens_mean_BEG03.txt' H2 density distribution file neither on the 'additional resources' link you provided [2] nor in the CRPropa3-data [3]. Could you please let me know where I can find this txt file ?
Related to this, I would also like to ask the following questions:
As I understand, 'H2_dens_mean_BEG03.txt' file corresponds to 'H2_dens_mean_BEG03.fits' file on Mertsch & Vittino A&A 655, A64 (2021 [4], which uses BEG03 gas flow model. Do you also have the transformed txt file for the other SBM15 gas flow model (i.e. H2_dens_mean_SBM15.txt) ?
Is the 'fits to txt converter' code/module you use for such conversion somewhere in CRPropa, so that one can generate the required gas density txt file from any given fits file ?
[1] https://crpropa.github.io/CRPropa3/pages/example_notebooks/density/density_grid_sampling.html [2] https://desycloud.desy.de/index.php/f/451988900 [3] https://github.com/CRPropa/CRPropa3-data [4] https://zenodo.org/record/5501196#.ZGy0OxlBxkh