Beam-transport optimization for cold-neutron spectrometer