I am attempting to read in a FITS file and convert the data into a multidimensional numpy array (So i can easily index the data).
The FITS data is structured like:
FITS_rec([(time, [rate, rate, rate, rate], [ERROR, ERROR, ERROR, ERROR], TOTCOUNTS, fraxexp.)]
that is one 'row' (IE = data[0]
of data = hdul[1].data
), in my case the number of 'rate' (or error) is varies, for different FITS files.
I wish to make this data into a numpy array, but when I do:
arr = np.asarray(data)
, I get a 1D object out which I cannot index easily. IE arr[:][0]
is just equal to data[0]
. I have also tried to do a np.split
with no benifit.