Beamwidth as part of resolution for GISANS
The BornAgain implementation of beam resolution assumes that it can be described solely by a spread in InclinationAngle and AzimuthalAngle and thus implicitly assumes that the beam size is small. (As in the x-ray case.)
This is generally not true for the in-plane resolution in neutron experiments where the resolution is given by the sample size and the width of the first slit (guide size for some SANS). To arrive at the correct beam shape/resolution on the detector the two slits defining that resolution can be approximated with a trapezoid angle distribution that depends on the sample-detector distance. This worked well for me to get the right shape of the specular beam and for many scattering effects. It is, however, not straight forward to calculate for non-experts.
The problem with this description is, that the actual angular distribution that is simulated is larger than in the real experiment and has no correlation between the position on the sample and divergence angle. If the sample is a long-range in-plane pattern the Bragg-peaks can strongly depend on the in-plane angle, leading to scattered peaks that are sharper than the specular reflection.
I would propose a new description of beam resolution that includes both position and angle. The position part can be implemented with a fast FFT convolution on the detector pixels with a width that depends on the azimuthal angle (straight direction has full size of sample, largest azimuthal deviation only hits the edges of the sample). It could be specified directly with the slit distance, slit size and sample size to make it easy to calculate from the experimental information.