October 21 #41

Closed
opened 2021-10-19 13:16:32 +02:00 by usov_i · 9 comments
usov_i commented 2021-10-19 13:16:32 +02:00 (Migrated from gitlab.psi.ch)

Created by: zaharko

1. ccl integrate

  • 1.1. It will be useful to extend horizontally the table with scans and to write there the scan center angles (either bi- or nb- geometries):
    For bi: 2theta,omega, chi and phi
    For nb: 2theta,omega, nu
    There is no place to display the whole table, it can be good to introduce a horizontal scrolling with the option to scroll to the 'hidden' columns with the scan center angles
  • 1.2 Presently, there is a bug in the following procedure: if scans are integrated automatically and then one scan is integrated manually the 'export' key is reset for all scans. Skip this reset. How to reproduce the bug:
    1. Open new for 3803.ccl
    2. Click Process All
    3. In scan 1 (for example) change export flag to false. Scan 1 fit result is removed from export window as they should be.
    4. click on scan 2
    5. click Process Current - export flag on scan 1 changes back to true and the scan 1 fit result is back in export window.

2. param study

  • 2.1 When multiple files are selected check N of points and scan motor.
    When N of points is zero give a warning comment in the server output and exclude this file from processing.
    When following files have the scan motor different from the fist file give a warning comment in the server output and do not process the files further

3. hdf viewer

  • 3.1 Add an "Open" button which would allow to read the content of the file when it is update
  • 3.2 add the second axis on top of the 'Projections on X-axis' and 'Projections on Y-axis'. These are Gamma and nu, respectively.
    The gamma in /entry1/ZEBRA/area_detector2/polar_angle is the gamma_central (and similarly nu in /entry1/ZEBRA/area_detector2/tilt_angle).
    Our resolution depends on the size of the pixel and the distance from the sample to the detector.
    The sizes of the pixel are stored in /entry1/ZEBRA/area_detector2/x_pixel_size and ../y_pixel_size, these are
    xscale=0.734 mm in the horizontal direction (gamma) and yscale=1.4809 in the vertical direction (nu)
    The distance form the sample to the detector is stored in /entry1/ZEBRA/area_detector2/distance.
    In majority of cases it is 538 mm.
    The deviation of the gamma_current from the gamma_central in angular units (deg):
    Atan (N_pixels_from_the_center *pixel size/distance)
  • 3.3 Introduce new features in the table of spind events.
  • 3.3.1 'Add/remove spind event' should be renamed into 'add/remove peak center'
  • 3.3.2 Switch between 2 tables via tabs. The available table will have the title line 'Actual peak center'. The new one 'Peak in the detector center'.
    How to calculate the angles to bring the peak in the detector center?
    For the nb-geometry: chi and phi should be skipped (no number in the cell) and x,y,gamma,nu should be recalculated into to gamma, omega, nu at x=128, y=64 using det2pol from xtal.py
    For the bi-geometry: x,y,gamma,omega, chi,phi,nu should be recalculated to gamma, omega, chi, phi at x=128, y=64, nu=0 using sequence of routines as in angtohkl from xtal.py

4. ccl compare

  • We need a tab derivative of 'ccl integrate' which allows to compare two datasets with visualisation.
    Ivan agreed to prepare a tab draft and Camilla to work on its functionality.
*Created by: zaharko* **1. ccl integrate** - [x] 1.1. It will be useful to extend horizontally the table with scans and to write there the scan center angles (either bi- or nb- geometries): For bi: 2theta,omega, chi and phi For nb: 2theta,omega, nu There is no place to display the whole table, it can be good to introduce a horizontal scrolling with the option to scroll to the 'hidden' columns with the scan center angles - [x] 1.2 Presently, there is a bug in the following procedure: if scans are integrated automatically and then one scan is integrated manually the 'export' key is reset for all scans. Skip this reset. How to reproduce the bug: 1. Open new for 3803.ccl 2. Click Process All 3. In scan 1 (for example) change export flag to false. Scan 1 fit result is removed from export window as they should be. 4. click on scan 2 5. click Process Current - export flag on scan 1 changes back to true and the scan 1 fit result is back in export window. **2. param study** - [x] 2.1 When multiple files are selected check N of points and scan motor. When N of points is zero give a warning comment in the server output and exclude this file from processing. When following files have the scan motor different from the fist file give a warning comment in the server output and do not process the files further **3. hdf viewer** - [x] 3.1 Add an "Open" button which would allow to read the content of the file when it is update - [x] 3.2 add the second axis on top of the 'Projections on X-axis' and 'Projections on Y-axis'. These are Gamma and nu, respectively. The `gamma` in /entry1/ZEBRA/area_detector2/polar_angle is the `gamma_central` (and similarly `nu` in /entry1/ZEBRA/area_detector2/tilt_angle). Our resolution depends on the size of the pixel and the distance from the sample to the detector. The sizes of the pixel are stored in /entry1/ZEBRA/area_detector2/x_pixel_size and ../y_pixel_size, these are xscale=0.734 mm in the horizontal direction (gamma) and yscale=1.4809 in the vertical direction (nu) The distance form the sample to the detector is stored in /entry1/ZEBRA/area_detector2/distance. In majority of cases it is 538 mm. The deviation of the gamma_current from the gamma_central in angular units (deg): Atan (N_pixels_from_the_center *pixel size/distance) - [x] 3.3 Introduce new features in the table of spind events. - [x] 3.3.1 'Add/remove spind event' should be renamed into 'add/remove peak center' - [x] 3.3.2 Switch between 2 tables via tabs. The available table will have the title line 'Actual peak center'. The new one 'Peak in the detector center'. How to calculate the angles to bring the peak in the detector center? For the nb-geometry: chi and phi should be skipped (no number in the cell) and x,y,gamma,nu should be recalculated into to gamma, omega, nu at x=128, y=64 using det2pol from xtal.py For the bi-geometry: x,y,gamma,omega, chi,phi,nu should be recalculated to gamma, omega, chi, phi at x=128, y=64, nu=0 using sequence of routines as in angtohkl from xtal.py **4. ccl compare** - [x] We need a tab derivative of 'ccl integrate' which allows to compare two datasets with visualisation. Ivan agreed to prepare a tab draft and Camilla to work on its functionality.
usov_i commented 2021-10-20 12:57:03 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

@zaharko , concerning 2.1, do you have examples of files with 0 points? Also, does ccl_integrate should do the same checks?

*Created by: ivan-usov* @zaharko , concerning 2.1, do you have examples of files with 0 points? Also, does ccl_integrate should do the same checks?
usov_i commented 2021-10-20 15:31:38 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

Not sure about the 3.2, because the calculation according to that formula give a different result from det2pol from xtal.py
You can see it on the test server, and let me know which one is correct.

*Created by: ivan-usov* Not sure about the 3.2, because the calculation according to that formula give a different result from `det2pol` from xtal.py You can see it on the test server, and let me know which one is correct.
usov_i commented 2021-10-20 15:54:28 +02:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

@cblarsen1, @zaharko What plots/buttons/widgets layout do you think to have for the new comparison tab?

*Created by: ivan-usov* @cblarsen1, @zaharko What plots/buttons/widgets layout do you think to have for the new comparison tab?
usov_i commented 2021-10-20 16:44:07 +02:00 (Migrated from gitlab.psi.ch)

Created by: rsibille-psi

The simplest version of it can be just as ccl_integrate, but loading two ccl files (XXXX and YYYY) is possible. Moreover, one extra button is needed in the options of the fit (see description below).

The new button would be located just below where presently we have:

"Intensity:
Function
Area"

using the same format:

"Difference:
XXXX - YYYY
YYYY - XXXX"

so that the user can select which data to subtract to the other.

Then clicking on "process all" would fit both ccl files and produce a file that is directly the difference of integrated intensities (same export formats as for ccl_integrate) with properly propagated error.

In general about this tab, it should assume that both ccl files are identical (same reflections measured in the same order). However, if one of the two files is longer than the other, then we still want to have that tab working, by just ignoring all of the reflections that appear in only one of the two files. This can be done simply by comparing the number of reflections in the two ccl files, and ignoring the extra ones at the end of the longest of the two files.

The organisation of the table can remain the same as in the ccl_integrate tab.
When selecting one line in the table, the plot area (also the same as in ccl_integrate) shows both XXXX and YYYY data for the selected HKL/line, as well as both fits if data were already processed. However, it would be nice to distinguish the two data and associated fits using different colours or thickness (e.g. all colours remain as in ccl_integrate but XXXX has data points and dashed fit curve also as in ccl_integrate, while YYYY has thicker data points and error bars and dashed fit curve). We can get rid of the "linear" line and associated legend so that we don't have too many things and the plot remains readable.

*Created by: rsibille-psi* The simplest version of it can be just as ccl_integrate, but loading two ccl files (XXXX and YYYY) is possible. Moreover, one extra button is needed in the options of the fit (see description below). The new button would be located just below where presently we have: "Intensity: Function Area" using the same format: "Difference: XXXX - YYYY YYYY - XXXX" so that the user can select which data to subtract to the other. Then clicking on "process all" would fit both ccl files and produce a file that is directly the difference of integrated intensities (same export formats as for ccl_integrate) with properly propagated error. In general about this tab, it should assume that both ccl files are identical (same reflections measured in the same order). However, if one of the two files is longer than the other, then we still want to have that tab working, by just ignoring all of the reflections that appear in only one of the two files. This can be done simply by comparing the number of reflections in the two ccl files, and ignoring the extra ones at the end of the longest of the two files. The organisation of the table can remain the same as in the ccl_integrate tab. When selecting one line in the table, the plot area (also the same as in ccl_integrate) shows both XXXX and YYYY data for the selected HKL/line, as well as both fits if data were already processed. However, it would be nice to distinguish the two data and associated fits using different colours or thickness (e.g. all colours remain as in ccl_integrate but XXXX has data points and dashed fit curve also as in ccl_integrate, while YYYY has thicker data points and error bars and dashed fit curve). We can get rid of the "linear" line and associated legend so that we don't have too many things and the plot remains readable.
usov_i commented 2021-10-20 17:11:34 +02:00 (Migrated from gitlab.psi.ch)

Created by: zaharko

proposalID 20202357
from 5077-5094 are l-scans
But 5087 has no points

On 20 Oct 2021, at 12:57, Ivan Usov @.@.>> wrote:

@zaharkohttps://github.com/zaharko , concerning 2.1, do you have examples of such files?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/paulscherrerinstitute/pyzebra/issues/41#issuecomment-947554032, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMBMFVCH4RSL54BX6TMJZ33UH2OAVANCNFSM5GI4DJXA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

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

*Created by: zaharko* proposalID 20202357 from 5077-5094 are l-scans But 5087 has no points On 20 Oct 2021, at 12:57, Ivan Usov ***@***.******@***.***>> wrote: @zaharko<https://github.com/zaharko> , concerning 2.1, do you have examples of such files? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<https://github.com/paulscherrerinstitute/pyzebra/issues/41#issuecomment-947554032>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMBMFVCH4RSL54BX6TMJZ33UH2OAVANCNFSM5GI4DJXA>. Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. [ { ***@***.***": "http://schema.org", ***@***.***": "EmailMessage", "potentialAction": { ***@***.***": "ViewAction", "target": "https://github.com/paulscherrerinstitute/pyzebra/issues/41#issuecomment-947554032", "url": "https://github.com/paulscherrerinstitute/pyzebra/issues/41#issuecomment-947554032", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { ***@***.***": "Organization", "name": "GitHub", "url": "https://github.com" } } ]
usov_i commented 2021-11-10 11:46:36 +01:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

@rsibille-psi , in a view of https://github.com/paulscherrerinstitute/pyzebra/issues/43, would splitting the table into two for nb- and bi- geometries also be fine for ccl compare? I guess, both files will have the same geometry, so all scans will occupy one of the tables only. Another question, will both ccl files be in the same folder? If yes, then I can simplify opening procedure to selecting 2 files from a list of all ccl files in a particular proposal_id folder.

*Created by: ivan-usov* @rsibille-psi , in a view of https://github.com/paulscherrerinstitute/pyzebra/issues/43, would splitting the table into two for nb- and bi- geometries also be fine for ccl compare? I guess, both files will have the same geometry, so all scans will occupy one of the tables only. Another question, will both ccl files be in the same folder? If yes, then I can simplify opening procedure to selecting 2 files from a list of all ccl files in a particular proposal_id folder.
usov_i commented 2021-11-10 11:51:42 +01:00 (Migrated from gitlab.psi.ch)

Created by: rsibille-psi

@rsibille-psi , in a view of #43, would splitting the table into two for nb- and bi- geometries also be fine for ccl compare?
yes

I guess, both files will have the same geometry, so all scans will occupy one of the tables only.
yes

Another question, will both ccl files be in the same folder?
yes

If yes, then I can simplify opening procedure to selecting 2 files from a list of all ccl files in a particular proposal_id folder.
yes

*Created by: rsibille-psi* > @rsibille-psi , in a view of #43, would splitting the table into two for nb- and bi- geometries also be fine for ccl compare? yes I guess, both files will have the same geometry, so all scans will occupy one of the tables only. yes Another question, will both ccl files be in the same folder? yes If yes, then I can simplify opening procedure to selecting 2 files from a list of all ccl files in a particular proposal_id folder. yes
usov_i commented 2021-11-10 15:29:01 +01:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

@rsibille-psi thank you for your feedback, though I discovered that splitting the table might be more difficult than expected. Maybe I'll return to it later if you still think it significantly improves UX.

Could you also provide an example of data for ccl compare?

*Created by: ivan-usov* @rsibille-psi thank you for your feedback, though I discovered that splitting the table might be more difficult than expected. Maybe I'll return to it later if you still think it significantly improves UX. Could you also provide an example of data for ccl compare?
usov_i commented 2021-11-10 15:36:14 +01:00 (Migrated from gitlab.psi.ch)

Created by: rsibille-psi

thanks!

Could you also provide an example of data for ccl compare?

yes, in experiment 20211326 you may compare ccl files 6966 and 7061

*Created by: rsibille-psi* thanks! > Could you also provide an example of data for ccl compare? yes, in experiment 20211326 you may compare ccl files 6966 and 7061
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zebra/pyzebra#41
No description provided.