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

plots: adjustable num_samples_per_point #407

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pmldrmota
Copy link
Contributor

Added QSpinBox to context menu so that user can get more accurate error bars when averaging.

image

@pmldrmota pmldrmota marked this pull request as draft May 8, 2024 13:34
@pmldrmota pmldrmota changed the title plots.xy_1d: adjustable num_samples_per_point plots: adjustable num_samples_per_point May 8, 2024
@pmldrmota pmldrmota force-pushed the averaging-1d-adjustable-number-of-samples branch from 3760f42 to 64f62fa Compare May 8, 2024 14:37
#: Keeps track of the running average and the number of samples therein.
self.averages_by_coords = dict[tuple[float, float], tuple[float, int]]()
self.averages_by_coords = dict[tuple[float, float], tuple[float, float, int]]()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a a frozen dataclass/… instead of a tuple? This is pretty opaque to the casual reader.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly! I just pushed my WIP, but it should be using much of the same code as the 1D plot eventually.

@dnadlinger
Copy link
Member

I would like to improve the user experience a bit here, in the sense of making it clear to the average physicist what is actually going on here. If I hadn't thought about this particular problem already, I wouldn't have a clue what "samples per point" actually means. Perhaps we can make the label "Assume[d] samples per point" instead, to make clear that there are no samples involved in the averaging process itself? We could also add a tooltip with a brief explanation, and should probably move the discussion in the docstring to some user-visible documentation (maybe just a new "the ndscan applet" page?).

Separately, I wonder whether it would be worth introducing a way to include enough information about the result distributions to do averaging and similar operations correctly directly with each result channel (either as channel metadata, or some kind of "rich FloatChannel").

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