Skip to content

Conversation

@langfzac
Copy link

@langfzac langfzac commented Aug 17, 2018

Previous version returned an error where calling f1['rho'] did not work since 'f1' still contained an index for the star particles.

Since all we care about are the gas particles, and the star particles are at the end of the iorder (as per convention), we can set the 'iorder' and 'particle_nums' arrays to be the size of 'f.g' instead of 'f'. Then, since 'clump_nums' will be the size of 'f', we can slice the star particles at the end of the array out and mask 'f.g', 'iorder', and 'particle_nums' where 'clump_nums' > 0. This ensures that 'f1' contains only gas particles, and that all the arrays are the same size.

@langfzac langfzac closed this Aug 17, 2018
@langfzac langfzac deleted the rhofix branch August 17, 2018 22:10
@langfzac langfzac restored the rhofix branch August 17, 2018 22:10
@langfzac langfzac reopened this Aug 20, 2018
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