code: def read_spectral_data(hdu):
      
      ebins = read_energy_bounds(hdu)
      fluxes = np.ndarray((len(ebins)))
      try:
          fluxes[0:-1] = hdu.data.field("E_MIN_FL")
          fluxes[-1] = hdu.data.field("E_MAX_FL")[-1]
          npreds = hdu.data.field("NPRED")
      except:
          fluxes = np.ones((len(ebins)))
          npreds = np.ones((len(ebins)))
      return ebins, fluxes, npreds
docs: Reads and returns the energy bin edges, fluxes and npreds from
      a FITs HDU