-
Notifications
You must be signed in to change notification settings - Fork 13
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
rockstar+RAMSES functionality #238
rockstar+RAMSES functionality #238
Conversation
tangos is numbering from 0 onwards, while yt is using the rockstar ids in some random but deterministic (?) order.
adding rockstar+RAMSES functionality
Thanks @AnatoleStorck @cphyc - do you understand why the enzo test database now fails to build? If needed you can try this locally by running |
I have moved the new functions in the general YT handler which were causing the Enzo test to fail (I still do not understand why) into the input handler for RAMSES+rockstar. The Enzo test now passes. Since this pull request is for supporting RAMSES+rockstar functionality, this should be fine. |
To me it looks like people who have developed their own input handlers that derive from (I am not sure why the tests are not actually running on Github Actions, by the way - will see if I can figure that out) |
9398589
to
3e51429
Compare
@cphyc and I fixed the issue, occurring due to the handler not importing the statfile if it exists. |
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 to me! I've left extensive comments to make it more yt-esque!
overdir = self._extension_to_filename("") | ||
snapfiles = glob.glob(overdir+ts_extension[:2]+len(ts_extension[2:].split('/')[0])*'?') | ||
rockfiles = glob.glob(overdir+"out_*.list") | ||
sortind = np.array([int(rname.split('.')[0].split('_')[-1]) for rname in rockfiles]) | ||
sortord = np.argsort(sortind) | ||
snapfiles.sort() | ||
rockfiles = np.array(rockfiles)[sortord] |
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.
Do you know where this piece of code comes from? It's really hard to make sense out of it and I'm wondering if we could simplify it somehow.
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.
So the YtRamsesRockstarInputHandler was first created by taking the YtEnzoRockstarInputHandler and adapting it to ramses datasets. This function is taken from there.
If you can pull master into this branch, it will also run the unit tests. At the moment only the integration test is running due to a configuration error in github actions. |
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.
Thank you for the suggestions! I will also remove the logging changes
overdir = self._extension_to_filename("") | ||
snapfiles = glob.glob(overdir+ts_extension[:2]+len(ts_extension[2:].split('/')[0])*'?') | ||
rockfiles = glob.glob(overdir+"out_*.list") | ||
sortind = np.array([int(rname.split('.')[0].split('_')[-1]) for rname in rockfiles]) | ||
sortord = np.argsort(sortind) | ||
snapfiles.sort() | ||
rockfiles = np.array(rockfiles)[sortord] |
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.
So the YtRamsesRockstarInputHandler was first created by taking the YtEnzoRockstarInputHandler and adapting it to ramses datasets. This function is taken from there.
Co-authored-by: Corentin Cadiou <[email protected]>
…leStorck/tangos into AnatoleStorck-rockstarRAMSESupdate update branch
Rockstar + RAMSES functionalities [rebase of #238]
Added functionality for adding RAMSES datasets with rockstar-galaxies catalogues using yt to tangos.