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
@sinkpoint's power map - refactored #724
Conversation
a8b134c
to
bb6a4e3
Compare
- added sh_to_ap method to shm.py - added tests for sh_to_ap to test_shm.py
- added description of calculations
- changed some spelling and equation formatting mistakes
- changed param coeff_mtx to sh_coeffs - changed method description order - changed apostrophe character for Dell'Acqua
- changed formatting to conform to pep8
36866c9
to
e269414
Compare
OK - here's what I've come up with: I am now testing this with a very simplified set of coefficients, that are all equal to 1. In this case, it is easy to calculate what AP should be equal to: it's the log of the number of even coefficients (because in this case the 2l+1 factors cancel out). Then, the normalization factor has to be taken into account, which I do here by varying that between two different quantities. This seems like a better solution to me, because it tests the equation, rather than testing some other implementation of the same equation, on a specific test-set. I wouldn't mind having both in here, but I think this is sufficient. |
|
||
def calculate_max_order(n_coeffs): | ||
""" | ||
Calculate the maximal harmonic order, given that you know the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
push one line up
Good job! 👍 Many thanks to @sinkpoint, @arokem and @deflavio! |
@sinkpoint's power map - refactored
Hi - here are a few suggestions on top of @sinkpoint's implementation of the Dell'Acqua power map (#672). I think that this would be very useful to have, but I have proposed a few changes relative to @sinkpoint's previous implementation that simplify the code and potentially lead to (marginally) faster performance. See here for a diff relative to #672 (ignore the top of this diff in
denspeed
- that has to do with the fact that #672 needs a rebase):https://github.com/sinkpoint/dipy/pull/1/files