MARS III: The storage and analysis of the spectrograph data