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 with TextOutput Output.Event3D #240

Closed
JohnUSP opened this issue Aug 23, 2019 · 2 comments
Closed

Problem with TextOutput Output.Event3D #240

JohnUSP opened this issue Aug 23, 2019 · 2 comments
Labels
usage-question Questions on how to use CRPropa etc., that are not bugs.

Comments

@JohnUSP
Copy link

JohnUSP commented Aug 23, 2019

Hy guys, I'm having a problem when I try to write to an output file the outcome of a 3D simulation in the format Output.Event3D. Below are the lines I'm using in my script but I also try with the notebook example in https://github.com/CRPropa/CRPropa3-notebooks/blob/master/sim4D/sim4D.v4.ipynb getting the same result: the code seems to run properly but the output file is empty.

obs = Observer()
obs.add(ObserverSurface(Sphere(Vector3d(0, 0, 0) * Mpc, 25 * Mpc)))
output = TextOutput('extragalactic_propagationBKol1nG_Lc1Mpc_Rs25Mpc.txt', Output.Event3D)
obs.onDetection(output)

@rafaelab
Copy link
Member

Hi,
Without your code, I cannot try to reproduce the problem.
As for the sim4d.py script, you might be getting an empty output because the statistics is low. If this is the case, you should get some events if: you change the example to SourceDirection(Vector3d(-1,0,0)) instead of SourceIsotropicEmission() AND if you use a very low magnetic field (try, for example, with 1e-16 G).
Let me know if these tests work in the sim4d example.

@TobiasWinchen TobiasWinchen added the usage-question Questions on how to use CRPropa etc., that are not bugs. label Oct 5, 2019
@TobiasWinchen
Copy link
Member

I assume that this issue is closed now - please reopen if I am mistaken.

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