Class BasicFreqDomBeam
java.lang.Object
beamformer.algorithms.BeamInformation
beamformer.algorithms.basicFreqDomain.BasicFreqDomBeam
- Author:
- mo55
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]
The order of channels in the incoming FFT data units arrayprotected int
The index number in the FFT data unit that corresponds to the minimum frequency to analyseprotected ComplexArray[]
An array of ComplexArray objects, of size numFreqBins. -
Constructor Summary
ConstructorsConstructorDescriptionBasicFreqDomBeam
(BasicFreqDomBeamFormer beamformer, int channelMap, int sequenceNum, PamVector beamVec, PamVector[] elementLocs, int[] channelList, double[] weights, double[] freqBins, double speedOfSound) Main Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Calculates a steering vector over all hydrophones and frequency bins.void
clear the list of channel ordersint
protected void
getChannelOrder
(FFTDataUnit[] fftDataUnits) loop over the number of channels and determine the order of the hydrophones in the FFTDataUnits object.int
process
(FFTDataUnit[] fftDataUnits) Process a set of FFTDataUnit objects using the preset frequency bin rangeprocess
(FFTDataUnit[] fftDataUnits, int startBin, int endBin) Process a set of FFTDataUnit objects using a given frequency bin range.void
setWeights
(double[] weights)
-
Field Details
-
startIdx
protected int startIdxThe index number in the FFT data unit that corresponds to the minimum frequency to analyse -
steeringVecs
An array of ComplexArray objects, of size numFreqBins. Each ComplexArray object holds a double array of complex numbers, with one complex number for each hydrophone element. -
chanOrder
protected int[] chanOrderThe order of channels in the incoming FFT data units array
-
-
Constructor Details
-
BasicFreqDomBeam
public BasicFreqDomBeam(BasicFreqDomBeamFormer beamformer, int channelMap, int sequenceNum, PamVector beamVec, PamVector[] elementLocs, int[] channelList, double[] weights, double[] freqBins, double speedOfSound) Main Constructor.- Parameters:
beamformer
- The BasicFreqDomBeamFormer creating this beamchannelMap
- a bitmap indicating which channels are part of this groupsequenceNum
- the sequence number of this beambeamVec
- A PamVector describing this beam directionelementLocs
- an array of PamVectors giving the hydrophone element X,Y,Z locations, one PamVector for each element in this groupchannelList
- a list of channels in this beam. Note that the order of the list MUST MATCH the order of the locations in elementLocsweights
- an array of double values, one for each element in this group.freqBins
- an array of frequencies to calculate the steering vector overspeedOfSound
- the speed of sound in the water
-
-
Method Details
-
calcSteeringVec
protected void calcSteeringVec()Calculates a steering vector over all hydrophones and frequency bins.A phase delay of the form ejinvalid input: 'ω't is calculated for each frequency bin, where invalid input: 'ω'=the angular frequency (=2*invalid input: 'π'*center-of-freq-bin) and t is the time delay based on the location of the hydrophone.
t is calculated as the location vector of the hydrophone / speed of sound (=locVec/c).
The wave number k is defined as invalid input: 'ω'/c. Substituting for t gives the phase delay in the form ej*k*locVec, which can also be expressed through Euler's formula as cos(k*locVec)+j*sin(k*locVec). The cos/sin values are saved to the ComplexArray steeringVecs[freqBinIdx].
- Parameters:
elementNumber
- the hydrophone number
-
process
Process a set of FFTDataUnit objects using the preset frequency bin range- Parameters:
fftDataUnits
- the group of FFTDataUnits to analyse- Returns:
- complex array of summed beamformed data. Note that the size of the array is the number of frequency bins in the full frequency range, as specified by the user in the parameters GUI
-
process
Process a set of FFTDataUnit objects using a given frequency bin range.- Parameters:
fftDataUnits
- the group of FFTDataUnits to analysestartBin
- first bin to processendBin
- last bin to process (not inclusive, so endBin can equal fftLength/2)- Returns:
- complex array of summed beamformed data. Note that the size of the array is the number of frequency bins in the full frequency range, as specified by the user in the parameters GUI, even if only a portion of that range was actually processed
-
getChannelOrder
loop over the number of channels and determine the order of the hydrophones in the FFTDataUnits object. Create a look up table to match the order of hydrophones in the fftDataUnits array to the order in the steeringVecs array- Parameters:
fftDataUnits
-
-
getChannelMap
public int getChannelMap()- Returns:
- the channelMap
-
getSequenceMap
public int getSequenceMap()- Returns:
- the sequenceMap
-
setWeights
public void setWeights(double[] weights) - Parameters:
weights
- the weights to set
-
clearChannelOrderList
public void clearChannelOrderList()clear the list of channel orders
-