mirror of
https://github.com/PAMGuard/PAMGuard.git
synced 2024-11-25 08:32:32 +00:00
Merge branch 'main' of https://github.com/PAMGuard/PAMGuard.git into main
This commit is contained in:
commit
76e8467201
@ -6,7 +6,7 @@
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Java 17">
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="module" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -39,3 +39,4 @@ settings.xml
|
||||
.classpath
|
||||
.classpath
|
||||
.classpath
|
||||
.classpath
|
||||
|
@ -1,4 +1,4 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Fri Nov 11 13:13:18 GMT 2022
|
||||
#Mon Nov 14 09:57:39 GMT 2022
|
||||
x3-2.2.0.jar>=
|
||||
x3-2.2.0.pom>=
|
||||
|
7
repo/pamguard/org/x3/2.2.0/m2e-lastUpdated.properties
Normal file
7
repo/pamguard/org/x3/2.2.0/m2e-lastUpdated.properties
Normal file
@ -0,0 +1,7 @@
|
||||
#Fri Nov 11 13:38:50 GMT 2022
|
||||
central|https\://repo1.maven.org/maven2|sources=1668173930657
|
||||
repo|file\:///Users/au671271/git/PAMGuard/repo|sources=1668173930657
|
||||
talan|https\://nexus.talanlabs.com/content/repositories/releases/|sources=1668173930657
|
||||
bintray-macster110-jtorch4pam|macster110|https\://dl.bintray.com/macster110/jtorch4pam|sources=1668173930657
|
||||
bedatadriven|https\://nexus.bedatadriven.com/content/groups/public/|sources=1668173930657
|
||||
unidata-all|https\://artifacts.unidata.ucar.edu/repository/unidata-all/|sources=1668173930657
|
14
repo/pamguard/org/x3/2.2.0/x3-2.2.0-sources.jar.lastUpdated
Normal file
14
repo/pamguard/org/x3/2.2.0/x3-2.2.0-sources.jar.lastUpdated
Normal file
@ -0,0 +1,14 @@
|
||||
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
|
||||
#Fri Nov 11 13:38:50 GMT 2022
|
||||
@default-talan-https\://nexus.talanlabs.com/content/repositories/releases/.lastUpdated=1668173930381
|
||||
https\://dl.bintray.com/macster110/jtorch4pam/.error=Could not transfer artifact pamguard.org\:x3\:jar\:sources\:2.2.0 from/to bintray-macster110-jtorch4pam (https\://dl.bintray.com/macster110/jtorch4pam)\: Remote host terminated the handshake
|
||||
https\://repo1.maven.org/maven2/.error=
|
||||
file\:///Users/au671271/git/PAMGuard/repo/.error=
|
||||
https\://nexus.bedatadriven.com/content/groups/public/.error=
|
||||
https\://artifacts.unidata.ucar.edu/repository/unidata-all/.error=
|
||||
https\://artifacts.unidata.ucar.edu/repository/unidata-all/.lastUpdated=1668173930064
|
||||
https\://repo1.maven.org/maven2/.lastUpdated=1668173930657
|
||||
https\://nexus.talanlabs.com/content/repositories/releases/.error=Could not transfer artifact pamguard.org\:x3\:jar\:sources\:2.2.0 from/to talan (https\://nexus.talanlabs.com/content/repositories/releases/)\: Access denied to https\://nexus.talanlabs.com/content/repositories/releases/pamguard/org/x3/2.2.0/x3-2.2.0-sources.jar. Error code 401, Unauthorized
|
||||
file\:///Users/au671271/git/PAMGuard/repo/.lastUpdated=1668173929099
|
||||
4d1f727a0c17e3b21ef2f6654eed0b3113a4db97@default-bintray-macster110-jtorch4pam-https\://dl.bintray.com/macster110/jtorch4pam/.lastUpdated=1668173929096
|
||||
https\://nexus.bedatadriven.com/content/groups/public/.lastUpdated=1668173930217
|
@ -400,7 +400,7 @@ public class PamObservable {//extends PanelOverlayDraw {
|
||||
}
|
||||
}
|
||||
|
||||
private Timer t = new Timer(1000, new ActionListener() {
|
||||
private Timer t = new Timer(4321, new ActionListener() {
|
||||
public void actionPerformed(ActionEvent evt) {
|
||||
long now = System.currentTimeMillis();
|
||||
if (cpuUsage == null) return;
|
||||
@ -413,6 +413,16 @@ public class PamObservable {//extends PanelOverlayDraw {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Had some issues with the Timer holding a reference to the underlying PamDataBlock
|
||||
* (RoccaContourDataBlock, in this case) and not releasing it for garbage collection.
|
||||
* Added in this method to force the timer to stop and release it's hold.
|
||||
*/
|
||||
public void stopTimer() {
|
||||
t.stop();
|
||||
}
|
||||
|
||||
public double getCPUPercent(int objectIndex) {
|
||||
if (objectIndex < 0 || objectIndex >= cpuPercent.length) return -1;
|
||||
return cpuPercent[objectIndex];
|
||||
|
@ -18,6 +18,19 @@ SoundTrap recorders from
|
||||
<p>Inflating SUD files to WAV files generally required between 3 and 5 times as much disk space and could also take
|
||||
a fair amount of time, so not inflating will save both!</p>
|
||||
|
||||
<h3>SUD Index Files</h3>
|
||||
<p>To efficiently navigate SUD files, PAMGuard makes a map of each file and stores it in a new file in the same
|
||||
folder as the original SUD file. The index files have the same name as the original file, but end with .sudx.
|
||||
The index files are about 2.5% of the size of the original SUD files. When processing SUD files it is therefore
|
||||
important that a) the drive containing the SUD files is less than 95% full and b) that the system running PAMGuard has
|
||||
write access to the folder containing the SUD files. </p>
|
||||
|
||||
<h3>SUD File Times</h3>
|
||||
<p>The name of each SUD file contains the device serial number and a timestamp (data and time) in the form YYMMDDhhmmss.
|
||||
Note that these time stamps are in local time. When processing the file, PAMGuard will extract a UTC timestamp from within
|
||||
each SUD file and apply the UTC time to the data. you may therefore notice that the times of binary files and database
|
||||
entries differ from the times in the file names. </p>
|
||||
|
||||
<h3>Mixing SUD and WAV files</h3>
|
||||
<p>If a SUD file and a WAV file with the same name are in the same folder, then PAMGuard will ignore the SUD file
|
||||
and process the WAV file. Note that in this case, PAMGuard will be unable to extract any metadata from the SUD file
|
||||
|
@ -23,17 +23,14 @@ package pamguard;
|
||||
import javax.swing.SwingUtilities;
|
||||
import javax.swing.UIManager;
|
||||
|
||||
import Acquisition.AcquisitionControl;
|
||||
import Acquisition.FolderInputSystem;
|
||||
import PamController.PamController;
|
||||
import PamController.PamGUIManager;
|
||||
import PamController.PamSettingManager;
|
||||
import PamController.PamguardVersionInfo;
|
||||
import PamController.pamBuoyGlobals;
|
||||
import PamController.command.TerminalController;
|
||||
import PamModel.SMRUEnable;
|
||||
import PamUtils.FileFunctions;
|
||||
import PamUtils.PamCalendar;
|
||||
import PamUtils.PamExceptionHandler;
|
||||
import PamUtils.PlatformInfo;
|
||||
import PamUtils.Splash;
|
||||
@ -45,6 +42,7 @@ import PamguardMVC.debug.Debug;
|
||||
import binaryFileStorage.BinaryStore;
|
||||
import dataPlotsFX.JamieDev;
|
||||
import generalDatabase.DBControl;
|
||||
import rocca.RoccaDev;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@ -190,6 +188,10 @@ public class Pamguard {
|
||||
JamieDev.setEnabled(true);
|
||||
System.out.println("Enabling Jamie Macaulay modifications.");
|
||||
}
|
||||
else if (anArg.equalsIgnoreCase("-rocca")) {
|
||||
RoccaDev.setEnabled(true);
|
||||
System.out.println("Enabling Rocca development mode");
|
||||
}
|
||||
else if (anArg.equalsIgnoreCase(Debug.flag)) {
|
||||
Debug.setPrintDebug(true);
|
||||
Debug.out.println("Enabling debug terminal output.");
|
||||
|
@ -408,6 +408,10 @@ public class RoccaClassifier {
|
||||
|
||||
// load the whistle classifier
|
||||
if (roccaControl.roccaParameters.isClassifyWhistles()) {
|
||||
if (roccaControl.roccaParameters.roccaClassifierModelFilename==null) {
|
||||
roccaControl.roccaParameters.setClassifyWhistles(false);
|
||||
}
|
||||
else {
|
||||
String fname = roccaControl.roccaParameters.roccaClassifierModelFilename.getAbsolutePath();
|
||||
File f = new File(fname);
|
||||
if (f.exists() == false) {
|
||||
@ -450,9 +454,14 @@ public class RoccaClassifier {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// serialVersionUID=24 2016/08/10 added to load click classifier
|
||||
if (roccaControl.roccaParameters.isClassifyClicks()) {
|
||||
if (roccaControl.roccaParameters.roccaClickClassifierModelFilename==null) {
|
||||
roccaControl.roccaParameters.setClassifyClicks(false);
|
||||
}
|
||||
else {
|
||||
String fname = roccaControl.roccaParameters.roccaClickClassifierModelFilename.getAbsolutePath();
|
||||
File f = new File(fname);
|
||||
if (f.exists() == false) {
|
||||
@ -495,6 +504,7 @@ public class RoccaClassifier {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if we didn't load either classifier, don't bother loading trying to load an encounter
|
||||
// classifier because it relies on the species. Just reset the side panel and return
|
||||
@ -505,6 +515,10 @@ public class RoccaClassifier {
|
||||
|
||||
// serialVersionUID=24 2016/08/10 added to load event classifier
|
||||
if (roccaControl.roccaParameters.isClassifyEvents()) {
|
||||
if (roccaControl.roccaParameters.roccaEventClassifierModelFilename==null) {
|
||||
roccaControl.roccaParameters.setClassifyEvents(false);
|
||||
}
|
||||
else {
|
||||
String fname = roccaControl.roccaParameters.roccaEventClassifierModelFilename.getAbsolutePath();
|
||||
File f = new File(fname);
|
||||
if (f.exists() == false) {
|
||||
@ -543,6 +557,7 @@ public class RoccaClassifier {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resetSidePanel();
|
||||
return true;
|
||||
|
27
src/rocca/RoccaDev.java
Normal file
27
src/rocca/RoccaDev.java
Normal file
@ -0,0 +1,27 @@
|
||||
package rocca;
|
||||
|
||||
/**
|
||||
* Global flag set at runtime for Rocca development flags.
|
||||
* @author mo55
|
||||
*
|
||||
*/
|
||||
public class RoccaDev {
|
||||
|
||||
|
||||
private static boolean enabled = false;
|
||||
|
||||
/**
|
||||
* @return the enabled
|
||||
*/
|
||||
public static boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param enabled the enabled to set
|
||||
*/
|
||||
public static void setEnabled(boolean enabled) {
|
||||
RoccaDev.enabled = enabled;
|
||||
}
|
||||
|
||||
}
|
@ -26,7 +26,6 @@ import java.awt.Frame;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Point;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
import java.util.Vector;
|
||||
@ -48,8 +47,6 @@ import PamUtils.PamFileChooser;
|
||||
import PamView.dialog.PamDialog;
|
||||
import PamView.dialog.SourcePanel;
|
||||
import PamguardMVC.PamDataBlock;
|
||||
import PamguardMVC.PamDataUnit;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Insets;
|
||||
import java.awt.event.ActionEvent;
|
||||
@ -60,20 +57,14 @@ import java.io.BufferedInputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.swing.Box;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.ButtonGroup;
|
||||
import javax.swing.DefaultComboBoxModel;
|
||||
import javax.swing.GroupLayout;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JRadioButton;
|
||||
import javax.swing.JFileChooser;
|
||||
import javax.swing.JScrollPane;
|
||||
@ -87,7 +78,6 @@ import javax.swing.border.EtchedBorder;
|
||||
import clickDetector.ClickControl;
|
||||
import clickDetector.ClickDetection;
|
||||
import clickDetector.NoiseDataBlock;
|
||||
import weka.classifiers.AbstractClassifier;
|
||||
import weka.core.Attribute;
|
||||
import weka.core.Instances;
|
||||
import weka.core.SerializationHelper;
|
||||
@ -523,7 +513,13 @@ public class RoccaParametersDialog extends PamDialog implements ActionListener,
|
||||
reclassifyButton.addActionListener(this);
|
||||
reclassifyButton.setToolTipText("Load the whistle data from the contour stats output file, and run it through the current Classifier");
|
||||
reclassifyButton.setVisible(true);
|
||||
extraButtonsSubPanel.setVisible(true); // ******** THIS LINES CONTROLS THE VISIBILITY ********
|
||||
|
||||
// ******** THIS LINES CONTROLS THE VISIBILITY ********
|
||||
if (RoccaDev.isEnabled()) {
|
||||
extraButtonsSubPanel.setVisible(true);
|
||||
} else {
|
||||
extraButtonsSubPanel.setVisible(false);
|
||||
}
|
||||
GroupLayout extraPanelLayout = new GroupLayout(extraButtonsSubPanel);
|
||||
extraButtonsSubPanel.setLayout(extraPanelLayout);
|
||||
extraPanelLayout.setAutoCreateGaps(true);
|
||||
|
@ -388,7 +388,9 @@ public class RoccaProcess extends PamProcess {
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) > 1.5 ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.FREQABSSLOPEMEAN) < 2000. ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.FREQABSSLOPEMEAN) > 28000. )) {
|
||||
rcdb.setNaturalLifetimeMillis(0);
|
||||
// rcdb.setNaturalLifetimeMillis(0);
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
return;
|
||||
}
|
||||
if (roccaControl.roccaParameters.roccaClassifierModelFilename.getName().equals("HIWhist.model") &&
|
||||
@ -402,7 +404,9 @@ public class RoccaProcess extends PamProcess {
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.FREQABSSLOPEMEAN) > 60000. ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.FREQRANGE) < 800. ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.FREQRANGE) > 14000. )) {
|
||||
rcdb.setNaturalLifetimeMillis(0);
|
||||
// rcdb.setNaturalLifetimeMillis(0);
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
return;
|
||||
}
|
||||
if (roccaControl.roccaParameters.roccaClassifierModelFilename.getName().equals("NWAtlWhist.model") &&
|
||||
@ -412,7 +416,9 @@ public class RoccaProcess extends PamProcess {
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) > 2.5 ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.FREQABSSLOPEMEAN) < 9100. ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.FREQABSSLOPEMEAN) > 82000. )) {
|
||||
rcdb.setNaturalLifetimeMillis(0);
|
||||
// rcdb.setNaturalLifetimeMillis(0);
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -431,7 +437,9 @@ public class RoccaProcess extends PamProcess {
|
||||
saveContourPoints(rcdb, rcdb.getChannelMap(), ++numDetections, sNum);
|
||||
saveContourStats(rcdb, rcdb.getChannelMap(), numDetections, sNum);
|
||||
saveContour(rcdb, rcdb.getChannelMap(), numDetections, sNum);
|
||||
rcdb.setNaturalLifetimeMillis(0);
|
||||
// rcdb.setNaturalLifetimeMillis(0);
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
|
||||
/* if this is a click detection (signal, not noise) */
|
||||
} else if (o==manClickSourceData || o==autoClickSourceData) {
|
||||
@ -499,18 +507,24 @@ public class RoccaProcess extends PamProcess {
|
||||
(rcdb.getContour().get(RoccaContourStats.ParamIndx.SNR) > 35. ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) < 0.005 ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) > 0.6 )) {
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
return;
|
||||
}
|
||||
if (roccaControl.roccaParameters.roccaClassifierModelFilename.getName().equals("HIClick.model") &&
|
||||
(rcdb.getContour().get(RoccaContourStats.ParamIndx.SNR) > 40. ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) < 0.01 ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) > 0.6 )) {
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
return;
|
||||
}
|
||||
if (roccaControl.roccaParameters.roccaClassifierModelFilename.getName().equals("NWAtlClick.model") &&
|
||||
(rcdb.getContour().get(RoccaContourStats.ParamIndx.SNR) > 35. ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) < 0.005 ||
|
||||
rcdb.getContour().get(RoccaContourStats.ParamIndx.DURATION) > 0.6 )) {
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -529,7 +543,9 @@ public class RoccaProcess extends PamProcess {
|
||||
// add call to update side panel. Set the isClick flag to True
|
||||
updateSidePanel(rcdb, true);
|
||||
saveContourStats(rcdb, rcdb.getChannelMap(), numDetections, sNum);
|
||||
rcdb.setNaturalLifetimeMillis(0);
|
||||
// rcdb.setNaturalLifetimeMillis(0);
|
||||
rcdb.stopTimer();
|
||||
rcdb = null;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user