From 7b3306f3bba0cc802ef7999be82d78920b9485e5 Mon Sep 17 00:00:00 2001 From: Thibaut Louis Date: Sun, 11 Jun 2023 11:38:16 +0200 Subject: [PATCH] add option for dtype in car_template_from_shape_wcs --- pspy/so_map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pspy/so_map.py b/pspy/so_map.py index cb69f75..1fbca73 100644 --- a/pspy/so_map.py +++ b/pspy/so_map.py @@ -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` @@ -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