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

SOAP optimization: remove redundant particle sorting #64

Open
jchelly opened this issue Jan 19, 2024 · 0 comments
Open

SOAP optimization: remove redundant particle sorting #64

jchelly opened this issue Jan 19, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@jchelly
Copy link
Collaborator

jchelly commented Jan 19, 2024

SOAP could be sped up by feeding pre-sorted particles to the property calculations.

Currently the function process_single_halo() in halo_tasks.py finds all of the particles in some radius around the halo centre and feeds them to the property calculations from SO_properties.py, aperture_properties.py and subhalo_properties.py. The radius used is the largest radius needed by any of the property calculations. All property calculations receive the same set of particles, and all of the property calculations start by sorting the particles by radius.

There are two opportunities to speed up the code here:

  • The sorting by radius could be done once before any of the property calculations are called
  • Each property calculation could be passed just the particles it needs. Smaller apertures would then process many fewer particles.

To do this we would probably need to factor out the *ParticleData classes into a single class to be set up before calling any of the property calculations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant