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(hfb.analysis): fix _interpolation_linear wrap mode #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rikvl
Copy link
Contributor

@rikvl rikvl commented Jun 21, 2024

This should fix the bug that gave this error:

ValueError                                Traceback (most recent call last)
/tmp/ipykernel_1004435/21639821.py in <module>
     17             data_shifted[iewb, insb, :, :],
     18             weight_shifted[iewb, insb, :, :],
---> 19         ) = _interpolation_linear(
     20                     x=ra_shifted,
     21                     y=on_off[iewb, insb, :, :],

/project/6003614/arashm/new_chimeenv/code/ch_pipeline/ch_pipeline/hfb/analysis.py in _interpolation_linear(x, y, w, xeval, mode, xperiod)
   1318         # adjusting for the period
   1319         if below.size > 0:
-> 1320             adx1[below] = xeval - x[ind1] - xperiod
   1321         if above.size > 0:
   1322             adx2[above] = x[ind2] + xperiod - xeval

ValueError: shape mismatch: value array of shape (4280,) could not be broadcast to indexing result of shape (7,)

@rikvl rikvl requested a review from arashcosmology June 21, 2024 00:00
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