Skip to content
/ DHT Public

A naive Python implementation of the Discrete Hartley Transform

License

Notifications You must be signed in to change notification settings

AndreaPi/DHT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discrete Hartley Transform in Python

A naive implementation of the Discrete Hartley Transform(DHT) and Inverse Discrete Hartley Transform (IDHT) in Python. The code has not been optimized for speed. All computations are based on formulas listed here.

  • To compute the DHT we use the well-known relationship between FFT and DHT.
  • To compute the IDHT we use the fact that the DHT is involutory, i.e., its own inverse up to a scale factor equal to 1/N where N is the sequence length
  • To compute the cyclic convolution of two sequences based on the DHT, we first compute the DHT of the convolution of two sequences using the convolution theorem for the DHT, and then we compute the IDHT of the resulting sequence

Requirements

Run

pip install -r requirements.txt

Currently, the only requirement is numpy.

Tests

To execute tests, in the same directory where dht.py is, run

python test_dht.py

Limitations

Currently, only the 1D DHT is computed.

About

A naive Python implementation of the Discrete Hartley Transform

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages