Implementation of an adaptive energy grid routine in NDEX for the processing of thermal neutron scattering cross sections