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, setprint_progress=Trueto show a stdout progress bar viadraw_progress_bar()(zero dependencies). Scripts that prefer tqdm can loop over planes themselves and callreproject_image— see that helper’s docstring for an example.- Parameters:
mapin – See
reproject_image().hdrfrom – See
reproject_image().hdrto – See
reproject_image().scale – See
reproject_image().method – See
reproject_image().parallel – See
reproject_image().returnfootprint – See
reproject_image().print_progress (bool, optional) – If True, update an ANSI progress bar on stdout after each plane (default False).
- Returns:
array or (array, array) – Reprojected cube (, optional footprint cube when
returnfootprint=Trueandmethod='spi').