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

fixed bug in decompose_dipole, eegmegcalc.py #155

Merged
merged 2 commits into from
Jan 30, 2020

Conversation

solveignaess
Copy link
Contributor

When implementing #142, I accidentally left in a bug which would give potentials with opposite sign for dipole locations x<0/ y<0 /z<0. =/

Fixed bug and added test.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 97.57% when pulling c3298b2 on solveignaess:4S_diploc into deb24ce on LFPy:master.

@espenhgn
Copy link
Collaborator

Thanks, will merge when the tests pass Travis.

@espenhgn espenhgn merged commit 3817e0f into LFPy:master Jan 30, 2020
@espenhgn
Copy link
Collaborator

Hi @solveignaess. I'll merge this now, but this code could be made a bit prettier some time by turning z into a 2D array, something like:

z_ = np.expand_dims(z, -1)
...
p_rad = np.dot(np.dot(p, z_), z_.T)
# produces identical output as:
# p_rad = np.dot(p, z).reshape((len(p), 1)) * z.reshape((1, z.size))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants