In [4]:
from scipy.io.idl import readsav
import healpy as hp

In [5]:
filename = '/Volumes/Data1/mwa_healpix/fhd_rlb_devel_nodiffuse_june2015/Combined_obs_Aug23_even_cubeXX.sav'

In [6]:
contents = readsav(filename, python_dict=True)

In [7]:
contents.keys()


Out[7]:
['n_avg',
 'nside',
 'frequencies',
 'model_cube',
 'hpx_inds',
 'variance_cube',
 'dirty_cube',
 'weights_cube',
 'beam_squared_cube',
 'obs_arr']

In [8]:
ordering = 'ring'

In [9]:
nside = int(contents['nside'])
pixels = contents['hpx_inds']

In [10]:
dec, ra = hp.pixelfunc.pix2ang(nside, pixels, nest=False)

In [14]:
residual_data = contents['dirty_cube'] - contents['model_cube']

In [17]:
residual_data = residual_data[0,:]

In [18]:
residual_data.shape


Out[18]:
(135413,)

In [ ]: