multicolorfits.reproject_cube#

multicolorfits.reproject_cube(mapin, hdrfrom, hdrto, scale=False, method='interp', parallel=True, returnfootprint=False, print_progress=False)[source]#

Reproject a 3D cube from one WCS header onto another, plane by plane.

Calls reproject_image() for each spectral (or other non-spatial) slice. For long cubes, set print_progress=True to show a stdout progress bar via draw_progress_bar() (zero dependencies). Scripts that prefer tqdm can loop over planes themselves and call reproject_image — see that helper’s docstring for an example.

Parameters:
Returns:

array or (array, array) – Reprojected cube (, optional footprint cube when returnfootprint=True and method='spi').