Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Sep 12, 2023
1 parent 4d7570f commit 90c8fd7
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions spectral_cube/dask_spectral_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,25 +1515,10 @@ def reproject(self, header, order='bilinear', use_memmap=False,
shape_out = tuple([header['NAXIS{0}'.format(i + 1)] for i in
range(header['NAXIS'])][::-1])

# def reproject_interp_wrapper(img_slice, **kwargs):
# # What exactly is the wrapper getting here?
# # I think it is given a _cube_ that is a cutout?
# # No, it is getting dask arrays (at least sometimes)
# if filled:
# data = img_slice.filled_data[:]
# else:
# data = img_slice._data
# return reproject_interp((data, img_slice.header),
# newwcs, shape_out=shape_out, **kwargs)

# newcube, newcube_valid = self.apply_function_parallel_spatial(
# reproject_interp_wrapper,
# accepts_chunks=True,
# order=order,
# **reproj_kwargs)

newcube, newcube_valid = reproject_interp((self.filled_data[:] if filled else self._data, self.header),
newwcs, shape_out=shape_out, **kwargs
print(self._get_filled_data())

newcube, newcube_valid = reproject_interp((self._get_filled_data() if filled else self._data, self.header),
newwcs, shape_out=shape_out, block_size=(256, 256, 256), **kwargs
)

return self._new_cube_with(data=newcube,
Expand Down

0 comments on commit 90c8fd7

Please sign in to comment.