FAIRmat-NFDI / nomad-measurements

A NOMAD plugin containing base sections for measurements.
https://FAIRmat-NFDI.github.io/nomad-measurements/
Apache License 2.0
14 stars 1 forks source link

86 improve xrd plots #97

Closed ka-sarthak closed 6 months ago

ka-sarthak commented 6 months ago
ka-sarthak commented 6 months ago

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 commented 6 months ago

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 commented 6 months ago

@hampusnasstrom Thanks for the review over our call.

Here are the changes I made: