# IFFT
# Usage
This function treats the two input series as the real and imaginary part of a complex series, performs an inverse fast Fourier transform (IFFT), and outputs the real part of the result.
For the input format, please refer to the output format of FFT
function.
Moreover, the compressed output of FFT
function is also supported.
Name: IFFT
Input: Only support two input series. The types are both INT32 / INT64 / FLOAT / DOUBLE.
Parameters:
start
: The start time of the output series with the format 'yyyy-MM-dd HH:mm:ss'. By default, it is '1970-01-01 08:00:00'.interval
: The interval of the output series, which is a positive number with an unit. The unit is 'ms' for millisecond, 's' for second, 'm' for minute, 'h' for hour and 'd' for day. By default, it is 1s.
Output: Output a single series. The type is DOUBLE. It is strictly equispaced. The values are the results of IFFT.
Note: If a row contains null points or NaN
, it will be ignored.
# Examples
Input series:
+-----------------------------+----------------------+----------------------+
| Time| root.test.d1.re| root.test.d1.im|
+-----------------------------+----------------------+----------------------+
|1970-01-01T08:00:00.000+08:00| 0.0| 0.0|
|1970-01-01T08:00:00.001+08:00| -3.932894010461041E-9| 1.2104201863039066E-8|
|1970-01-01T08:00:00.002+08:00|-1.4021739447490164E-7| 1.9299268669082926E-7|
|1970-01-01T08:00:00.003+08:00| -7.057291240286645E-8| 5.127422242345858E-8|
|1970-01-01T08:00:00.004+08:00| 19.021130288047125| -6.180339875198807|
|1970-01-01T08:00:00.005+08:00| 9.999999850988388| 3.501852745067114E-16|
|1970-01-01T08:00:00.019+08:00| -3.932894898639461E-9|-1.2104202549376264E-8|
+-----------------------------+----------------------+----------------------+
SQL for query:
select ifft(re, im, 'interval'='1m', 'start'='2021-01-01 00:00:00') from root.test.d1
Output series:
+-----------------------------+-------------------------------------------------------+
| Time|ifft(root.test.d1.re, root.test.d1.im, "interval"="1m",|
| | "start"="2021-01-01 00:00:00")|
+-----------------------------+-------------------------------------------------------+
|2021-01-01T00:00:00.000+08:00| 2.902112992431231|
|2021-01-01T00:01:00.000+08:00| 1.1755704705132448|
|2021-01-01T00:02:00.000+08:00| -2.175570513757101|
|2021-01-01T00:03:00.000+08:00| -1.9021130389094498|
|2021-01-01T00:04:00.000+08:00| 0.9999999925494194|
|2021-01-01T00:05:00.000+08:00| 1.902113046743454|
|2021-01-01T00:06:00.000+08:00| 0.17557053610884188|
|2021-01-01T00:07:00.000+08:00| -1.1755704886020932|
|2021-01-01T00:08:00.000+08:00| -0.9021130371347148|
|2021-01-01T00:09:00.000+08:00| 3.552713678800501E-16|
|2021-01-01T00:10:00.000+08:00| 0.9021130371347154|
|2021-01-01T00:11:00.000+08:00| 1.1755704886020932|
|2021-01-01T00:12:00.000+08:00| -0.17557053610884144|
|2021-01-01T00:13:00.000+08:00| -1.902113046743454|
|2021-01-01T00:14:00.000+08:00| -0.9999999925494196|
|2021-01-01T00:15:00.000+08:00| 1.9021130389094498|
|2021-01-01T00:16:00.000+08:00| 2.1755705137571004|
|2021-01-01T00:17:00.000+08:00| -1.1755704705132448|
|2021-01-01T00:18:00.000+08:00| -2.902112992431231|
|2021-01-01T00:19:00.000+08:00| -3.552713678800501E-16|
+-----------------------------+-------------------------------------------------------+