  We propose a versatile software package in the form of a Python extension,
named CDEF (Computing Debye's scattering formula for Extraordinary
Formfactors), to approximately calculate scattering profiles of arbitrarily
shaped nanoparticles for small-angle X-ray scattering (SAXS). CDEF generates a
quasi-randomly distributed point cloud in the desired particle shape and then
applies the open source software DEBYER for efficient evaluation of Debye's
scattering formula to calculate the SAXS pattern. If self-correlation of the
scattering signal is not omitted, the quasi-random distribution provides faster
convergence compared to a true random distribution of the scatterers,
especially at higher momentum transfer. The usage of the software is
demonstrated for the evaluation of scattering data of Au nanocubes with rounded
edges, which were measured at the four-crystal monochromator beamline of PTB at
the synchrotron radiation facility BESSY II in Berlin. Our implementation is
fast enough to run on a single desktop computer and perform model fits within
minutes. The accuracy of the method was analyzed by comparison with
analytically known form factors and verified with another implementation, the
SPONGE, based on a similiar principle with fewer approximations. Additionally,
the SPONGE coupled to McSAS3 allows us to further retrieve information on the
uncertainty of the size distribution using a Monte-Carlo uncertainty estimation
algorithm.
