public class PsdSignature2D
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
averaged |
private float[][] |
buffer |
private int |
dimensions |
private edu.emory.mathcs.jtransforms.fft.FloatFFT_2D |
fftCore |
static int |
HORIZONTAL_SYMMETRY |
private int |
measures |
private float[][] |
psd |
private int |
psdSizeX |
private int |
psdSizeY |
private float[][] |
psdTmp |
private java.util.ArrayList<float[][]> |
psdVector |
private Restart |
restart |
private java.util.concurrent.Semaphore |
semaphore |
private int[] |
sizes |
private int |
surfaceSizeX |
private int |
surfaceSizeY |
static int |
VERTICAL_SYMMETRY |
Constructor and Description |
---|
PsdSignature2D(int surfaceSizeY,
int surfaceSizeX,
double extent) |
Modifier and Type | Method and Description |
---|---|
void |
addSurfaceSample(float[][] sampledSurface) |
void |
applySymmetryFold(int symmetryType)
It does the average of two points (either vertically or horizontally) and assigns that value to
both points.
|
static float[][] |
doOnePsd(float[][] sampledSurface)
Does the PSD of the given surface.
|
float |
getMax() |
float |
getMin() |
float[][] |
getPsd() |
void |
printAvgToFile() |
void |
reset() |
void |
setRestart(Restart restart) |
void |
writePsdBinary(int simulationNumber)
Writes the current PSD to a mko (binary) file.
|
void |
writePsdText(int simulationNumber)
Writes the current PSD to a text file.
|
private edu.emory.mathcs.jtransforms.fft.FloatFFT_2D fftCore
private float[][] psd
private java.util.ArrayList<float[][]> psdVector
private float[][] psdTmp
private float[][] buffer
private int measures
private java.util.concurrent.Semaphore semaphore
private boolean averaged
private final int psdSizeY
private final int psdSizeX
private final int surfaceSizeY
private final int surfaceSizeX
private final int[] sizes
private final int dimensions
private Restart restart
public static final int HORIZONTAL_SYMMETRY
public static final int VERTICAL_SYMMETRY
public PsdSignature2D(int surfaceSizeY, int surfaceSizeX, double extent)
public void addSurfaceSample(float[][] sampledSurface)
public static float[][] doOnePsd(float[][] sampledSurface)
sampledSurface
- given surfacepublic float[][] getPsd()
public void reset()
public void applySymmetryFold(int symmetryType)
symmetryType
- horizontal or vertical (HORIZONTAL_SYMMETRY or VERTICAL_SYMMETRY)public void writePsdBinary(int simulationNumber)
simulationNumber
- the number of simulationpublic void writePsdText(int simulationNumber)
simulationNumber
- the number of simulationpublic void printAvgToFile()
public void setRestart(Restart restart)
public float getMin()
public float getMax()