Spectroscopic diagnostic for ablative compression experiments