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
65 stars 66 forks source link

'SimpleTurbulenceSpectrum' is not defined. #475

Closed ViniciusMalafatti closed 3 months ago

ViniciusMalafatti commented 4 months ago

I installed the CRPropa, and i try to simulate 4D simulation, but when i try to run in the Terminal, i receive this message " File "/home/vinicius/.virtualenvs/crpropa/4dsimulation.py", line 9, in turbSpectrum = SimpleTurbulenceSpectrum(Brms, lMin, lMax, sIndex) NameError: name 'SimpleTurbulenceSpectrum' is not defined. Did you mean: 'TurbulenceSpectrum'? "

I use Ubuntu, and i'm using to run crpropa virtualenv, the other examples is working but that not. I don't know what to do.

Thanks..

ehlertdo commented 4 months ago

Have you made sure when installing CRPropa that 'FFTW3' was included during the build process? I.e. that it is installed and was also found by the installer script?

ViniciusMalafatti commented 4 months ago

Yes, i checked the files and it was included, i tested if the FFTW3 is working correctly, i use this command below to see which modules they are using, and they are using the module "Turbulence Spectrum", i don´t know if the correct module is the "SimpleTurbulenceSpectrum".

"crpropa_module_names = dir()

print the names

for name in crpropa_module_names: print(name)"

rafaelab commented 4 months ago

Hi @ViniciusMalafatti, As @ehlertdo said, this error is likely because FFTW3f is not installed. You should make sure that the corresponding header file and library are found by cmake when you install CRPropa.

ViniciusMalafatti commented 3 months ago

Hi @rafaelab and @ehlertdo , i used the cmake and it works kkkk i can´t explain how, but it is working. Thanks for the help