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

Make theory prediction a bit more user-friendly #89

Closed
msyriac opened this issue Feb 1, 2020 · 2 comments · Fixed by #90
Closed

Make theory prediction a bit more user-friendly #89

msyriac opened this issue Feb 1, 2020 · 2 comments · Fixed by #90

Comments

@msyriac
Copy link
Member

msyriac commented Feb 1, 2020

If I have an array for the theory C_ell prediction tcl that is defined on np.arange(lmax) where lmax is quite a bit greater than the maximum multipole in the binning scheme (say, based on the nside), I still get an error:

Traceback (most recent call last):
  File "sim.py", line 76, in <module>
    cl_th = w.decouple_cell(w.couple_cell([tcl]))[0]
  File "/home/r/rbond/msyriac/.local/lib/python3.6/site-packages/pymaster-1.0-py3.6-linux-x86_64.egg/pymaster/workspaces.py", line 142, in couple_cell
    self.wsp.ncls * (self.wsp.lmax + 1))
RuntimeError: Passing inconsistent arguments from python

I get around this by doing instead:

cl_th = w.decouple_cell(w.couple_cell([tcl[:w.wsp.lmax+1]]))[0]

but it took me a while to figure that out. Could the slicing up to w.wsp.lmax+1 be done automatically whenever the maximum multipole of the input Cls is larger than w.wsp.lmax+1?

EDIT: This is on the easier_libsharp branch.

@damonge damonge mentioned this issue Feb 3, 2020
@damonge
Copy link
Collaborator

damonge commented Feb 3, 2020

Agreed, this is very annoying. Addressed here: #90

@damonge
Copy link
Collaborator

damonge commented Feb 3, 2020

All done @msyriac , thanks for reporting this. I'll make a release as soon as I manage to make this pip-installable.

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

Successfully merging a pull request may close this issue.

2 participants