thegooglecodearchive / healpy

Automatically exported from code.google.com/p/healpy
GNU General Public License v2.0
0 stars 0 forks source link

Passing dict of partial map data to cartview() mollview() skews positions #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'm working on implementing "zoom" functionality based on healpix maps, so my 
datasets are usually a small fraction of the full sphere.  I encountered 
problems when trying to pass a dict to cartview(), mollview()

=== What steps will reproduce the problem?

1. Generate a map of a small portion of the sky in a dict key=healpix ipix 
value=map data
2. Pass dict to cartview() or mollview()

I passed like this:

           healpy.cartview(self.pixmap,                                  
                            nest=True,                                          
                            coord='C',                                          
                            title=title,                                                  
                            cmap=matplotlib.cm.hot    

where self.pixmap is a python dict containing ~77 pixels of a nside=512 map

3. View the image.

=== What is the expected output? What do you see instead?

I expect to see the pixels in the same location as when I pass a full array 
which defines a value (default 0) for every pixel on the sphere (see 
*_fullsphere plots).  Instead, I see some data moved to another location (see 
*_dict plots).

=== What version of the product are you using? On what operating system?

healpy 0.10.1 on Mac OS X

=== Please provide any additional information below.

I realize the scaling for these plots is ridiculous.  My goal is to crop them 
to only show the area that contains data.  Though it wasn't documented as a 
feature of the healpy.*view() functions, I think it would be good behavior to 
accept a dict and automatically crop to the area that defines data.

Original issue reported on code.google.com by Ricky.Eg...@gmail.com on 20 May 2011 at 1:46

Attachments:

GoogleCodeExporter commented 9 years ago
I cannot reproduce the problem. The attached code works fine for me... Could 
you provide an example code which fails ?

Original comment by cyrille....@gmail.com on 8 Jun 2011 at 4:04

Attachments: