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

Method fht2ps

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

Power Spectrum of one row from 2D Hartley Transform.

(int row, int maxN, float[] fht, float[] ps)

Source from the content-addressed store, hash-verified

460
461 /** Power Spectrum of one row from 2D Hartley Transform. */
462 private void fht2ps(int row, int maxN, float[] fht, float[] ps) {
463 int base = row*maxN;
464 int l;
465 for (int c=0; c<maxN; c++) {
466 l = ((maxN-row)%maxN) * maxN + (maxN-c)%maxN;
467 ps[base+c] = (sqr(fht[base+c]) + sqr(fht[l]))/2f;
468 }
469 }
470
471 /** Converts this FHT to a complex Fourier transform and returns it as a two slice stack.
472 * Author: Joachim Wesner

Callers 2

getPowerSpectrumMethod · 0.95
getRawPowerSpectrumMethod · 0.95

Calls 1

sqrMethod · 0.95

Tested by

no test coverage detected