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

Gamma-ray Flux with EGMF #489

Open
RodrigoSasse opened this issue May 22, 2024 · 4 comments
Open

Gamma-ray Flux with EGMF #489

RodrigoSasse opened this issue May 22, 2024 · 4 comments
Labels
usage-question Questions on how to use CRPropa etc., that are not bugs.

Comments

@RodrigoSasse
Copy link

Hello,

I'm trying to reproduce some of the results presented in the article on the latest version of CRPropa3 (10.1088/1475-7516/2022/09/035), in particular I'm interested in better understanding the Electromagnetic cascades and thinning module. I'd like to know how best to reproduce the figure 6 shown in the article.
fig6

So far I've been trying to combine the 4D simulation with EGMF modules and the Electromagnetic cascades example in a single script, but I'm getting very different results.

gamma

my questions are how to generate gamma rays with an energy lower than 10 GeV? Even if I set a minimum energy of 1 GeV, the flux generated is still starts at 10 GeV. Furthermore, in these tests it seems to me that the gamma flux is not suppressed by the stronger magnetic fields or the EGMF has no effect. I've attached an example of the script I'm using to test it example.txt

Another question is what would be the best strategy for saving and propagating the secondary photons generated by the propagation of nuclei to the observer in the 4D scenario? Do the Electromagnetic Cascades modules already do this or is it still necessary to use the DINT code?

@JulienDoerner
Copy link
Member

Hey @RodrigoSasse,

I tried to reproduce your results using the release 3.2.1.
In my case, I got photons with energies down to 1 GeV as expected. Which CRPropa version are you using?

The Impact of the magnetic field can not be seen in your simulation as you are using a 1D observer. This is the full $x=0$ plane. You should consider using a 3D observer like a sphere. In this case the electrons can be deflected away from the observer direction.

For the propagation DINT is not used anymore. All parts of the cascades can be done with the corresponding EM-module (like in your simulation setup). It doesn't matter where the photons are originated from.

@JulienDoerner JulienDoerner added the usage-question Questions on how to use CRPropa etc., that are not bugs. label May 23, 2024
@RodrigoSasse
Copy link
Author

Hello @JulienDoerner,

I'm using version 3.2.1 and I've also done some tests on version 3.1.7, in both cases I've only obtained photons with energy above 10 GeV. The 3D observer structure seems to be working now, thanks, but still the gamma flux is not similar to the one in the paper, the flux increases in the energy range of 1 -10 TeV when I use the EGMF module.

@rafaelab
Copy link
Member

rafaelab commented Jun 4, 2024

I cannot reproduce the lower energy problem with 3.2.1.
A few years ago the tables stopped at 10 GeV, but now they go down to 1 GeV.
It is possible that an older version is being used.

@RodrigoSasse
Copy link
Author

I reinstall the CRPropa3, to do that I downloaded the latest release in the installation page, this is my log installation in the terminal:

rodrigo@rodrigo-Dell:~/CRPropa3/build$ cmake .. -DCMAKE_INSTALL_PREFIX=$/home/rodrigo/CRPropa3/build
-- Use --as-needed linker flags!
With SIMD_EXTENSIONS "none" tricubic interpolation of vector grids is not possible. You should set SIMD_EXTENSION to a compatible value ("avx", "avx+fma", or -- depending on the build CPU -- "native"). Trilinear interpolation is still possible.
-- Build Type: Release
-- CRPropa version: 3.2.1-115-g1dba43e2 1dba43e refs/heads/master
Using provided EIGEN
-- Google perftools: NOT Found!
-- Include: GOOGLE_PERFTOOLS_INCLUDE_DIR-NOTFOUND
-- FFTW3 with single precision (FFTW3F): Found!
-- Include: /usr/include
-- Library: /usr/lib/x86_64-linux-gnu/libfftw3f.so
-- muParser: Found!
-- Include: /usr/include
-- Library: /usr/lib/x86_64-linux-gnu/libmuparser.so
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11")
-- Found HDF5: /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libcrypto.so;/usr/lib/x86_64-linux-gnu/libcurl.so;/usr/lib/x86_64-linux-gnu/libpthread.a;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.a;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.10.7") found components: C
-- Use absolute RPATH /home/rodrigo/CRPropa3/build/$/home/rodrigo/CRPropa3/build/lib
-- Downloading data files from sciebo ~ 73 MB
-- Extracting data file
Error copying directory from "/home/rodrigo/CRPropa3/build/data-2024-03-11/data" to "/home/rodrigo/CRPropa3/build/data/".
-- Build of documentation disabeled. Enable with BUILD_DOC=On
-- Python: Found!
-- version 3.10.14
-- executable: /home/rodrigo/miniconda3/bin/python3.10
-- libraries: /home/rodrigo/miniconda3/lib/libpython3.10.so
-- headers: /home/rodrigo/miniconda3/include/python3.10
-- site packages: /home/rodrigo/miniconda3/lib/python3.10/site-packages
-- development libraries: Found!
-- package install directory: /home/rodrigo/miniconda3/lib/python3.10/site-packages
-- NumPy: Found!
-- headers: /home/rodrigo/miniconda3/lib/python3.10/site-packages/numpy/core/include (version 1.26.4)
-- Configuring done
CMake Warning at CMakeLists.txt:523 (add_library):
Cannot generate a safe runtime search path for target crpropa-swig because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/rodrigo/miniconda3/lib
runtime library [libcrypto.so.3] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/rodrigo/miniconda3/lib
runtime library [libcurl.so.4] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /home/rodrigo/miniconda3/lib

Some of these libraries may not be found correctly.

-- Generating done
-- Build files have been written to: /home/rodrigo/CRPropa3/build

After finish the installation (make & make install) I tried again to reproduce the results of the paper and even so the photons remain at a minimum energy of 10 GeV.
gammaEGMF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage-question Questions on how to use CRPropa etc., that are not bugs.
Projects
None yet
Development

No branches or pull requests

3 participants