-
Notifications
You must be signed in to change notification settings - Fork 37
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
solution from particle added by add_tracking_particle is not obtainable with get_solution() #52
Comments
Hi! Which interaction model are you using? Any more details? |
OK, I figure out what's not working. Since you're adding a new particle after everything has been reinitialized, the system size changed, so the dimensions need updating. After adding particles, you need to:
How did you find the tracking_particle features? Was it documented somewhere? |
Thanks for your fast response. It works for me now for Sybill 2.3c and GSF. I think I found it when I searched for the obs_particle function, and found that it has been replaced by the add_tracking_particle function. I don't think it was documented, the doc string is a bit outdated.
|
Thanks. I’ll add it to the ToDO |
@lpyras I played a little bit with this undocumented feature, but never got it to work. Really happy about this issue, this helps me a lot! :) |
Ah, I rediscovered what didn't work for me earlier. |
It is technically possible but a different data file is needed. |
I tried to calculate the contribution of D+ and D0 to the muon flux but adding the particle tracking did not work for me.
Here is the code snipped:
mceq_run.pman.add_tracking_particle([(411, 0), (421, 0)], (-13, 0), 'blabla', from_interactions=False) mceq_run.solve() blabla = mceq_run.get_solution('blabla', mag)
File "/Users/username/Software/MCEq/MCEq/core.py", line 244, in get_solution res = sum_lr(particle_name, prefix='') File "/Users/username/Software/MCEq/MCEq/core.py", line 203, in sum_lr result += sol[ref[prefix + ls].lidx:ref[prefix + ls].uidx] ValueError: operands could not be broadcast together with shapes (121,) (0,) (121,)
Can you tell me what I did wrong?
The text was updated successfully, but these errors were encountered: