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

Allow all slices of state to be set #104

Merged
merged 4 commits into from
Oct 21, 2024
Merged

Allow all slices of state to be set #104

merged 4 commits into from
Oct 21, 2024

Conversation

richfitz
Copy link
Member

@richfitz richfitz commented Oct 17, 2024

Like #103, this is a bunch of bookkeeping.

We set state in two places:

  • dust_system_set_state
  • dust_likelihood_run via initial

In the former especially it is useful to set a subset of possible states; this might be some state variables, some particles or some groups (the middle one is actually not that exciting most of the time). When we do this we might want to recycle one dimension of our input over all remaining inputs (so setting all particles to the same state vector).

This PR does all possible combinations of this. It's actually less terrible than it sounds, and most of the work is a little validation function prepare_state.

There will be a few more of these type coming as we look to get index_group and similar args through basically every function that could possibly use them

@richfitz richfitz requested a review from weshinsley October 17, 2024 15:09
@richfitz richfitz marked this pull request as ready for review October 18, 2024 07:49
@weshinsley weshinsley merged commit 0f3706b into main Oct 21, 2024
7 checks passed
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.

2 participants