Skip to content

[ENH] Annotations in dss_line_iter plots and specification of a saving path #89

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

eliasbenyahia
Copy link

Modified annotations of dss_line_iter plots when show=True:

  • added a legend to the mean PSD across trials and sensors plot
  • rotated the Residuals plot
  • changed title of the Iterations plot to "Aggregated residuals"
  • added x and y labels to all plots

In dss_line_iter function:

  • removed the 'prefix' parameter
  • added a 'dirname' parameter
  • added an 'extension' parameter

@eliasbenyahia eliasbenyahia reopened this May 27, 2025
@nbara
Copy link
Owner

nbara commented May 27, 2025

Tip: in your base directory, run make pep in the terminal and it will list linting errors before you commit

@nbara nbara requested a review from Copilot May 27, 2025 13:56
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the dss_line_iter plotting annotations and refactors how output figures are saved, as well as updates tests and examples to match the new API.

  • Improved plot labels, titles, and added a legend for clarity.
  • Removed the prefix parameter; introduced dirname and extension for saving control.
  • Updated tests and example script to use the new dirname argument.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
tests/test_dss.py Switched from prefix to dirname, adjusted fline, and updated test calls.
meegkit/dss.py Modified dss_line_iter signature, plotting annotations, and save logic.
examples/example_dss_line.py Reordered keyword args and added show=True; needs updating for dirname.
Comments suppressed due to low confidence (1)

tests/test_dss.py:152

  • Add a test case to verify that files are saved correctly with the specified extension and naming pattern when dirname is provided.
out, _ = dss.dss_line_iter(x, fline + 1, sr, show=True, dirname=tmpdir)

@nbara nbara added the enhancement New feature or request label May 27, 2025
@nbara nbara changed the title Annotations in dss_line_iter plots and specification of a saving path [ENH] Annotations in dss_line_iter plots and specification of a saving path May 27, 2025
@eliasbenyahia
Copy link
Author

Tip: in your base directory, run make pep in the terminal and it will list linting errors before you commit

Ok thanks ! Sorry I don't contribute a lot

@nbara
Copy link
Owner

nbara commented May 27, 2025

No worries at all, happy to help!

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants