calculates magnetic structure factor using FFT sFact = STRUCTFACT(obj, Option1, Value1, ...) Input: obj Input sw object, contains positions of the magnetic atoms, nExt parameter and the direction of the magnetic spins. Options: fExt Number of reciprocal lattice cells, to calculate form factor, dimensions are [1 3]. Default value is [1 1 1]. S Optional magnetic structure to use instead of the one stored in obj. Output: 'sFact' is a structure with the following fields: F2 Square of the 3 dimensional magnetic structure factor, dimensions are: [nExt(1)*fExt(1) nExt(2)*fExt(2) nExt(3)*fExt(3)], where nExt is the size of the extended unit cell. perp Square of the perpendicular component of the magnetic structure factor to the Q scattering vector, same size as sFact.int. xyz Cell storing the components of the complex structure factor in the form {X, Y, Z}. hkl Cell storing the wavevectors (h, k, l) in reciprocal lattice units, in the form {h, k, l} where the dimensions of each vector are [1 nExt(ii)*fExt(ii)] where ii is {1, 2, 3} for {h, k, l}. obj Copy of the input obj object. See also SW_PLOTSF, SW_INTSF, SW.ANNEAL, SW.GENMAGSTR.