plot maps in three panels #51

Closed
opened 2023-02-14 16:29:46 +01:00 by usov_i · 2 comments
usov_i commented 2023-02-14 16:29:46 +01:00 (Migrated from gitlab.psi.ch)

Created by: zaharko

  • 1. plot data panel
    • a. Increase the area for plotting maps for both hdf and ccl (increase horizontal and vertical axes by about 25%)
    • b. ccl data:
      • b1. skip labeling, axes for the orthogonal coordinate system
      • b2. introduce hkl labels when mouse is clicked at(near) the hkl position from measured ccl or calculated hkl/mhkl files
      • b3. switch off/on legend with displayed ccl files, k-vectors
    • c. hdf data:
      • c1. adopt the change of the 'in-plane X' and 'normal' directions to the user defined ones
        For this three value should be changed in teh cell 3 of Camilla's code
        ##x_dir should be changed to 'in-plane X'
        x_dir = [1,1,0]
        ##orth_dir should be changed to 'normal'
        orth_dir = [-1,1,0]
        ##and orth_cut should be changed to 'cut'
        orth_cut = 0.0
      • c2. add colorbar
      • c3. add log scale intensity option
      • c4. correct plot of the hkl/mhkl positions
  • 2. ccl prepare panel
    • a. Increase the area for plotting maps for ccl (increase horizontal and vertical axes by about 25%)
    • b. skip labeling, axes for the orthogonal coordinate system
    • c. introduce hkl labels when mouse is clicked at(near) the hkl position from calculated hkl/mhkl files
  • 3. hdf viewer panel
    • a. Increase the area for plotting maps for hdf (increase horizontal and vertical axes by about 20%)
    • b. add log scale intensity option (the option would apply log scale generally on the panel, i.e. to both projections and frame plots)
*Created by: zaharko* - [x] 1. plot data panel - [x] a. Increase the area for plotting maps for both hdf and ccl (increase horizontal and vertical axes by about 25%) - [x] b. ccl data: - [x] b1. skip labeling, axes for the orthogonal coordinate system - [x] b2. introduce hkl labels when mouse is clicked at(near) the hkl position from measured ccl or calculated hkl/mhkl files - [x] b3. switch off/on legend with displayed ccl files, k-vectors - [x] c. hdf data: - [ ] c1. ~adopt the change of the 'in-plane X' and 'normal' directions to the user defined ones~ ~For this three value should be changed in teh cell 3 of Camilla's code~ ~##x_dir should be changed to 'in-plane X'~ ~x_dir = [1,1,0]~ ~##orth_dir should be changed to 'normal'~ ~orth_dir = [-1,1,0]~ ~##and orth_cut should be changed to 'cut'~ ~orth_cut = 0.0~ - [x] c2. add colorbar - [x] c3. add log scale intensity option - [x] c4. correct plot of the hkl/mhkl positions - [x] 2. ccl prepare panel - [x] a. Increase the area for plotting maps for ccl (increase horizontal and vertical axes by about 25%) - [x] b. skip labeling, axes for the orthogonal coordinate system - [x] c. introduce hkl labels when mouse is clicked at(near) the hkl position from calculated hkl/mhkl files - [x] 3. hdf viewer panel - [x] a. Increase the area for plotting maps for hdf (increase horizontal and vertical axes by about 20%) - [x] b. add log scale intensity option (the option would apply log scale generally on the panel, i.e. to both projections and frame plots)
usov_i commented 2023-02-15 16:07:47 +01:00 (Migrated from gitlab.psi.ch)

Created by: ivan-usov

There is a problem with the logarithmic color mapping, namely, it can't include 0 values in data as it refers to -infinity on the axis. Unfortunately, the 2D detector data almost always includes 0 values (as background). Thus, we can't include it as it is.

There are a few workaround possibilities, but none of them are perfect. In fact, many argue that count data should not be log-transformed:
https://www.nature.com/articles/npre.2010.4136.1

I'll hold this change for now.

*Created by: ivan-usov* There is a problem with the logarithmic color mapping, namely, it can't include 0 values in data as it refers to -infinity on the axis. Unfortunately, the 2D detector data almost always includes 0 values (as background). Thus, we can't include it as it is. There are a few workaround possibilities, but none of them are perfect. In fact, many argue that count data should not be log-transformed: https://www.nature.com/articles/npre.2010.4136.1 I'll hold this change for now.
usov_i commented 2023-02-15 23:01:46 +01:00 (Migrated from gitlab.psi.ch)

Created by: zaharko

Hi Ivan,

Could we change zeroes into the small number C for which log can be taken and plot the data shifted by C?
This might be strictly speaking not the correct solution, but it will serve the purpose to see a weak signal on top of a significant background.

Thank you
Oksana

On 15 Feb 2023, at 16:07, Ivan Usov @.@.>> wrote:

There is a problem with the logarithmic color mapping, namely, it can't include 0 values in data as it refers to -infinity on the axis. Unfortunately, the 2D detector data almost always includes 0 values (as background). Thus, we can't include it as it is.

There are a few workaround possibilities, but none of them are perfect. In fact, many argue that count data should not be log-transformed:
https://www.nature.com/articles/npre.2010.4136.1

I'll hold this change for now.


Reply to this email directly, view it on GitHubhttps://github.com/paulscherrerinstitute/pyzebra/issues/51#issuecomment-1431518119, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMBMFVGHQI5JTDYC6FHEBHLWXTWM5ANCNFSM6AAAAAAU3WTVTQ.
You are receiving this because you authored the thread.Message ID: @.***>

*Created by: zaharko* Hi Ivan, Could we change zeroes into the small number C for which log can be taken and plot the data shifted by C? This might be strictly speaking not the correct solution, but it will serve the purpose to see a weak signal on top of a significant background. Thank you Oksana On 15 Feb 2023, at 16:07, Ivan Usov ***@***.******@***.***>> wrote: There is a problem with the logarithmic color mapping, namely, it can't include 0 values in data as it refers to -infinity on the axis. Unfortunately, the 2D detector data almost always includes 0 values (as background). Thus, we can't include it as it is. There are a few workaround possibilities, but none of them are perfect. In fact, many argue that count data should not be log-transformed: https://www.nature.com/articles/npre.2010.4136.1 I'll hold this change for now. — Reply to this email directly, view it on GitHub<https://github.com/paulscherrerinstitute/pyzebra/issues/51#issuecomment-1431518119>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AMBMFVGHQI5JTDYC6FHEBHLWXTWM5ANCNFSM6AAAAAAU3WTVTQ>. You are receiving this because you authored the thread.Message ID: ***@***.***>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: zebra/pyzebra#51
No description provided.