Reading 1d spectra from fits files