Neutron optics of the PSI ultracold-neutron source: characterization and simulation