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 bug in concatenate channels #532

Merged
merged 2 commits into from
Jan 26, 2024
Merged

Fix bug in concatenate channels #532

merged 2 commits into from
Jan 26, 2024

Conversation

f-brinkmann
Copy link
Member

Which issue(s) are closed by this pull request?

Closes #531

@f-brinkmann f-brinkmann added the hot For bugs on the master branch label Jan 26, 2024
@f-brinkmann f-brinkmann self-assigned this Jan 26, 2024
Copy link
Member

@pingelit pingelit left a comment

Choose a reason for hiding this comment

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

Looks good to me. There might be a more elegant solution to #531 but this solve the problem from what I can tell.

Copy link
Member

@sikersten sikersten left a comment

Choose a reason for hiding this comment

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

Thanks for noting the bug! What do you think of solving it explicitely by moving the if case to l. 196, e.g.:

if isinstance(signal, pf.FrequencyData):
    data = np.concatenate([s.freq for s in signals], axis=axis)
else:
    data = np.concatenate([s.time for s in signals], axis=axis)

@f-brinkmann
Copy link
Member Author

Thanks for noting the bug! What do you think of solving it explicitely by moving the if case to l. 196, e.g.:

Did this as suggested

@f-brinkmann f-brinkmann merged commit aa2ed60 into main Jan 26, 2024
8 checks passed
@f-brinkmann f-brinkmann deleted the bug/concatenate_channels branch January 26, 2024 17:07
@ahms5 ahms5 added the v0.6.3 label Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hot For bugs on the master branch v0.6.3
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

pyfar.utils.concatenate_channels can change amplitude of input data and raise a value error
4 participants