CRPropa / CRPropa3

CRPropa is a public astrophysical simulation framework for propagating extraterrestrial ultra-high energy particles. https://crpropa.github.io/CRPropa3/
https://crpropa.desy.de
GNU General Public License v3.0
71 stars 69 forks source link

TurbulenceSpectrum.sIndex is initialized to 5, not 5/3 #322

Closed antoniusf closed 3 years ago

antoniusf commented 3 years ago

Describe the bug I would expect the TurbulenceSpectrum constructor to initialize sIndex to 5/3 by default (and this seems to be the intent of the code). Instead, it appears to be initialized to 5.

To Reproduce

from crpropa import TurbulenceSpectrum
spectrum = TurbulenceSpectrum(1, 1, 10)
print(spectrum.getSindex())

Expected behavior The output should be 5/3, ie someting like 1.67. (The actual output is 5.0.)

System (please complete the following information):

lukasmerten commented 3 years ago

I can confirm that issue.

System

Operating system: Ubuntu 18 Python version: 3.6.9 SWIG Version: 3.0.12 cmake version: 3.10.2