CosineRippleBox formfactor volume

Dear BornAgain team,

while working with the Ripples form factor I found some possible inconsistencies with the normalization of the particle volume. However, I am not entirely sure if this behaviour is intentional. I know that it is planned that the backend for these form factors will be changed in the future (#60 and #680), this is why I'd like to share my thougths.

Tested with BornAgain version 21.0.

The volume of a CosineRippleBox ripple should be (according to my naive interpretation of the drawings)

V = L \cdot \int_{-\frac{W}{2}}^{\frac{W}{2}} H \cos \left( \frac{\pi}{W} x \right) dx = \frac{2}{\pi} H W L.

The volume function however returns V = \frac{1}{2} H W L:

>>> ff = ba.CosineRippleBox(20*angstrom, 10*angstrom, 5*angstrom)
>>> print(ff.volume())
0.5
>>> print(0.5 * 20*angstrom* 10*angstrom* 5*angstrom)
0.5

It is stated in the manual that the volume is tested to be equal to V = \frac{1}{2} H W L, but I thought that this is only true for SawtoothRippleBox.

Similarly, the volume() function of the CosineRipple form factors with Gauss or Lorentz profile along the longitudinal axis also return V = \frac{1}{2} H W L.

In all of these cases I am not sure if this behaviour is intentional: The volume could be used as normalization so that it is possible to interchange the ripple form factors without changing the particle volume. This would be quite handy since the "absolute" scattering would be similar after the form factor change and it is more easily possible to assess the influence of the particle shape.

However, if this is true, the actual particle size (Length, Width (is it FWHM or std.-dev. in case of Gauss profile?) and Height) should be stated somewhere in the manual.

Cheers,

Timo

Edited by Timo Fuchs