thegooglecodearchive / healpy

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

using masked arrays for maps #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
in r104 I added a simple function for using masked arrays with maps, to mask 
out unobserved pixels.

create a masked array for map, useful for summing, averaging and making
histograms (using .compressed())

example:
import healpy as H
m = H.read_map('m.fits')
mma = H.ma(m)
mma.mean() # avoids the -1.6e30 values
hist(mma.compresses()) # removes unobserved pixels

I think in the long term healpy should use masked arrays by default, filling 
with UNSEEN only when required by c++ code.

Original issue reported on code.google.com by andrea.z...@gmail.com on 22 Jun 2010 at 8:18

GoogleCodeExporter commented 9 years ago
works fine,
useful for taking the difference of 2 maps with different coverage, just map_a 
- map_b

Original comment by andrea.z...@gmail.com on 7 Jul 2010 at 2:11