On this page:

10 Stuff That Doesn’t Belong Anywhere Else

 (require math/utils)

The maximum number of threads a parallelized math function will use. The default value is (max 1 (processor-count)).


(dft-convention)  (List Real Real)

(dft-convention lst)  void?
  lst : (List Real Real)
A parameter controlling the convention used for scaling discrete Fourier transforms, such as those performed by array-fft. The default value is '(1 -1), which represents the convention used in signal processing.

In general, if lst is (list a b) and n is the length of a transformed array axis or vector, then
  • Each sum is scaled by (expt n (/ (- a 1) 2)).

  • Each exponential in the sum has its argument scaled by b.

Conveniently, a Fourier transform with convention (list (- a) (- b)) is the inverse of a Fourier transform with convention (list a b).

See Mathematica’s documentation on Fourier, from which this excellent idea was stolen.


(dft-inverse-convention)  (List Real Real)

Returns the convention used for inverse Fourier transforms, given the current convention.