MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / transform1D

Method transform1D

ij/src/main/java/ij/process/FHT.java:172–180  ·  view source on GitHub ↗

Performs an optimized 1D Fast Hartley Transform (FHT) of an array. Array size must be a power of 2. Note that all amplitudes in the output 'x' are multiplied by the array length. Therefore, to get the power spectrum, for 1 <=i < N/2, use ps[i] = (x[i] x[i]+x[maxN-i] x[maxN-i])/(maxN maxN), where

(float[] x)

Source from the content-addressed store, hash-verified

170 * but you have to divide by maxN instead of 2*maxN.
171 */
172 public void transform1D(float[] x) {
173 int n = x.length;
174 if (S==null || n!=maxN) {
175 if (!isPowerOf2(n))
176 throw new IllegalArgumentException("Not power of 2 length: "+n);
177 initializeTables(n);
178 }
179 dfht3(x, 0, false, n);
180 }
181
182 /** Performs an inverse 1D Fast Hartley Transform (FHT) of an array */
183 public void inverseTransform1D(float[] fht) {

Callers 1

fourier1DMethod · 0.95

Calls 3

isPowerOf2Method · 0.95
initializeTablesMethod · 0.95
dfht3Method · 0.95

Tested by

no test coverage detected