-
Notifications
You must be signed in to change notification settings - Fork 274
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
BUG: fix compatibility with gadget 2 files using '*.gad.*' template #3899
Conversation
88dd9b3
to
be7684a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! A couple of questions, but don't think they should hold up this PR, even if you agree:
GadgetHDF5Dataset._set_owls_eagle
does something similar with filename_template
-- is it worth moving your change into its own method at the GadgetDataset
level (e.g., GadgetDataset.set_filename_template()
) to use in both spots?
Related -- do you think there's any benefit to adding an explicit way to set the filename_template
(maybe a kwarg)?
I wasn't aware ! Yes, I think this is worth including in the present PR, thank you !
Clearly it would have a benefit that users that need such patches wouldn't need to either wait for a new release or install from source. On the other hand such changes should hopefully be extremely rare so I don't think it's worth the additional maintenance weight. |
I spoke too soon. I don't feel confortable to change the
Any way I don't understand these formats well enough to make further changes in that direction. |
Ya, totally fair. I obviously don't fully understand these formats either :) These are also simple enough to fix down the line if there is need. I'll go ahead and merge since this is a bug fix. |
BUG: fix compatibility with gadget 2 files using '*.gad.*' template
PR Summary
This fixes an issue where some Gadget2 files can't be loaded because their names aren't compatible with the filename template we have.
This problem was reported on Slack by @Gustav-Madsen. Here's an example dataset to test this on http://skun.iaa.es/SUsimulations/UchuuDR1/ShinUchuu/SamplingParticle/snapdir_070/
I was able to make a simple plot of this dataset, only downloading the first 3 files