aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-11-22 09:52:55 +0800
committerAaron LI <aly@aaronly.me>2017-11-22 09:52:55 +0800
commit91fa275d07f811b463efc55847377634d706705a (patch)
tree61c6455db46b814171b6110050b1e8efd80cba82 /astro
parentb371bff663a4e29fe673774fccf9bcc2ddba341c (diff)
downloadatoolbox-91fa275d07f811b463efc55847377634d706705a.tar.bz2
astro/tile_slice.py: Workaround the scipy zoom warning
Diffstat (limited to 'astro')
-rwxr-xr-xastro/21cm/tile_slice.py3
1 files changed, 2 insertions, 1 deletions
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")