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

Oscar class cannot load OSCAR IC format. #291

Closed
LucasConstantin opened this issue Oct 10, 2024 · 3 comments
Closed

Oscar class cannot load OSCAR IC format. #291

LucasConstantin opened this issue Oct 10, 2024 · 3 comments

Comments

@LucasConstantin
Copy link

LucasConstantin commented Oct 10, 2024

When trying to load a SMASH_IC.oscar file with the Oscar class, it throws the error Traceback (most recent call last): File "/mnt/c/Users/lucas/Desktop/Masterarbeit_project/old stuff/densities.py", line 76, in <module> oscar = sparkx.Oscar(path, events=event_number) File "/usr/local/lib/python3.9/dist-packages/sparkx/Oscar.py", line 259, in __init__ self.set_particle_list(kwargs) File "/usr/local/lib/python3.9/dist-packages/sparkx/Oscar.py", line 466, in set_particle_list raise ValueError( ValueError: First line of the event is not a comment line or does not contain "out". This is because the Header of the IC file looks like this:

#!OSCAR2013Extended SMASH_IC t x y z mass p0 px py pz pdg ID charge ncoll form_time xsecfac proc_id_origin proc_type_origin time_last_coll pdg_mother1 pdg_mother2 baryon_number strangeness
# Units: fm fm fm fm GeV GeV GeV GeV GeV none none e none fm none none none fm none none none none
# SMASH-3.1-34-g1a1d4e311
# event 0 in 32

@NGoetz

@NGoetz
Copy link
Member

NGoetz commented Oct 10, 2024

This is odd. Which branch/version did you use
I can successfully read SMASH IC files like this:

#!OSCAR2013Extended SMASH_IC t x y z mass p0 px py pz pdg ID charge ncoll form_time xsecfac proc_id_origin proc_type_origin time_last_coll pdg_mother1 pdg_mother2 baryon_number strangeness
# Units: fm fm fm fm GeV GeV GeV GeV GeV none none e none fm none none none fm none none none none
# SMASH-3.1-2-g5fca8ba3d
# event 0 in 394
1.48298 -0.689019 -0.64689 0.00219842 0.938 1.17148261 -0.671010855 0.00374341379 -0.205567343 2212 1227 1 1 6.75142 0.245787 263 3 1.35506 2112 2224 1 0
1.48298 -0.286286 5.2746 -0.00281849 0.138 0.54626123 -0.130207093 0.510405378 0.0434717669 111 1129 0 1 15.1144 0.0761929 203 45 0.991348 2114 -211 0 0
1.48298 -1.15469 -2.95362 -0.00304847 0.782943 0.822126541 0.0141980838 -0.210954296 -0.134865008 223 967 0 1 6.7216 0.113003 142 45 0.815581 1114 2212 0 0

as IC reading is implemented. I used version 1.2.1

@NGoetz
Copy link
Member

NGoetz commented Oct 10, 2024

Actually I don't get the error at all. The header of the IC is exactly like any SMASH header, that's why before event processing the first 3 lines are dropped, and then the event line is processed. I would double check that the correct file is read in and not corrupted.

@NGoetz
Copy link
Member

NGoetz commented Oct 10, 2024

Closed by #292

@NGoetz NGoetz closed this as completed Oct 10, 2024
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