# oph_gsl_fft¶

## Description¶

Behaviour

It computes the Fast Fourier Transform of a measure array. Measures can be OPH_COMPLEX_DOUBLEs (default) or OPH_DOUBLEs (in which case zero imaginary parts will be considered). The output type will always be OPH_COMPLEX_DOUBLE. There are no particular restrictions on the number of input elements but the highest performances can be obtained with numbers that can be factored out as a product of 2,3,4,5,6 or 7. If Delta represents the sampling step, output indexes correspond to particular frequencies according to the following schema:

index z x = FFT(z)
0 z(t = 0) x(f = 0)
1 z(t = 1) x(f = 1/(n Delta))
2 z(t = 2) x(f = 2/(n Delta))
. ........ ..................
n/2 z(t = n/2) x(f = +1/(2 Delta),-1/(2 Delta))
. ........ ..................
n-3 z(t = n-3) x(f = -3/(n Delta))
n-2 z(t = n-2) x(f = -2/(n Delta))
n-1 z(t = n-1) x(f = -1/(n Delta))

When n is even the location n/2 contains the equivalent frequencies (+1/(2* Delta), -1/(2* Delta)). If n is odd then the general structure of the table remains valid, but n/2 does not appear.

Parameters

• input measure type: Ophidia typing. Supported types are: ‘oph_double’; ‘oph_complex_double’.
• output measure type: Ophidia typing. Supported type is ‘oph_complex_double’.
• measure: input measure.

Return type

Binary-array.

Examples

Compute the coefficients of the FFT of the input measures.

```oph_gsl_fft('OPH_COMPLEX_DOUBLE','OPH_COMPLEX_DOUBLE',measure)
```

Operation type

Simple.

## Arguments¶

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input measure type “oph_type” “yes” “‘oph_double’|’oph_complex_double’”     “1” / “1”
output measure type “oph_type” “yes” “‘oph_complex_double’”     “1” / “1”
measure “binary-array” “yes”       “1” / “1”