-
Notifications
You must be signed in to change notification settings - Fork 5
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
✨ Add plot_doas function that only plots DOAS related information #135
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 1.87%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Codecov ReportBase: 43.25% // Head: 44.97% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #135 +/- ##
==========================================
+ Coverage 43.25% 44.97% +1.72%
==========================================
Files 29 29
Lines 904 916 +12
Branches 133 133
==========================================
+ Hits 391 412 +21
+ Misses 506 497 -9
Partials 7 7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@ism200 @jsnel I'm not 100% sure if we want to keep the slitting between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much improved!
👌 Use main_irf_nr=None to optout of shifting by the IRF
For posterity I record that @ism200 reviewed these changes and acknowledges the (subtle) difference between the two plots that are shown, as captured by this comment:
He commented that the unwrap method is in fact better, so from my perspective this is good to be merged in. If you wish to acknowledge this @ism200, please press the Files changed button on top and review as 'ok'. |
New plot functionality Pseudo plot code e.g. for ex_doas_betafrom pyglotaran_extras.plotting.plot_doas import plot_doas
from glotaran.io import load_result
result = load_result("doas_case_study/result.yaml")
fig, axes = plot_doas(
result,
damped_oscillation=["osc1", "osc2", "osc5"],
time_range=(-0.8, 0.8),
spectral=550,
# oscillation_type="sin"
# normalize=True
)
for vline_pos in [412]:
axes[1].axvline(vline_pos, color="k", linewidth=1)
axes[2].axvline(vline_pos, color="k", linewidth=1) |
this looks all very nice now. thanks a lot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot !
This PR replaces the current
plot_doas
function which was meant as an augmentedplot_overview
and is broken onmain
with a more focused (3 plots) version that only plots DOAS-related information.In addition, it adds a custom plot tick calculation function for values that are in the unit of Pi.
Original plots by @ism200 in the publication of the 4TT case study
Plots using
plot_doas
and the pyglotaran resultsNote: The slight variations are due to a slightly different model using DOAS to fit parts of the coherent artifact for better fit results and the flipped phase for
osc1
is due to usingnp.unwrap
in pyglotaran in contrast tomod 2*Pi
in the original plotAs for adding
\overline{\nu}...
as text labels to the plots this should be done via a helper function since it would need a latex environment at the user side installed, which we should not force on them to have by default.Pseudo plot code e.g. for beta_doas
Change summary
Checklist