Skip to content

Commit

Permalink
BUG: Only create tiles from visible data
Browse files Browse the repository at this point in the history
If _chip_insertions slices returns data_slice = None, the chip
lies entirely outside the output array. We don't need to consider
it anymore since it will never touch the output plane.

Resolves #16
  • Loading branch information
andykee committed Dec 15, 2020
1 parent cdee8a4 commit 22745fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lentil/prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def propagate(planes, wave, weight=None, npix=None, npix_chip=None, oversample=2
data_slice, chip_slice = _chip_insertion_slices(output_shape,
(w.data[d].shape[0], w.data[d].shape[1]),
shift)
tiles.append(imtile(w.data[d], data_slice, chip_slice))
if data_slice:
tiles.append(imtile(w.data[d], data_slice, chip_slice))

tiles = consolidate(tiles)

Expand Down

0 comments on commit 22745fe

Please sign in to comment.