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

events_pi concat logic #512

Open
jllanfranchi opened this issue Sep 21, 2018 · 1 comment
Open

events_pi concat logic #512

jllanfranchi opened this issue Sep 21, 2018 · 1 comment

Comments

@jllanfranchi
Copy link
Contributor

originally shows up here: https://github.com/jllanfranchi/pisa/blob/37f168b2d98bd51d8ab90a66c06a80e1a179ef40/pisa/core/events_pi.py#L309-L315
where the np.append was being done, but that will operate on a dict but you can't np.concat dicts. I think whoever wrote this got confused (and confused me) by iterating over keys, values and calling them subkey, subval. Should iterate over key, val and then within each val iterate over subkey, subval and then the arrays live under there and so concatenation can be done.

In the latest commit, this now shows up at
https://github.com/jllanfranchi/pisa/blob/d356c92b9c96495cb3e0044ca44f277540b76697/pisa/core/events_pi.py#L413-L414
and
https://github.com/jllanfranchi/pisa/blob/d356c92b9c96495cb3e0044ca44f277540b76697/pisa/core/events_pi.py#L431-L434

@thehrh thehrh added this to the PISA 4.2 milestone Jul 30, 2024
@thehrh
Copy link
Contributor

thehrh commented Jul 30, 2024

I believe this bug currently affects

It doesn't seem to affect anyone in practice, though? Perhaps just assert that the output_data doesn't already contain a given key (describing (anti)neutrino flavour and interaction type) as a quick fix until someone really needs the concatenating logic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants