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

🩹 Fix crash when plotting spectral model result #200

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

s-weigand
Copy link
Member

This change fixes that high-level plot functions crash if the result data do not have a time axis (e.g. for a spectral model) and should be fully backwards compatible.
This is just a hotfix since it does not implement fully correct behavior for results from a spectral models (e.g. which plot to apply linlog to).
But properly handling non kinetic models will be left for a follow up PR.

Change summary

Checklist

  • ✔️ Passing the tests (mandatory for all PR's)

@s-weigand s-weigand requested a review from a team as a code owner August 24, 2023 22:31
@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch s-weigand/pyglotaran-extras/fix-spectral-model-plotting-crash

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.08% 🎉

Comparison is base (60b74fe) 44.71% compared to head (f4ea157) 44.80%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
+ Coverage   44.71%   44.80%   +0.08%     
==========================================
  Files          27       27              
  Lines        1013     1011       -2     
  Branches      155      155              
==========================================
  Hits          453      453              
+ Misses        552      550       -2     
  Partials        8        8              
Files Changed Coverage Δ
...glotaran_extras/plotting/plot_coherent_artifact.py 22.91% <0.00%> (ø)
pyglotaran_extras/plotting/plot_data.py 34.04% <0.00%> (ø)
pyglotaran_extras/plotting/plot_doas.py 24.07% <ø> (ø)
pyglotaran_extras/plotting/plot_residual.py 29.03% <0.00%> (ø)
pyglotaran_extras/plotting/plot_svd.py 21.12% <0.00%> (+0.57%) ⬆️
pyglotaran_extras/plotting/utils.py 36.90% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jsnel jsnel left a comment

Choose a reason for hiding this comment

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

Nothing as permanent as a temporary fix that's also backwards compatible :p

But in this case I'm sure we'll address it in a follow up PR, but good that at least this fixes spectra plotting. Tested against the script fit_simData01.py with show_plot=True here.

@jsnel jsnel merged commit da8418b into glotaran:main Aug 24, 2023
@s-weigand s-weigand deleted the fix-spectral-model-plotting-crash branch August 24, 2023 23:22
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.

2 participants