-
Notifications
You must be signed in to change notification settings - Fork 4
Add uncertainty components to the gui #342
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
base: main
Are you sure you want to change the base?
Conversation
…, add toggle between the two for displaying
dashboard/calibration_manager.py
Outdated
| with html.Div( | ||
| style="display: flex; align-items: center; margin: 20px; justify-content: space-between;" | ||
| ): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remind me/us again on why we wrap everything within a with html.Div():? What does this accomplish specifically? Just trying to understand if it's necessary, optional, if it should be used elsewhere/everywhere where we set up other graphical components, etc. I'm sure I haven't used it consistently, or at all, so far, so I want to make sure I understand why it's here and what it does.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can also search the answer online, I'm asking just in case you have the answer ready off the top of your head.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrapped this in a div so that the alpha and beta sections are separate and they're flexboxes, but looking at it now I can just use a VRow to be more consistent with other parts of the code
| for _, value in simulation_calibration.items(): | ||
| sim_name = value["name"] | ||
| exp_name = value["depends_on"] | ||
| df_sim[exp_name] = df_sim[sim_name] / value["alpha"] + value["beta"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes must happen in parallel:
https://github.com/BLAST-AI-ML/synapse-bella-staging-injector/pull/4/changes#diff-d8d0422389f03d783e32e627250fe29834bd09c6361640d1ff00661dd6820034
https://github.com/BLAST-AI-ML/synapse-bella-acave/pull/3/changes#diff-d8d0422389f03d783e32e627250fe29834bd09c6361640d1ff00661dd6820034
https://github.com/BLAST-AI-ML/synapse-bella-ip2/pull/3/changes#diff-d8d0422389f03d783e32e627250fe29834bd09c6361640d1ff00661dd6820034
https://github.com/BLAST-AI-ML/synapse-bella-qed-ip2/pull/3/changes#diff-d8d0422389f03d783e32e627250fe29834bd09c6361640d1ff00661dd6820034
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we can find a way to write the formulas with formatting that looks more consistent, while keeping Ruff happy?
For sim to exp we have:
- Lines 19-21:
df_sim[exp_name] = (
df_sim[sim_name] / value["alpha_guess"] + value["beta_guess"]
)- Lines 27-30:
df_sim[exp_name] = (
df_sim[sim_name] / value["alpha_inferred"]
+ value["beta_inferred"]
)I think these two are okay, probably Ruff complains about having the second one on one line (does it?).
For exp to sim we have:
- Lines 61-63:
sim_dict[sim_name] = (exp_dict[exp_name] - value["beta_guess"]) * value[
"alpha_guess"
]- Lines 69-71:
sim_dict[sim_name] = (
exp_dict[exp_name] - value["beta_inferred"]
) * value["alpha_inferred"]I think we could fix these two. Maybe something like
sim_dict[sim_name] = (
value["alpha_guess"]
* (exp_dict[exp_name] - value["beta_guess"])
)and
sim_dict[sim_name] = (
value["alpha_inferred"]
* (exp_dict[exp_name] - value["beta_inferred"])
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I split the conversion into its own function, how does that look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea of using functions, but I wonder if they should be declared and defined in calibration_manager.py.
They would then be used directly here, and possibly reused within the same module by convert_sim_to_exp in place of
synapse/dashboard/calibration_manager.py
Line 18 in ceea73f
| df_sim[exp_name] = df_sim[sim_name] / value["alpha"] + value["beta"] |
and by
convert_exp_to_sim in place of synapse/dashboard/calibration_manager.py
Line 41 in ceea73f
| sim_val = (exp_dict[exp_name] - value["beta"]) * value["alpha"] |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.

Add components to change the uncertainty in alpha and beta in the gui:
