Package beamformer
Class BeamAlgorithmParams
java.lang.Object
beamformer.BeamAlgorithmParams
- All Implemented Interfaces:
Serializable
,Cloneable
,ManagedParameters
- Direct Known Subclasses:
BasicFreqDomParams
,MVDRParams
,NullBeamParams
public abstract class BeamAlgorithmParams
extends Object
implements Serializable, Cloneable, ManagedParameters
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int[]
A 3 element vector with the minimum azimuth angle (index 0), maximum azimuth angle (index 1), and step size (index 2) to use for the BeamOGram sweep.protected int[]
A 3 element vector with the minimum slant angle (index 0), maximum slant angle (index 1), and step size (index 2) to use for the BeamOGram sweep.protected boolean
whether or not this instance of the algorithm can/should allow the user to create individual beams.protected boolean
whether or not this instance of the algorithm can/should allow the user to create a beamogram.protected int
Channel map describing the channels (hydrophones) used in this groupprotected double[][]
A 2D array containing the frequency range to analyse.protected int
The group number these parameters are linked toprotected int[]
an array containing the beam headings, in degrees, where 0 = straight ahead and 180 = behind.protected int
integer indicating how many individual beams are to be created.static final long
protected int[]
an array containing the beam slant angles, in degrees, where 0 is horizontal and -90 = straight down. -
Constructor Summary
ConstructorsConstructorDescriptionBeamAlgorithmParams
(String algorithmName, int groupNumber, int channelMap) Main constructor -
Method Summary
Modifier and TypeMethodDescriptionabstract BeamAlgorithmParams
clone()
Clone the fields in this abstract class, as well as any fields specific to the extended class.int[]
double[]
int[]
int
double[][]
int
int[]
int
int
Get a set of data that describes all of the parameters in a classstatic long
int[]
Return the slant angles for the individual beams.boolean
Whether or not this instance of the algorithm can/should allow the user to create individual beams.boolean
Whether or not this instance of the algorithm can/should allow the user to create a beamogram.void
setAlgorithmName
(String algorithmName) void
setBeamOGramAngles
(int[] beamOGramAngles) void
setBeamOGramFreqRange
(double[] beamOGramFreqRange) void
setBeamOGramSlants
(int[] beamOGramSlants) void
setCanBeam
(boolean canBeam) Whether or not this instance of the algorithm can/should allow the user to create individual beams.void
setCanBeamogram
(boolean canBeamogram) Whether or not this instance of the algorithm can/should allow the user to create a beamogram.void
setChannelMap
(int channelMap) void
setFreqRange
(double[][] freqRange) void
setGroupNumber
(int groupNumber) void
setHeadings
(int[] headings) void
setNumBeamogram
(int numBeamogram) void
setNumBeams
(int numBeams) void
setSlants
(int[] slants) Set the slant angles
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
groupNumber
protected int groupNumberThe group number these parameters are linked to -
channelMap
protected int channelMapChannel map describing the channels (hydrophones) used in this group -
numBeams
protected int numBeamsinteger indicating how many individual beams are to be created. Defaults to 0. -
headings
protected int[] headingsan array containing the beam headings, in degrees, where 0 = straight ahead and 180 = behind. The length of the array is numBeams. The term headings (aka azimuth) is used to make the variable easily recognisable for the most common type of hydrophones array, the linear horizontal array. A more generic term for this variable would be main angle, in the direction of the primary array axis -
slants
protected int[] slantsan array containing the beam slant angles, in degrees, where 0 is horizontal and -90 = straight down. The length of the array is numBeams. The term slant angle is used to make the variable easily recognisable for the most common type of hydrophones array, the linear horizontal array. A more generic term for this variable would be secondary angle, relative to the perpendicular to the array axis primary array axis -
freqRange
protected double[][] freqRangeA 2D array containing the frequency range to analyse. The second array is of length 2 with index 0 = min freq and index 1 = max freq. The first array will have one index for each of the beams (i.e. [numBeams]). If this array is null, it will default to the full frequency range available from the fft source. -
beamOGramAngles
protected int[] beamOGramAnglesA 3 element vector with the minimum azimuth angle (index 0), maximum azimuth angle (index 1), and step size (index 2) to use for the BeamOGram sweep. Initialises to 0deg to 180deg, with a 2 degree step. Note that the term azimuth is used for familiarity, and is appropriate for horizontal linear arrays. A more generic term would be main angle, in the direction of the primary array axis -
beamOGramSlants
protected int[] beamOGramSlantsA 3 element vector with the minimum slant angle (index 0), maximum slant angle (index 1), and step size (index 2) to use for the BeamOGram sweep. For a horizontal linear array, 0 deg is horizontal and -90 deg is straight down. Initialises to zero slant (0 deg x 0 deg x 1 deg step - step size cannot be 0 or else it will cause div-by-0 error later). Note that the term slant is used for familiarity, and is appropriate for horizontal linear arrays. A more generic term would be secondary angle, relative to the perpendicular to the array axis primary array axis. -
canBeam
protected boolean canBeamwhether or not this instance of the algorithm can/should allow the user to create individual beams. Defaults to true. -
canBeamogram
protected boolean canBeamogramwhether or not this instance of the algorithm can/should allow the user to create a beamogram. Defaults to true.
-
-
Constructor Details
-
BeamAlgorithmParams
Main constructor- Parameters:
algorithmName
- The name of the algorithm using these parameters. This should be the name returned by the getStaticProperties().getName() call to the algorithm provider object, in order to properly match up provider to parameters in BeamformerProcess.groupNumber
- the group numberchannelMap
- the channel map for the channels in this group
-
-
Method Details
-
getAlgorithmName
- Returns:
- the algorithmName
-
setAlgorithmName
- Parameters:
algorithmName
- the algorithmName to set
-
getGroupNumber
public int getGroupNumber()- Returns:
- the groupNumber
-
setGroupNumber
public void setGroupNumber(int groupNumber) - Parameters:
groupNumber
- the groupNumber to set
-
getSerialversionuid
public static long getSerialversionuid()- Returns:
- the serialversionuid
-
getChannelMap
public int getChannelMap()- Returns:
- the channelMap
-
setChannelMap
public void setChannelMap(int channelMap) - Parameters:
channelMap
- the channelMap to set
-
getNumBeams
public int getNumBeams()- Returns:
- the numBeams
-
setNumBeams
public void setNumBeams(int numBeams) - Parameters:
numBeams
- the numBeams to set
-
getHeadings
public int[] getHeadings()- Returns:
- the headings
-
setHeadings
public void setHeadings(int[] headings) - Parameters:
headings
- the headings to set
-
getNumBeamogram
public int getNumBeamogram()- Returns:
- the numBeamogram
-
setNumBeamogram
public void setNumBeamogram(int numBeamogram) - Parameters:
numBeamogram
- the numBeamogram to set
-
getBeamOGramAngles
public int[] getBeamOGramAngles()- Returns:
- the beamOGramAngles
-
setBeamOGramAngles
public void setBeamOGramAngles(int[] beamOGramAngles) - Parameters:
beamOGramAngles
- the beamOGramAngles to set
-
getFreqRange
public double[][] getFreqRange()- Returns:
- the freqRange
-
setFreqRange
public void setFreqRange(double[][] freqRange) - Parameters:
freqRange
- the freqRange to set
-
getSlants
public int[] getSlants()Return the slant angles for the individual beams. In some circumstances, such as for linear arrays, the slant angles will not have been defined. If this is the case, create a new array of size numBeams containing 0's, and pass that back to the calling method.- Returns:
-
setSlants
public void setSlants(int[] slants) Set the slant angles- Parameters:
slants
-
-
getBeamOGramSlants
public int[] getBeamOGramSlants()- Returns:
-
setBeamOGramSlants
public void setBeamOGramSlants(int[] beamOGramSlants) - Parameters:
beamOGramSlants
-
-
clone
Clone the fields in this abstract class, as well as any fields specific to the extended class. Extended classes must override this method to ensure the params get saved properly. See theBasicFreqDomParams.clone
method for an example; -
getBeamOGramFreqRange
public double[] getBeamOGramFreqRange()- Returns:
- the beamOGramFreqRange
-
setBeamOGramFreqRange
public void setBeamOGramFreqRange(double[] beamOGramFreqRange) - Parameters:
beamOGramFreqRange
- the beamOGramFreqRange to set
-
isCanBeam
public boolean isCanBeam()Whether or not this instance of the algorithm can/should allow the user to create individual beams. True = ok to show beams.- Returns:
- True = ok to show beams.
-
setCanBeam
public void setCanBeam(boolean canBeam) Whether or not this instance of the algorithm can/should allow the user to create individual beams. True = ok to show beams.- Parameters:
canBeam
- True = ok to show beams.
-
isCanBeamogram
public boolean isCanBeamogram()Whether or not this instance of the algorithm can/should allow the user to create a beamogram. True = ok to show beamogram- Returns:
- True = ok to show beamogram
-
setCanBeamogram
public void setCanBeamogram(boolean canBeamogram) Whether or not this instance of the algorithm can/should allow the user to create a beamogram. True = ok to show beamogram- Parameters:
canBeamogram
- True = ok to show beamogram
-
getParameterSet
Description copied from interface:ManagedParameters
Get a set of data that describes all of the parameters in a class- Specified by:
getParameterSet
in interfaceManagedParameters
- Returns:
- description of the parameters in a class.
-