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

Particles splits script #69

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Particles splits script #69

wants to merge 3 commits into from

Conversation

robjmcgibbon
Copy link
Collaborator

@robjmcgibbon robjmcgibbon commented Jan 8, 2025

This PR updates a couple of things relating to the particle splitting script

  • Look for .txt files instead of .hdf5, and don't complain if the file is empty
  • The original script was written with numpy 1.xx, but numpy 2 was giving an overflow error when trying to add a np.int64 to an array of python ints
  • SWIFT outputs negative numbers for progenitor trees. I'm not convinced we're handling this properly

@robjmcgibbon
Copy link
Collaborator Author

robjmcgibbon commented Jan 9, 2025

Particles with 64 splits can have a SplitTrees value which is negative. This is because SWIFT outputs the SplitTrees values as a signed long. This was causing issues since python has unbounded integers, so I now convert all negative integers to their equivalent unsigned version.

Since SWIFT no longer output negative progenitor IDs (which was a bug), I have removed the code we put in place to handle such particles. This is just reverting #59

I don't think any more changes are required. I'm currently testing this on the L0200N3008 box.

  • Finish testing

@robjmcgibbon
Copy link
Collaborator Author

robjmcgibbon commented Jan 9, 2025

I looked at a few particles with > 64 splits in the L0200N3008 and they appear to have been processed correctly. For reference I was looking at snapshots 53/54, as that's where the first overflow appears. The region is [150.87459943 93.73696643 98.33375143]

We need to rerun the particle splitting (and HBT itself) for snapshot 38 onwards

@robjmcgibbon robjmcgibbon marked this pull request as ready for review January 9, 2025 14:04
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

Successfully merging this pull request may close these issues.

1 participant