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

86 improve xrd plots #97

Merged
merged 12 commits into from
May 21, 2024
Merged

86 improve xrd plots #97

merged 12 commits into from
May 21, 2024

Conversation

ka-sarthak
Copy link
Collaborator

@ka-sarthak ka-sarthak commented May 16, 2024

  • Zoom along both axes of XRD line plots.
  • Center the title for the plots
  • Use 'plotly_white' theme for a white background in plots
  • RSM
    • format the axis label
    • format colorbar ticks and title
  • Add default name of the result section
  • If sample_id is not found in raw file, do not initiate a sample. Pass an empty list to samples instead.
  • Add intensity vs q_norm plot in XRD 1D results
  • Add plot annotations to XRD 1D results for the following quantities: intensity, two_theta, q_norm

@ka-sarthak ka-sarthak self-assigned this May 16, 2024
@ka-sarthak ka-sarthak linked an issue May 16, 2024 that may be closed by this pull request
4 tasks
@ka-sarthak
Copy link
Collaborator Author

ka-sarthak commented May 17, 2024

I added the old plot_annotations to generate plots for the quantities. Also, I created an additional quantity index_array which acts as a placeholder for the x-axis in the plots. For instance, the plot for two_theta would be "two_theta vs index_array" rather than "intensity vs two_theta" (as was the case before). The same goes for intensity and q_norm. These plots simply visualize the values of the quantity vector. It's interesting to see that the q_norm plot is slightly curved, while the two_theta plot is straight.

index_array is not defined as a derived quantity nor it is populated by the normalizer. Even so, I found that when it is added as the x-axis for plots in quantities, it acts as if it contains range(0,len(<whatever_quantity>).

@ka-sarthak
Copy link
Collaborator Author

The only issue is that display annotation does not work. I set it as

a_display={'visible': False}

for index_array but it still shows up on the GUI. Here's the documentation link I followed: https://nomad-lab.eu/prod/v1/staging/docs/reference/annotations.html#display-annotation-for-quantities

Any idea why this is the case?
@hampusnasstrom

@ka-sarthak ka-sarthak requested a review from hampusnasstrom May 17, 2024 11:58
Copy link
Collaborator

@hampusnasstrom hampusnasstrom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the small changes from our call

@ka-sarthak
Copy link
Collaborator Author

@hampusnasstrom Thanks for the review over our call.

Here are the changes I made:

  • Italicized variables like Intensity, θ, ω, q
  • Removed formatting from log symbol, absolute symbol
  • Removed bold for q components (perpendicular and parallel) on plot axis
  • Changed the zoom from scroll to dragmode for all plots
  • Add tooltip for datapoints in the plot using hovermode

@ka-sarthak ka-sarthak merged commit e482c0b into main May 21, 2024
1 check passed
@ka-sarthak ka-sarthak deleted the 86-improve-xrd-plots branch May 21, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve XRD plots
2 participants