Package angleVetoes
Class AngleVetoes
java.lang.Object
angleVetoes.AngleVetoes
- All Implemented Interfaces:
PamSettings
,SettingsNameProvider
Class to support functions to handle vetoes on angles to clicks
This is all much more complicated than in RainbowClick since there may be multiple channel groups and there may be multiple vetoes looking at specific angles. For now though, it just handles min and max angles to veto, but you can have multiple vetoes.
- Author:
- Douglas Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAngleData
(double angle) Add data to angle stats histogram for displayvoid
addPassData
(boolean pass) Add data to pas / fail stats for displayAccess to the veto parametersgetDisplayMenuItem
(Frame frame) Get a menu item for inclusion in menus of detectors using the veto (i.e.getSettingsMenuItem
(Frame frame) Get a menu item for inclusion in menus of detectors using the veto (i.e.long
boolean
passAllVetoes
(double angle, boolean collectStats) Test a particular angle to see if it passes all veto tests.boolean
passVeto
(int vetoIndex, double angle) Test to see if a given angle passes a particular vetoboolean
Test to see if a given angle passes a particular vetoboolean
restoreSettings
(PamControlledUnitSettings pamControlledUnitSettings) void
setAngleVetoParameters
(AngleVetoParameters angleVetoParameters) set angle veto parameters
-
Constructor Details
-
AngleVetoes
-
-
Method Details
-
getSettingsReference
- Specified by:
getSettingsReference
in interfacePamSettings
- Returns:
- The serialisable object that will be stored
-
getSettingsVersion
public long getSettingsVersion()- Specified by:
getSettingsVersion
in interfacePamSettings
- Returns:
- An integer version number for the settings
-
getUnitName
- Specified by:
getUnitName
in interfaceSettingsNameProvider
- Returns:
- A Name specific to this instance of the particular class, e.g. Sperm whale detector, Beaked whale detector, etc.
-
getUnitType
- Specified by:
getUnitType
in interfacePamSettings
- Returns:
- A Name specific to the type, e.g. Click detector
-
restoreSettings
- Specified by:
restoreSettings
in interfacePamSettings
- Returns:
- true if successful The object performs final checks (if needed) and then casts the settings data pamcontrolledunitSettings.settings into the correct type and uses as required
-
getSettingsMenuItem
Get a menu item for inclusion in menus of detectors using the veto (i.e. add the output of this function to the detection menu for the detector).- Parameters:
frame
- Frame holding the menu- Returns:
- a menu item.
-
getDisplayMenuItem
Get a menu item for inclusion in menus of detectors using the veto (i.e. add the output of this function to the display menu for the detector).- Parameters:
frame
- Frame holding the menu- Returns:
- a menu item.
-
getAngleVetoParameters
Access to the veto parameters- Returns:
- AngleVetoParameters
-
setAngleVetoParameters
set angle veto parameters- Parameters:
angleVetoParameters
-
-
passVeto
public boolean passVeto(int vetoIndex, double angle) Test to see if a given angle passes a particular veto- Parameters:
vetoIndex
- index of vetoangle
- angle in degrees- Returns:
- tru if NOT vetoed, false if vetoed.
-
passVeto
Test to see if a given angle passes a particular veto- Parameters:
angleVeto
- reference to vetoangle
- angle in degrees- Returns:
- tru if NOT vetoed, false if vetoed.
-
passAllVetoes
public boolean passAllVetoes(double angle, boolean collectStats) Test a particular angle to see if it passes all veto tests.Optionally add data about the angle and whether or not it passed the tests to the display data histograms.
- Parameters:
angle
- angle to test in degreescollectStats
- set to true if you want to collect stats for display purposes.- Returns:
- true if passes all tests. False if it ails one or more (true if there are no vetoes)
-
addAngleData
public void addAngleData(double angle) Add data to angle stats histogram for display- Parameters:
angle
- angle in degrees
-
addPassData
public void addPassData(boolean pass) Add data to pas / fail stats for display- Parameters:
pass
- true if there was a pass, false for a fail.
-