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

Generate uncertainties from DAE counts data #21

Closed
2 of 4 tasks
Tom-Willemsen opened this issue Aug 21, 2024 · 2 comments
Closed
2 of 4 tasks

Generate uncertainties from DAE counts data #21

Tom-Willemsen opened this issue Aug 21, 2024 · 2 comments
Assignees

Comments

@Tom-Willemsen
Copy link
Contributor

Tom-Willemsen commented Aug 21, 2024

As a user, I would like to be able to access uncertainties on counts data from the DAE.

The raw uncertainty (standard deviation) of a counts measurement is given by sqrt(counts) (poisson counting statistics).

When summing uncorrelated counts together or normalizing them, the uncertainties need to be propagated using standard rules which can be found e.g. on wikipedia or physics/statistics textbooks.

This issue depends on the user-facing implementation of the DAE in #20

Acceptance criteria

  • For an individual spectrum, uncertainties are available.
  • For summed spectra (e.g. total detector counts), uncertainties are available, following standard uncertainty propagation rules.
  • For normalised counts (e.g. detector counts / monitor counts), uncertainties are available, following standard uncertainty propagation rules.
  • The above functionality is general if possible, so that it could be applied to devices other than the DAE in future.
    • However, DAE counts are the only thing which are explicitly in scope for this issue.

Notes:

  • Consider using a library like scipp which has a numpy-like interface but handles units and uncertainties by default under-the-hood.
    • scipp is being developed at ESS with past input from STFC, so is well suited for neutron counts data.
    • Or alternatively the uncertainties python package - but beware that it tracks correlations so may have bad scaling on "large" arrays like counts data from the DAE.
  • If you need more information/background on uncertainties and error propagation, you can borrow the book on @Tom-Willemsen 's desk.
  • Using these uncertainties in plots & fits is out of scope for this issue - that is the subject of a future issue.
  • The "simple" error propagation rules are only valid for uncorrelated variables. Do not use them if the variables are correlated.

Discussed in planning 05/09/24

52:30

@jackbdoughty
Copy link
Contributor

Deferred first criterion to a new ticket as it was getting too complicated for how useful it would be at this time.

@jackbdoughty
Copy link
Contributor

@rerpha rerpha added the under review Issue is under review label Oct 22, 2024
@rerpha rerpha closed this as completed Oct 24, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in PI_2024_08 Oct 24, 2024
@ISISBuilder ISISBuilder removed the under review Issue is under review label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

4 participants