Astronomical spectrograph calculator