SpectralFunction A library to handle the interface of arbitrary spectral functions with nuclear codes