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

Dlc debug: smoothing_duration fix #753

Merged
merged 8 commits into from
Jan 10, 2024
Merged

Conversation

emreybroyles
Copy link
Collaborator

Description

Issue: Bug when running sgp.DLCCentroid.populate(centroid_key): error outputs TypeError: spyglass.position.v1.dlc_utils.smooth_moving_avg() got multiple values for keyword argument 'smoothing_duration'

Changes: delete line 229 in /spyglass/src/spyglass/position/v1/position_dlc_centroid.py: smoothing_duration=smoothing_duration

Relevant motivation and context: (explanation credits to Eric): the **dict expands the dictionary provided by params["smoothing_params"] so that it becomes a keyword argument to smooth_moving_avg. smooth_moving_avg therefore has the two keyword arguments called smoothing_duration and doesn’t know which to use and errors.

  • Fixes #000: The function runs properly
    • /spyglass/src/spyglass/position/v1/position_dlc_centroid.py: delete the line smoothing_duration = smoothing_duration

Checklist:

  • This PR should be accompanied by a release: (yes/no/unsure)
  • (If release) I have updated the CITATION.cff
  • I have updated the CHANGELOG.md
  • I have added/edited docs/notebooks to reflect the changes

@edeno edeno requested a review from samuelbray32 January 8, 2024 23:46
@edeno edeno merged commit a9de305 into LorenFrankLab:master Jan 10, 2024
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.

3 participants