Spectroscopic diagnostics of railgun plasma armatures