Skip to content

Commit

Permalink
Include more parameters to align with what kbmod reproject.py is doing.
Browse files Browse the repository at this point in the history
  • Loading branch information
drewoldag committed Sep 6, 2024
1 parent e73e755 commit 9b16a9a
Showing 1 changed file with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b16a9a

Please sign in to comment.