Optimization of the n/γ separation algorithm for a digital neutron spectrometer