From 91fa275d07f811b463efc55847377634d706705a Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 22 Nov 2017 09:52:55 +0800 Subject: astro/tile_slice.py: Workaround the scipy zoom warning --- astro/21cm/tile_slice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'astro') diff --git a/astro/21cm/tile_slice.py b/astro/21cm/tile_slice.py index cd66896..091d599 100755 --- a/astro/21cm/tile_slice.py +++ b/astro/21cm/tile_slice.py @@ -78,7 +78,8 @@ def main(): Nside2 = round(Nside * args.fov / fov_in) img2 = img_tiled[:Nside2, :Nside2] # Rescale to the output size - img_out = scipy.ndimage.zoom(img2, zoom=args.Nside/Nside2, order=1) + zoom = (args.Nside + 0.1) / Nside2 # +0.1 to workaround the scipy warning + img_out = scipy.ndimage.zoom(img2, zoom=zoom, order=1) # Record information to header header["Z_C"] = (zc, "Central redshift") header["FREQ_C"] = (fc, "[MHz] Frequency w.r.t. to central redshift") -- cgit v1.2.2