punchbowl.data.punchcube#
Classes#
PUNCHCube with a secondary celestial WCS. |
Module Contents#
- class punchbowl.data.punchcube.PUNCHCube(*args: list, celestial_wcs: astropy.wcs.WCS | None = None, **kwargs: dict)[source]#
Bases:
ndcube.NDCubePUNCHCube with a secondary celestial WCS.
- celestial_wcs = None#
- replace(data: numpy.ndarray | None = None, meta: punchbowl.data.meta.NormalizedMetadata | None = None, wcs: astropy.wcs.WCS | None = None, celestial_wcs: astropy.wcs.WCS | None = None, unit: astropy.units.Unit | None = None, mask: numpy.ndarray | None = None, uncertainty: astropy.nddata.StdDevUncertainty | None = None) PUNCHCube[source]#
(Shallow) copy this PUNCHCube, but with certain attributes replaced.
Useful because PUNCHCubes don’t allow changing their data array, WCS, etc., so to change the WCS you have to make a new cube. Using this function ensures everything is copied over.
- Parameters:
data (ndarray | None) – A replacement data array
meta (NormalizedMetadata | None) – A replacement meta
wcs (WCS | None) – A replacement WCS
celestial_wcs (WCS | None) – A replacement celestial WCS
unit (Unit | None) – A replacement unit
mask (np.ndarray | None) – A replacement mask
uncertainty (StdDevUncertainty | None) – A replacement uncertainty
- Returns:
cube
- Return type: