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

Plot XAS data relative to E0 #563

Open
3 tasks
maurov opened this issue Mar 3, 2025 · 2 comments
Open
3 tasks

Plot XAS data relative to E0 #563

maurov opened this issue Mar 3, 2025 · 2 comments

Comments

@maurov
Copy link
Member

maurov commented Mar 3, 2025

As discussed at the last developers meeting, it would be useful to add a plot option for plotting relative to E0. This is needed when one wants to compare XAS data measured or simulated at different absorption edges. The tasks to perform are:

  • add energy_offset: Union[str, None] = None argument to plot
  • add the same keyword argument to the Plotly/Bokeh plot functions
  • add a thickbox in Larix next to the plot section in order to set this argument
@newville
Copy link
Member

newville commented Mar 3, 2025

@maurov Thanks. FWIW, I put some notes from last Friday's meeting at https://github.com/xraypy/xraylarch/wiki/Development-Roadmap. I thought keeping "development plans" would be helpful (at least for me) and the Wiki might work well for that.

For E0, I would propose allowing these options with "plot one" or "plot many", using the config value 'plot_energy_offset':

  • plot absolute energy [plot_energy_offset='absolute', on None, the default]
  • plot with energy-e0, using the current value of E0 for each spectrum. [plot_energy_offset='e0']
  • plot with energy-"nominal E0 for element/edge". [plot_energy_offset='elem']

I think we can add these to Larix and to the xafsplot functions.

Maybe there could be other options for HERFD mode (energy-analyzed_energy), but for now I think these choices will be a good start, and having a few options means it is not too hard to add a few more.

@maurov
Copy link
Member Author

maurov commented Mar 4, 2025

@maurov Thanks. FWIW, I put some notes from last Friday's meeting at https://github.com/xraypy/xraylarch/wiki/Development-Roadmap. I thought keeping "development plans" would be helpful (at least for me) and the Wiki might work well for that.

OK for keeping meetings notes and the development roadmap in the wiki. I added links to the relative issues. It think that issues are better for discussing and following the development of specific tasks/enhancements/bugs.

For E0, I would propose allowing these options with "plot one" or "plot many", using the config value 'plot_energy_offset':

* plot absolute energy  [plot_energy_offset='absolute', on None,  the default]
* plot with energy-e0, using the current value of E0 for each spectrum.  [plot_energy_offset='e0']
* plot with energy-"nominal E0 for element/edge".   [plot_energy_offset='elem']

I think we can add these to Larix and to the xafsplot functions.

OK for having a label-like parameter. I would rather call it energy_offset, as it is intrinsically used in a plot function, so no need to repeat the plot word.

Maybe there could be other options for HERFD mode (energy-analyzed_energy), but for now I think these choices will be a good start, and having a few options means it is not too hard to add a few more.

I do not see other possibilities for HERFD-XAS. For XES, it may be useful to plot in energy loss but we do not handle XES data yet, so this may be a long term goal.

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

No branches or pull requests

2 participants