From 9b16a9ad3927a771b5da049fcfed054b20cd735b Mon Sep 17 00:00:00 2001 From: Drew Oldag Date: Fri, 6 Sep 2024 11:37:43 -0700 Subject: [PATCH] Include more parameters to align with what kbmod reproject.py is doing. --- ...oject_single_chip_single_night_wu_shard.py | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/kbmod_wf/task_impls/reproject_single_chip_single_night_wu_shard.py b/src/kbmod_wf/task_impls/reproject_single_chip_single_night_wu_shard.py index 385e8797..f8afb83d 100644 --- a/src/kbmod_wf/task_impls/reproject_single_chip_single_night_wu_shard.py +++ b/src/kbmod_wf/task_impls/reproject_single_chip_single_night_wu_shard.py @@ -49,9 +49,32 @@ def reproject_shard( opt_wcs.array_shape = shape shard = fitsio.open(original_wu_shard_filepath) - sci = reproject_adaptive(shard, opt_wcs, hdu_in=0) - var = reproject_adaptive(shard, opt_wcs, hdu_in=1) - mask = reproject_adaptive(shard, opt_wcs, hdu_in=2) + sci = reproject_adaptive( + shard, + opt_wcs, + hdu_in=0, + shape_out=opt_wcs.array_shape, + bad_value_mode="ignore", + roundtrip_coords=False + ) + + var = reproject_adaptive( + shard, + opt_wcs, + hdu_in=1, + shape_out=opt_wcs.array_shape, + bad_value_mode="ignore", + roundtrip_coords=False + ) + + mask = reproject_adaptive( + shard, + opt_wcs, + hdu_in=2, + shape_out=opt_wcs.array_shape, + bad_value_mode="ignore", + roundtrip_coords=False + ) shard[0].data = sci.astype(np.float32) shard[1].data = var.astype(np.float32)