-
Notifications
You must be signed in to change notification settings - Fork 1
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
first try at getting lensed CMB maps in #4
Conversation
…changes to API and also separate naming scheme from main call
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.
Well done! Thanks for contributing this
Please let's try to make meaningful commit messages, also, try to consolidate commits before pushing with something like git rebase -i HEAD~10
Indeed. Even putting aside bandpass integration for now, passing even just the central frequencies would be better than passing an integer nfreqs. In actsims I pass around lists such as [‘f150’] or [‘f090’, ‘f150’]. What will we do in mapsims?
… On Dec 6, 2018, at 12:45 PM, Mathew S. Madhavacheril ***@***.***> wrote:
@msyriac commented on this pull request.
In mapsims/cmb.py <#4 (comment)>:
> + returns (nfreqs,ncomp,Ny,Nx) rectangular pixel ndmap.
+
+ '''
+ ncomp = 3 if pol else 1
+ filename = _get_cmb_map_string(cmb_dir,iteration_num,cmb_set,lensed,aberrated)
+ #The hdu = (1, 2,3) means get all of T, E, B
+ #Note the alm's are stored as complex32, so upgrade this for processing
+ alm_teb = np.complex128(hp.fitsfunc.read_alm(filename, hdu = (1,2,3) if pol else 1))
+ #Here we can multiply the alms by the appropriate beam;
+ #hp.sphtfunc.almxfl can be used. Not included yet. Once we
+ #do, we will have to call the inverse SHT nfreqs times, as in actsims.
+ if nside is not None:
+ #Then we are outputting a healpix map
+ map_tqu = hp.alm2map(alm_teb, nside)
+ output = np.tile(map_tqu, (nfreqs, 1, 1)) # if nfreqs>1 else map_tqu
+ #Here we want to multiply the map by the modulation factor. FIXME: not implemented yet
So instead of nfreqs, we'll need some way to specify the frequency bandpasses in the interface to this function right? Should we go with some effective central frequency? Or do we want to do a bandpass integration? What will PySM be doing?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#4 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/APAXHDMLYVBDTYsJrTDDJfo0bigj7MFhks5u2VfEgaJpZM4ZFxor>.
|
I've made a first pass at integrating mapsims.cmb and so_pysm_models.alms. Could you have a look? |
@ajvanengelen I've put a placeholder for modulation here: https://github.com/msyriac/so_pysm_models/blob/precomputed_alms_with_car/so_pysm_models/alms.py#L64 |
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.
it looks good, I tried to fix tests on Travis, let's see if it worked once the Travis tests complete
thanks @msyriac ! |
This is a tweak of a similar implementation in actsims https://github.com/ACTCollaboration/actsims/blob/96f4b98d9e580c33fb73f1334f476817b0286782/actsims/simTools.py#L24
This is just draft code and has not been tested! But we (Mat and Alex) are submitting it for a first review.
It is decoupled from the actsims repo but by default will load up the same lensed alm's.