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

Python harmonic #44

Merged
merged 7 commits into from
Jan 26, 2022
Merged

Python harmonic #44

merged 7 commits into from
Jan 26, 2022

Conversation

auggiemarignier
Copy link
Collaborator

Carrying on from #22. Python wrappers for the wavelet transforms and adjoints in harmonic space. So far only had wrappers for the pixel space transforms. This goes some way towards #20


@fixture
def rng(request):
return np.random.default_rng(getattr(request.config.option, "randomly_seed", None))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yay for new numpy.random 😄

Comment on lines +28 to +48
@mark.parametrize(
"px2wav,wav2px",
[
(
partial(analysis_lm2lmn, spin=0, upsample=1, N=1),
partial(analysis_adjoint_lmn2lm, spin=0, upsample=1, N=1),
),
(
partial(analysis_lm2lmn, spin=2, upsample=1, N=1),
partial(analysis_adjoint_lmn2lm, spin=2, upsample=1, N=1),
),
(
partial(synthesis_adjoint_lm2lmn, spin=0, upsample=1, N=1),
partial(synthesis_lmn2lm, spin=0, upsample=1, N=1),
),
(
partial(synthesis_adjoint_lm2lmn, spin=2, upsample=1, N=1),
partial(synthesis_lmn2lm, spin=2, upsample=1, N=1),
),
],
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

noice, btw if you're not aware the library hypothesis is great for getting a test to run multiple circumstances

],
)
def test_axisym_adjoint(
px2wav, wav2px, rng: np.random.Generator, L=10, B=2, J_min=2
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: would be great if typing was used everywhere 😉

Copy link
Collaborator

@paddyroddy paddyroddy left a comment

Choose a reason for hiding this comment

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

a few comments, otherwise good

@jasonmcewen jasonmcewen requested review from mdavezac and removed request for jasonmcewen January 24, 2022 11:40
Copy link
Collaborator

@paddyroddy paddyroddy left a comment

Choose a reason for hiding this comment

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

👍

@auggiemarignier
Copy link
Collaborator Author

who has the authority to merge and deploy this? @mdavezac @jasonmcewen

@mdavezac mdavezac merged commit 292d268 into main Jan 26, 2022
@mdavezac mdavezac deleted the python_harmonic branch January 26, 2022 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants