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

Problem on running the example of galactic lensing #506

Open
swaraj3026 opened this issue Sep 24, 2024 · 2 comments
Open

Problem on running the example of galactic lensing #506

swaraj3026 opened this issue Sep 24, 2024 · 2 comments

Comments

@swaraj3026
Copy link

Shows this error in all the galactic lensing examples -
"The kernel for file_name.ipynb appears to have died. It will restart automatically."
For this code which is in the example section. Except this, all examples are running smoothly

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%matplotlib inline

import healpy
import matplotlib.pyplot as plt

#stack all maps
crMap = np.zeros(49152)
for pid in M.getParticleIds():
energies = M.getEnergies(int(pid))
for i, energy in enumerate(energies):
crMap += M.getMap(int(pid), energy * crpropa.eV )

#plot maps using healpy
healpy.mollview(map=crMap, title='Unlensed')
plt.savefig('unlensed_map.png')
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Apple Macbook Air:

  • Operating system: MacOS 15
  • M1 chip
  • Python version: 3.12
  • Swig version: 4.2.1
  • Cmake version: 3.30.3
@lukasmerten
Copy link
Member

Hi @swaraj3026
This is unfortunately a known issue and several attempts to fix the bug did work yet. If you rely on the lenses, you probably best go back to an earlier python version (I think 3.6) and a Linux machine. There the tests for the lenses were running the longest.
Otherwise we are working on a new implementation of the lenses but the project has no scheduled time frame.

@swaraj3026
Copy link
Author

swaraj3026 commented Nov 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants