monitor normalisation and error bars #40

Closed
opened 2021-09-28 09:57:10 +02:00 by usov_i · 4 comments
usov_i commented 2021-09-28 09:57:10 +02:00 (Migrated from gitlab.psi.ch)

Created by: rsibille-psi

The error bars are not properly normalised in pyzebra it seems. For instance, I open dat file 6349 of experiment 20211272, the natural monitor is 6 millions. The plot produced by pyzebra is normalised to monitor 100000 with unrealistically large error bars (image 1), while if I impose the natural monitor to pyzebra the error bars look correct (image 2) and consistent with our old "fit" tool (image 3).

1 2 ![3](https://user-images.githubusercontent.com/62238853/135045680-5f93ef52-12cf-4578-a27e-92a394c0073a.png)
*Created by: rsibille-psi* The error bars are not properly normalised in pyzebra it seems. For instance, I open dat file 6349 of experiment 20211272, the natural monitor is 6 millions. The plot produced by pyzebra is normalised to monitor 100000 with unrealistically large error bars (image 1), while if I impose the natural monitor to pyzebra the error bars look correct (image 2) and consistent with our old "fit" tool (image 3). <img width="1229" alt="1" src="https://user-images.githubusercontent.com/62238853/135045671-1ae59ca2-4ae0-4ad8-8a7e-f5222473231a.png"> <img width="1237" alt="2" src="https://user-images.githubusercontent.com/62238853/135045675-0705226e-a604-47d8-bc9c-84ab4eb9e988.png"> ![3](https://user-images.githubusercontent.com/62238853/135045680-5f93ef52-12cf-4578-a27e-92a394c0073a.png)
usov_i commented 2021-09-28 11:53:59 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

Currently, the errors are calculated as sqrt(n), where n is the number of counts. The number of counts scales linearly to a monitor value. What would be the right way to scale errors in that case? I guess, sqrt(original_n) * monitor_scale?

*Created by: ivan-usov* Currently, the errors are calculated as `sqrt(n)`, where `n` is the number of counts. The number of counts scales linearly to a monitor value. What would be the right way to scale errors in that case? I guess, `sqrt(original_n) * monitor_scale`?
usov_i commented 2021-09-28 12:40:43 +02:00 (Migrated from gitlab.psi.ch)

Created by: rsibille-psi

yes, with monitor_scale the ratio between the original and new monitors.
thank you very much.

*Created by: rsibille-psi* yes, with monitor_scale the ratio between the original and new monitors. thank you very much.
usov_i commented 2021-09-29 16:54:07 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

let me know if it works, then I will update the main server too

*Created by: ivan-usov* let me know if it works, then I will update the main server too
usov_i commented 2021-09-29 19:24:17 +02:00 (Migrated from gitlab.psi.ch)

Created by: rsibille-psi

yes it does work properly I think.
Thank you!

From: Ivan Usov @.>
Reply-To: paulscherrerinstitute/pyzebra @.
>
Date: Wednesday, 29 September 2021 at 16:54
To: paulscherrerinstitute/pyzebra @.>
Cc: "Sibille Romain Franck (PSI)" @.
>, Author @.***>
Subject: Re: [paulscherrerinstitute/pyzebra] monitor normalisation and error bars (#40)

let me know if it works, then I will update the main server too


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/paulscherrerinstitute/pyzebra/issues/40#issuecomment-930254480, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO23BBPZDMSCDFA7DX7ULLLUEMSBTANCNFSM5E4YJF7Q.
[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/paulscherrerinstitute/pyzebra/issues/40#issuecomment-930254480", "url": "https://github.com/paulscherrerinstitute/pyzebra/issues/40#issuecomment-930254480", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

*Created by: rsibille-psi* yes it does work properly I think. Thank you! From: Ivan Usov ***@***.***> Reply-To: paulscherrerinstitute/pyzebra ***@***.***> Date: Wednesday, 29 September 2021 at 16:54 To: paulscherrerinstitute/pyzebra ***@***.***> Cc: "Sibille Romain Franck (PSI)" ***@***.***>, Author ***@***.***> Subject: Re: [paulscherrerinstitute/pyzebra] monitor normalisation and error bars (#40) let me know if it works, then I will update the main server too — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<https://github.com/paulscherrerinstitute/pyzebra/issues/40#issuecomment-930254480>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AO23BBPZDMSCDFA7DX7ULLLUEMSBTANCNFSM5E4YJF7Q>. [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "https://github.com/paulscherrerinstitute/pyzebra/issues/40#issuecomment-930254480", "url": "https://github.com/paulscherrerinstitute/pyzebra/issues/40#issuecomment-930254480", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zebra/pyzebra#40
No description provided.