issue with hkl calculations #31

Closed
opened 2021-06-21 12:53:47 +02:00 by usov_i · 5 comments
usov_i commented 2021-06-21 12:53:47 +02:00 (Migrated from gitlab.psi.ch)

Created by: cblarsen1

I think I've found an issue with the hkl calculations in the hdf viewer.

We have just collected 2D data sets with nuclear peaks, but when I hover over the peaks in pyzebra after pressing hkl calculate I don't get hkl values that are approximately integers. I tried to load the exact same .cami file (so ub matrix, detector distance, lambda, etc should be the same) in CAMI4PSD and I don't have the same issue.

I have attached two pictures of the same frame viewed in pyzebra and CAMI4PSD. pyzebra calculates hkl = -2.729 1.562 2.312 and CAMI4PSD calculates hkl = -2.989 0.995 -0.040 for the same peak.

2554_cami4psd
2554_pyzebra

Am I doing something wrong, or is pyzebra maybe reading some detector parameters incorrectly from the .cami file? For reference this is proposal id 20211324, file 2554, frame 13.

*Created by: cblarsen1* I think I've found an issue with the hkl calculations in the hdf viewer. We have just collected 2D data sets with nuclear peaks, but when I hover over the peaks in pyzebra after pressing hkl calculate I don't get hkl values that are approximately integers. I tried to load the exact same .cami file (so ub matrix, detector distance, lambda, etc should be the same) in CAMI4PSD and I don't have the same issue. I have attached two pictures of the same frame viewed in pyzebra and CAMI4PSD. pyzebra calculates hkl = -2.729 1.562 2.312 and CAMI4PSD calculates hkl = -2.989 0.995 -0.040 for the same peak. ![2554_cami4psd](https://user-images.githubusercontent.com/51052069/122750298-9c09a980-d28e-11eb-9e23-3263a1e53d51.png) ![2554_pyzebra](https://user-images.githubusercontent.com/51052069/122750300-9ca24000-d28e-11eb-89a5-d72f4fffaffc.png) Am I doing something wrong, or is pyzebra maybe reading some detector parameters incorrectly from the .cami file? For reference this is proposal id 20211324, file 2554, frame 13.
usov_i commented 2021-06-21 14:10:09 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

Thanks for posting this issue, @cblarsen1 !

My first guess would be that some parameter was redefined in .cami file, which is then understood by CAMI4PSD software, while pyzebra doesn't read any of the parameters from .cami at all (even the suggestion was that .cami files won't be used in the future). So, the only information pyzebra takes from .cami is the location of hdf files, and nothing else. Do you think that this is the case here?

*Created by: ivan-usov* Thanks for posting this issue, @cblarsen1 ! My first guess would be that some parameter was redefined in .cami file, which is then understood by CAMI4PSD software, while pyzebra doesn't read any of the parameters from .cami at all (even the suggestion was that .cami files won't be used in the future). So, the only information pyzebra takes from .cami is the location of hdf files, and nothing else. Do you think that this is the case here?
usov_i commented 2021-06-21 14:16:57 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

In fact, I see that nu = -2.68 in CAMI4PSD, and nu = -3.154 in pyzebra hdf viewer. Probably, this is the cause of the problem.
OK, I checked it better, and seems that nu is changing within that range along the peak.

Still, I think it's very probable, that .cami redefined a value for some parameter (wave, ddist, ub etc.), which is currently not supported in pyzebra.

*Created by: ivan-usov* ~In fact, I see that `nu = -2.68` in CAMI4PSD, and `nu = -3.154` in pyzebra hdf viewer. Probably, this is the cause of the problem.~ OK, I checked it better, and seems that `nu` is changing within that range along the peak. Still, I think it's very probable, that .cami redefined a value for some parameter (`wave`, `ddist`, `ub` etc.), which is currently not supported in pyzebra.
usov_i commented 2021-06-22 11:24:29 +02:00 (Migrated from gitlab.psi.ch)

Created by: zaharko

Dear Both,

I looked the problem. Pyzebra make correct calculations from the meta-data written in the hdf file.

The problem is, however, that it is not alway correct what is stored in the hdf file.
In the case which Camilla brought up the UB matrix was wrong.

This brings us to a 2nd problem which Pyzebra has -
It does not show what are the metadata in hdf file and does not allow to change them.

Ivan, can we discuss how to implement this?

Oksana

On 21 Jun 2021, at 14:17, Ivan Usov @.@.>> wrote:

In fact, I see that nu = -2.68 in CAMI4PSD, and nu = -3.154 in pyzebra hdf viewer. Probably, this is the cause of the problem.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/paulscherrerinstitute/pyzebra/issues/31#issuecomment-864986477, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMBMFVE47BPD5KDF423VITLTT4UUXANCNFSM47BKUMBQ.

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/paulscherrerinstitute/pyzebra/issues/31#issuecomment-864986477", "url": "https://github.com/paulscherrerinstitute/pyzebra/issues/31#issuecomment-864986477", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

*Created by: zaharko* Dear Both, I looked the problem. Pyzebra make correct calculations from the meta-data written in the hdf file. The problem is, however, that it is not alway correct what is stored in the hdf file. In the case which Camilla brought up the UB matrix was wrong. This brings us to a 2nd problem which Pyzebra has - It does not show what are the metadata in hdf file and does not allow to change them. Ivan, can we discuss how to implement this? Oksana On 21 Jun 2021, at 14:17, Ivan Usov ***@***.******@***.***>> wrote: In fact, I see that nu = -2.68 in CAMI4PSD, and nu = -3.154 in pyzebra hdf viewer. Probably, this is the cause of the problem. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub<https://github.com/paulscherrerinstitute/pyzebra/issues/31#issuecomment-864986477>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMBMFVE47BPD5KDF423VITLTT4UUXANCNFSM47BKUMBQ>. [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "https://github.com/paulscherrerinstitute/pyzebra/issues/31#issuecomment-864986477", "url": "https://github.com/paulscherrerinstitute/pyzebra/issues/31#issuecomment-864986477", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
usov_i commented 2021-06-22 11:30:55 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

@zaharko , just now I pushed a change to the test server that will make (only) UB matrix from .cami file to affect hkl values in (only) "hdf_viewer". Opening an hdf file via a Proposal ID obviously won't update UB matrix, since there is no .cami file involved in that case.

Not sure if this is ideal, since you wanted to avoid .cami files in the future, so I'm completely in favor of further discussion on how to handle it better.

*Created by: ivan-usov* @zaharko , just now I pushed a change to the test server that will make (only) UB matrix from .cami file to affect hkl values in (only) "hdf_viewer". Opening an hdf file via a Proposal ID obviously won't update UB matrix, since there is no .cami file involved in that case. Not sure if this is ideal, since you wanted to avoid .cami files in the future, so I'm completely in favor of further discussion on how to handle it better.
usov_i commented 2021-06-22 11:38:09 +02:00 (Migrated from gitlab.psi.ch)

Created by: cblarsen1

@ivan-usov Thank you for the update.

Maybe in the future we could have a box where we can paste in an updated UB matrix for the calculations? Then it wouldn't matter that files were opened via proposal id.

*Created by: cblarsen1* @ivan-usov Thank you for the update. Maybe in the future we could have a box where we can paste in an updated UB matrix for the calculations? Then it wouldn't matter that files were opened via proposal id.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zebra/pyzebra#31
No description provided.