Skip to content

Commit

Permalink
add option for dtype in car_template_from_shape_wcs
Browse files Browse the repository at this point in the history
  • Loading branch information
thibautlouis committed Jun 11, 2023
1 parent b362572 commit 7b3306f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pspy/so_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def full_sky_car_template(ncomp, res):
shape, wcs = enmap.fullsky_geometry(res=res, dims=pre)
return car_template_from_shape_wcs(ncomp, shape, wcs)

def car_template_from_shape_wcs(ncomp_out, shape, wcs):
def car_template_from_shape_wcs(ncomp_out, shape, wcs, dtype=np.float64):
"""
Create a template from shape and wcs args with
a number of components `ncomp_out`
Expand All @@ -742,7 +742,7 @@ def car_template_from_shape_wcs(ncomp_out, shape, wcs):
shape_out = (ncomp_out,) + shape_out

template = so_map()
template.data = enmap.zeros(shape_out, wcs=wcs, dtype=None)
template.data = enmap.zeros(shape_out, wcs=wcs, dtype=dtype)
template.pixel = "CAR"
template.nside = None
template.ncomp = ncomp_out
Expand Down

0 comments on commit 7b3306f

Please sign in to comment.