Last component of `calc_mcm_spin0and2_pure` always seems to be (practically) zero
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- fortran, python
- Domain
- data, performance
Research direction
Run the supplied Python reproduction with pspy.mcm_fortran.mcm_fortran.mcm_compute.calc_mcm_spin0and2_pure and inspect how the fifth output matrix is produced. Read the calc_mcm_spin0and2_pure entry point and its Wigner 3j calculations; done means establishing whether the component vanishes by symmetry and, if so, determining whether its calculation can safely be skipped.
Written by the indexing model from the issue text.
Description
When playing with the routine calc_mcm_spin0and2_pure I noticed something interesting: no matter which power spectra are fed into the function, the fifth output matrix always seems to contain extremely small values. This can be verified with the following script:
import numpy as np
from pspy.mcm_fortran.mcm_fortran import mcm_compute as mcm_fortran
lmax=100
mcm = np.zeros((5, lmax+1, lmax+1))
spec = np.random.normal(size=(4, 2*lmax+1))
mcm_fortran.calc_mcm_spin0and2_pure(spec[0], spec[1], spec[2], spec[3], mcm.T)
for i in range(5):
print (np.max(np.abs(mcm[i,:,:])))
Is this due to a bug in the function, or is there actually some kind of symmetry in the Wigner 3j symbols which makes this component vanish by construction? If the latter, it might be good to simply skip its calculation, saving some CPU time and memory.
- Dominant language
- Python
- Stars
- 10
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from simonsobs/pspy
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Faster analytical tf Open
Difficulty 3/5 1-2 days Newbie friendliness 38/100
-
bug
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100