Closed HeloiseS closed 2 years ago
Hi,
I was wondering how to get the data cubes and subcubes in a numpy format? I've tried something like this:
arr_cube=np.zeros((subcube.shape[1], subcube.shape[2])) for i in range(subcube.shape[0]): arr_cube+=subcube[i,:,:].get_data_hdu('DATA').data
but it left me with loads of nan values and holes in my image.
Cheers, Heloise
The Cube (Image and Spectrum as well) objects have a .data attribute which is a Numpy masked array (and .var for the variance).
Cube
Image
Spectrum
.data
.var
Hi,
I was wondering how to get the data cubes and subcubes in a numpy format? I've tried something like this:
but it left me with loads of nan values and holes in my image.
Cheers, Heloise