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

v4.1.0 #138

Merged
merged 3 commits into from
Jun 30, 2024
Merged

v4.1.0 #138

merged 3 commits into from
Jun 30, 2024

Conversation

Frix-x
Copy link
Owner

@Frix-x Frix-x commented Jun 30, 2024

Summary by Sourcery

This pull request refactors the belt comparison plotting functions to use PSD data directly from SignalData objects, introduces re-interpolation of PSD signals to a common frequency range, and replaces the R² similarity calculation with the Pearson correlation coefficient for improved stability. Additionally, it adjusts the display properties of the 'Accel per Hz used' title line.

  • Enhancements:
    • Refactored the plot_versus_belts function to use PSD data directly from the SignalData objects instead of interpolated PSD arrays.
    • Updated the compute_signal_data function to include re-interpolation of the PSD signal to a common frequency range.
    • Replaced the R² calculation with the Pearson correlation coefficient for computing the similarity between two belts, improving stability.
    • Adjusted the font size and position of the 'Accel per Hz used' title line in the belts_calibration function.

Copy link
Contributor

sourcery-ai bot commented Jun 30, 2024

Reviewer's Guide by Sourcery

This pull request refactors the PSD data handling in the belts graph creator by removing interpolation steps and simplifying the peak plotting logic. The similarity calculation method has been updated to use the Pearson correlation coefficient instead of R². Additionally, minor adjustments were made to the title text position and font size in the belts_calibration function.

File-Level Changes

Files Changes
shaketune/graph_creators/belts_graph_creator.py Refactored PSD data handling by removing interpolation steps and simplifying peak plotting logic. Updated similarity calculation method to use Pearson correlation coefficient.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Frix-x - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 3 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

shaketune/graph_creators/belts_graph_creator.py Outdated Show resolved Hide resolved
@Frix-x Frix-x merged commit c12653e into main Jun 30, 2024
4 checks passed
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.

1 participant