Real Spherical Harmonics Directivity#422
Conversation
|
Hi @je-fleischhauer , this is really cool, thank you so much! I think it would be great to have this in the directivity package. |
There was a problem hiding this comment.
Hey, thanks for sharing this. This is very cool.
Would you mind running the linters so that the CI pass?
pip install black isort
black .
isort --profile black .
I think you also need to merge with master to fix the tests failing due to a deprecation in numpy that was just fixed.
| def get_mn_in_acn_order(order): | ||
| """Calculates the (m,n) pairs in ACN order up to a given order. | ||
|
|
||
| Parameters: |
There was a problem hiding this comment.
Please use the numpydoc docstring style for consistency in the package.
https://numpydoc.readthedocs.io/en/latest/format.html
Please fix all the docstrings.
There was a problem hiding this comment.
I hope, I corrected this so it is compatible with the numpydoc docsting style.
There was a problem hiding this comment.
I think "Parameters" and "Returns" should not have a colon after and should be underlined with hyphens.
See https://numpydoc.readthedocs.io/en/latest/format.html#parameters
This is important for the auto-generated documentation to be formatted correctly.
There was a problem hiding this comment.
@je-fleischhauer , I deeply apologize for the nit-picking, but there mustn't be a colon at the end of the sub-titles.
E.g., the following is correct,
Parameters
----------
while this is incorrect (note the the colon at the end)
Parameters:
-----------
There was a problem hiding this comment.
Everything's fine, I'm learning something here 😄
|
@je-fleischhauer You'll probably want to rebase/merge this branch with master. I made a fix in #423 that fixes a numpy issue for Python >3.10 and should fix the current CI test failures that are showing up. |
I rebased and merged my branch with the master branch. My system now passes the CI test. |
| """ | ||
| Calculates the real spherical harmonics. | ||
|
|
||
| Parameters: |
| condon_shortley_phase : bool, optional | ||
| If True, includes the Condon-Shortley phase factor (-1)^m. Default is False. | ||
|
|
||
| Returns: |
| order : int | ||
| Maximum degree of the spherical harmonics. | ||
|
|
||
| Returns: |
fakufaku
left a comment
There was a problem hiding this comment.
Thank you. I think we are almost there. You just need to fix the docstrings to follow numpy style, which is important for auto-generating the doc.
|
Thanks you @je-fleischhauer ! 🤗 |
|
@je-fleischhauer I have merged everything now into master branch. I was wondering if you would be willing to do a new PR to add docstrings at the top of |
Thanks for sending a pull request (PR), we really appreciate that! Before hitting the submit button, we'd be really glad if you could make sure all the following points have been cleared.
Please also refer to the doc on contributing for more details. Even if you can't check all the boxes below, do not hesitate to go ahead with the PR and ask for help there.
nosetestsorpy.testat the root of the repo ?Happy PR 😃
I added this functionality to pyroomacoustics and thought it would be worthwhile to share it with others.
Since there is a copyright notice in the init file of the directivity folder, I added the function to the experimental folder.