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

Too small n_particles in config causes particles to be omitted #96

Open
mortele opened this issue May 5, 2021 · 1 comment
Open

Too small n_particles in config causes particles to be omitted #96

mortele opened this issue May 5, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mortele
Copy link
Member

mortele commented May 5, 2021

Specifying the wrong n_particles (too small) in config.toml causes the remainder of the particles to be ignored because input_parser.check_n_particles is called after the "indices" dataset in the input .HDF5 file is read.

We should remove this keyword from the config and always read the number of particles from the length of in_file["indices"].

@mortele mortele added the bug Something isn't working label May 5, 2021
@mortele mortele self-assigned this May 5, 2021
@mortele
Copy link
Member Author

mortele commented May 5, 2021

We should be able to fish out the number of particles in the input .HDF5 file cheaply by

n_particles = in_file["indices"].size

without having to read the entire dataset into memory or iterating over it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant