Copyright | [2017] Rinat Stryungis |
---|---|

License | BSD3 |

Maintainer | Rinat Stryungis <lazybonesxp@gmail.com> |

Stability | experimental |

Portability | non-portable (GHC extensions) |

Safe Haskell | None |

Language | Haskell2010 |

Computation of a PsudoWigner transform using the accelerate-fft library.

This module uses the accelerate-fft library. And the base implementation of fft uses a naive divide-and-conquer fft implementation whose absolute performance is appalling. It also requires that you know on the Haskell side the size of the data being transformed, and that this is a power-of-two in each dimension.

For performance, compile accelerate-fft against the foreign library bindings (using any number of '-fllvm-ptx', and '-fllvm-cpu' for the accelerate-llvm-ptx, and accelerate-llvm-native backends, respectively), which have none of the above restrictions. Both this flags are enabled by default.

# Documentation

:: (RealFloat e, IsFloating e, FromIntegral Int e, Elt e, sh ~ DIM2) | |

=> sh | shape of the data array. It is ignored, when compiled with Native or PTX backend. |

-> Acc (Array DIM1 e) | Smoothing window. Length of it must be odd. |

-> Acc (Array DIM1 (Complex e)) | Data array |

-> Acc (Array DIM2 e) |

Pseudo Wigner-ville distribution. It takes 1D array of complex floating numbers, window and returns 2D array of real numbers. Columns of result array represents time and rows - frequency. Frequency range is from 0 to n/4, where n is a sampling frequency.