Skip to content

Commit 4f0b3f5

Browse files
committed
Fix healpix map construction from fits file
1 parent d9f04c4 commit 4f0b3f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

maps/python/fitsio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,18 +245,18 @@ def load_skymap_fits(filename, hdu=None, keys=None, memmap=False, apply_units=Fa
245245
col in ['TT', 'TQ', 'TU', 'QQ', 'QU', 'UU'],
246246
)
247247
pol_type = getattr(MapPolType, col, None)
248-
mdata = (pix, data, nside) if pix is not None else data
248+
mdata = (pix, data, nside) if pix is not None else (data,)
249249

250250
if weighted:
251251
assert('T' in output)
252252
if 'W' not in output:
253253
output['W'] = G3SkyMapWeights()
254254
weight_map = output['W']
255-
hm = HealpixSkyMap(mdata, pol_type=pol_type, **map_opts)
255+
hm = HealpixSkyMap(*mdata, pol_type=pol_type, **map_opts)
256256
hm.overflow = overflow
257257
setattr(weight_map, col, hm)
258258
else:
259-
hm = HealpixSkyMap(mdata, pol_type=pol_type, **map_opts)
259+
hm = HealpixSkyMap(*mdata, pol_type=pol_type, **map_opts)
260260
output[col] = hm
261261

262262
del mdata, data

0 commit comments

Comments
 (0)