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

Method amplitude

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

Amplitude of one row from 2D Hartley Transform.

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

Source from the content-addressed store, hash-verified

524
525 /** Amplitude of one row from 2D Hartley Transform. */
526 void amplitude(int row, int maxN, float[] fht, float[] amplitude) {
527 int base = row*maxN;
528 int l;
529 for (int c=0; c<maxN; c++) {
530 l = ((maxN-row)%maxN) * maxN + (maxN-c)%maxN;
531 amplitude[base+c] = (float)Math.sqrt(sqr(fht[base+c]) + sqr(fht[l]));
532 }
533 }
534
535 private float sqr(float x) {
536 return x*x;

Callers 1

calculateAmplitudeMethod · 0.95

Calls 2

sqrMethod · 0.95
sqrtMethod · 0.45

Tested by

no test coverage detected