MacOS version of PAMGuard and minor UI updates (#170)

* Update exporter_help.md

Updated help for exporter

* Update .gitignore

* Bug fixes for deep learning classifier.

Updated the symbol options to make sure opacity is passed through the symbol chooser.

* Updates to the data map FX display

* Updates to DelphinID and Data ModelFX

Used a new writable image for much faster drawing in FX

* bb

* Delete C:\Users\Jamie Macaulay\MATLAB Drive\MATLAB\PAMGUARD\deep_learning\delphinID\whistle_image_example_java.mat

* Updates to DelphinID

* Updates to ReadMe and JavaFX GUI

* Update readme.md

Updates to ReadMe

* Updates to CPOD module and also delphinID classifier

* Fix colour scaling in FX data map

* Create cpod_help.md

* Update cpod_help.md

* Update cpod_help.md

* Updates to CPOD module

Added ability to export CPOD clicks
Added some extra features to data selector
Swing GUI for data selector (in progress)

* Updates to data map FX GUI

* Updates to CPOD module

* Added help files resources for CPOD

* Add CPOD resources for help

* Add CPOD resources for help

* Add CPOD resources for help

* Add CPOD resources for help

* Add CPOD resources for help

* Update cpod_help.md

* Update cpod_help.md

* Bug fixes for deep learning classifier.

Updated the symbol options to make sure opacity is passed through the symbol chooser.

* Updates to the data map FX display

* Updates to DelphinID and Data ModelFX

Used a new writable image for much faster drawing in FX

* Updates to ReadMe and JavaFX GUI

* bb

* Delete C:\Users\Jamie Macaulay\MATLAB Drive\MATLAB\PAMGUARD\deep_learning\delphinID\whistle_image_example_java.mat

* Updates to DelphinID

* Update readme.md

Updates to ReadMe

* Fix colour scaling in FX data map

* Updates to CPOD module and also delphinID classifier

* Updates to CPOD module

Added ability to export CPOD clicks
Added some extra features to data selector
Swing GUI for data selector (in progress)

* Create cpod_help.md

* Update cpod_help.md

* Update cpod_help.md

* Updates to data map FX GUI

* Updates to CPOD module

* Added help files resources for CPOD

* Add CPOD resources for help

* Add CPOD resources for help

* Add CPOD resources for help

* Add CPOD resources for help

* Add CPOD resources for help

* Update cpod_help.md

* Update cpod_help.md

* Bug fix to BT display

The BT display was not selecting clicks properly.

* Import bug fix

* Updates to data map FX GUI

* Updates to datamap FX

* Got date axis working properly.

* Added some arrows to the scroll bar for data map FX pane.

* Working on getting datagrams in FX saving

* Updates to DataMapFX and exporting annotations

* Update MLAnnotationsManager.java

* Working on adding annotations to exporter

* Bug fix for processing files and annotations for exporter

Rebase with main
Bug fix for processing files - stops only the last file processing when "Start normally" selected on data processing
R and MATLAB export of data annotation added.

* Add a ttoltip to the exporter

* Minor text change

* X3 fix and building for MACOS

* Update PAMGuard to build installer for MacOS

* Some fixes to Sound Acquisition dialog layout.

* Squashed commit of the following:

commit 1acddb4cc6
Author: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com>
Date:   Tue Oct 8 15:03:32 2024 +0100

    MErge from DG (#168)

    * Localization output

    * update localiser output

    * Start effort management system

    * Start of Effort plotting

    Strat of effort plotting on map. Framework for using Effort data in other areas (such as Tethys output).

    * Logger forms update

    Effort and Symbol selectors working with Logger forms. Also functions to add, edit and delete form rows in Viewer mode.

    * Update LoggerFormGraphics.java

    add in correct symbol managemet to forms graphics.

    * Effort lines on map

    Sort of working OK in real time mode.

    * Working effort system

    Currently only for map, but seems to work OK

    * Update Tethys to latest nilus schema

    * Raven importer

    Start of a system for a raven importer. Not quite working yet.

    * Raven import

    Basic functionality working. Not nice to use though.

    * Tethys Localization work

    Abstracting out writing of localization objects and document header information so that individual localisers can give fine scale control of this stuff.

    * updated Nilus

    A few updates around track and target motion measures.

    * FX Plot for raven data

    Also sorted out symbols a bit and improved symbol selector in Generic plots.

    * Update spectrogram mark bearing display

    Remove the 90-angle bit

    * Raven extra columns

    Logging of data from additional Raven table columns

    * Start effort management system

    * Start of Effort plotting

    Strat of effort plotting on map. Framework for using Effort data in other areas (such as Tethys output).

    * Logger forms update

    Effort and Symbol selectors working with Logger forms. Also functions to add, edit and delete form rows in Viewer mode.

    * Effort lines on map

    Sort of working OK in real time mode.

    * Update Tethys to latest nilus schema

    * Tethys Localization work

    Abstracting out writing of localization objects and document header information so that individual localisers can give fine scale control of this stuff.

    * Ishmael Tethys output

    Added necessaries for Tethys output from Ishmael detectors. Also found a pretty major bug in the spectrogram correlation detector, where for each block of data it was only testing the first sample of each block, not all samples, for being over threshold.

    * Speed and algorithm improvements to Ish matched filter

    Seems to be errors in correlation, didn't support multiple channels and
    also used very old and slow FFT, so working to fix all three issues.

    * Updated matched filter

    Updated and working Matched filter, though still some thinking to do about how the scaling of this works, since currently scaled by the template, so whole thing is dependent on the input. Need to think of a better way to do this.

    * Update match filt normalisation

    Normalisation now correctly using both the template and the signal for normalisation so that it will be data amplitude independent.

    * invFFT improvements

    Use faster inverse FFT of real data in correlation / delay functions.

    * Improve ifft's in other modules to improve TDOA speeds

    * Sorting mess of spec plugin graphics

    Have got the Ishmael ones scrolling, but when scrolling, there is an offset in the data due to the lag of the correlation functions. Quite hard to fix with available timing data

    * Improve ish spectrogram plugin

    Sorted scaling and scrollling problems.

    * Improve startup checks

    Rethread startup checks so that a progress bar shows when PAMGuard is checking input and output files at start up. Also include single file processing in checks.

    * Apply all spectrogram overlays

    Apply to all function on spectrogram overlays so changes to overlays affect all panels.

commit f2f9870b6f
Author: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com>
Date:   Wed Oct 2 15:13:12 2024 +0100

    V2.02.13c

    Release for installation on teaching lab machines.

commit 7533a7cfbe
Author: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com>
Date:   Tue Oct 1 15:00:51 2024 +0100

    Tethys output of Group3DLocalisations

    Output of Group3D localiser data. Localisations only, no Detections output for this one

commit ef494c0d0e
Author: Jamie Mac <macster110@gmail.com>
Date:   Mon Sep 30 13:10:59 2024 +0100

    Sud bug fix and updates to CPOD module.  (#162)

    * Update exporter_help.md

    Updated help for exporter

    * Update .gitignore

    * Bug fixes for deep learning classifier.

    Updated the symbol options to make sure opacity is passed through the symbol chooser.

    * Updates to the data map FX display

    * Updates to DelphinID and Data ModelFX

    Used a new writable image for much faster drawing in FX

    * bb

    * Delete C:\Users\Jamie Macaulay\MATLAB Drive\MATLAB\PAMGUARD\deep_learning\delphinID\whistle_image_example_java.mat

    * Updates to DelphinID

    * Updates to ReadMe and JavaFX GUI

    * Update readme.md

    Updates to ReadMe

    * Updates to CPOD module and also delphinID classifier

    * Fix colour scaling in FX data map

    * Create cpod_help.md

    * Update cpod_help.md

    * Update cpod_help.md

    * Updates to CPOD module

    Added ability to export CPOD clicks
    Added some extra features to data selector
    Swing GUI for data selector (in progress)

    * Updates to data map FX GUI

    * Updates to CPOD module

    * Added help files resources for CPOD

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Update cpod_help.md

    * Update cpod_help.md

    * Bug fixes for deep learning classifier.

    Updated the symbol options to make sure opacity is passed through the symbol chooser.

    * Updates to the data map FX display

    * Updates to DelphinID and Data ModelFX

    Used a new writable image for much faster drawing in FX

    * Updates to ReadMe and JavaFX GUI

    * bb

    * Delete C:\Users\Jamie Macaulay\MATLAB Drive\MATLAB\PAMGUARD\deep_learning\delphinID\whistle_image_example_java.mat

    * Updates to DelphinID

    * Update readme.md

    Updates to ReadMe

    * Fix colour scaling in FX data map

    * Updates to CPOD module and also delphinID classifier

    * Updates to CPOD module

    Added ability to export CPOD clicks
    Added some extra features to data selector
    Swing GUI for data selector (in progress)

    * Create cpod_help.md

    * Update cpod_help.md

    * Update cpod_help.md

    * Updates to data map FX GUI

    * Updates to CPOD module

    * Added help files resources for CPOD

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Add CPOD resources for help

    * Update cpod_help.md

    * Update cpod_help.md

    * Bug fix to BT display

    The BT display was not selecting clicks properly.

    * Import bug fix

    * Updates to data map FX GUI

    * Updates to datamap FX

    * Got date axis working properly.

    * Added some arrows to the scroll bar for data map FX pane.

    * Working on getting datagrams in FX saving

    * Updates to DataMapFX and exporting annotations

    * Update MLAnnotationsManager.java

    * Working on adding annotations to exporter

    * Bug fix for processing files and annotations for exporter

    Rebase with main
    Bug fix for processing files - stops only the last file processing when "Start normally" selected on data processing
    R and MATLAB export of data annotation added.

    * Add a ttoltip to the exporter

    * Minor text change

* Small UI improvements for Sound Acquisition and MacOS

* Bug fix to exporter

* Update to help points

Updated help points for following modules
Deep learning
CPOD
Matched click classifier
Exporter

---------

Co-authored-by: Douglas Gillespie <50671166+douggillespie@users.noreply.github.com>
This commit is contained in:
Jamie Mac 2024-10-09 12:39:26 +01:00 committed by GitHub
parent 0bab2a01c7
commit 211ca7ab91
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
42 changed files with 606 additions and 135 deletions

View File

@ -4,7 +4,7 @@
<groupId>org.pamguard</groupId>
<artifactId>Pamguard</artifactId>
<name>Pamguard</name>
<version>2.02.13b</version>
<version>2.02.13c</version>
<description>Pamguard using Maven to control dependencies</description>
<url>www.pamguard.org</url>
<organization>
@ -137,6 +137,49 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>de.perdian.maven.plugins</groupId>
<artifactId>macosappbundler-maven-plugin</artifactId>
<version>1.21.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
<configuration>
<plist>
<JVMMainClassName>pamguard.Pamguard</JVMMainClassName>
<CFBundleIconFile>src/Resources/PamguardIcon2.icns</CFBundleIconFile>
<CFBundleDisplayName>PAMGuard</CFBundleDisplayName>
<CFBundleDevelopmentRegion>English</CFBundleDevelopmentRegion>
<CFBundleURLTypes>
<string>msa</string>
</CFBundleURLTypes>
<JVMVersion>21+</JVMVersion>
<JVMArguments>
<string>-v</string>
</JVMArguments>
</plist>
<dmg>
<generate>true</generate>
<additionalResources>
<additionalResource>
<directory>src/target/macos/</directory>
</additionalResource>
</additionalResources>
</dmg>
<jdk>
<include>true</include>
<location>/Library/Java/JavaVirtualMachines/amazon-corretto-21.jdk</location>
</jdk>
<codesign>
<identity>3rd Party Mac Developer Application: PAMGuard</identity>
</codesign>
</configuration>
</plugin>
</plugins>
</build>
<repositories>

60
pom.xml
View File

@ -183,6 +183,56 @@
</executions>
</plugin>
<!-- Plugin which creates a .dmg file for MacOS. -->
<plugin>
<groupId>de.perdian.maven.plugins</groupId>
<artifactId>macosappbundler-maven-plugin</artifactId>
<version>1.21.1</version>
<configuration>
<plist>
<JVMMainClassName>pamguard.Pamguard</JVMMainClassName>
<CFBundleIconFile>src/Resources/PamguardIcon2.icns</CFBundleIconFile>
<CFBundleDisplayName>PAMGuard</CFBundleDisplayName>
<CFBundleDevelopmentRegion>English</CFBundleDevelopmentRegion>
<CFBundleURLTypes>
<string>msa</string>
</CFBundleURLTypes>
<JVMVersion>21+</JVMVersion>
<!--<JVMOptions>
<string>-Dfoo=bar</string>
<string>-Dx=y</string>
</JVMOptions>-->
<JVMArguments>
<string>-v</string>
</JVMArguments>
</plist>
<dmg>
<generate>true</generate>
<additionalResources>
<additionalResource>
<directory>src/target/macos/</directory>
</additionalResource>
</additionalResources>
</dmg>
<jdk>
<include>true</include>
<location>/Library/Java/JavaVirtualMachines/amazon-corretto-21.jdk</location>
</jdk>
<codesign>
<identity>3rd Party Mac Developer Application: PAMGuard</identity>
</codesign>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>bundle</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
@ -372,6 +422,13 @@
<artifactId>javafx-web</artifactId>
<version>${javafx.version}</version>
</dependency>
<!-- Swing theme for MacOS -->
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>3.5.1</version>
</dependency>
<!-- Decorates JavaFX components with error icons if inputs are incorrect-->
<dependency>
@ -907,7 +964,7 @@
<dependency>
<groupId>org.pamguard</groupId>
<artifactId>x3</artifactId>
<version>2.2.7</version>
<version>2.2.8</version>
</dependency>
@ -995,5 +1052,6 @@
</dependency>
</dependencies>
</project>

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.pamguard</groupId>
<artifactId>X3</artifactId>
<version>2.2.8</version>
<description>Tools for opening X3 files</description>
<developers>
<developer>
<id>macster110</id>
<name>Jamie Macaulay</name>
<roles>
<role>Developer</role>
</roles>
</developer>
</developers>
<licenses>
<license>
<name>Apache-2.0</name>
<url>https://opensource.org/licenses/apache-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/PAMGuard/x3.git</url>
</scm>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration />
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<failOnError>false</failOnError>
</configuration>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>

View File

@ -1,4 +1,6 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Wed Nov 15 12:43:42 GMT 2023
x3-2.2.6.jar>=
x3-2.2.6.pom>=
#Tue Oct 08 09:15:12 BST 2024
X3-2.2.8-sources.jar>=
X3-2.2.8.pom>=
X3-2.2.8.jar>=
X3-2.2.8-javadoc.jar>=

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<<<<<<<< HEAD:repo/tethys/org/javaclient/3.0/javaclient-3.0.pom
<groupId>tethys.org</groupId>
<artifactId>javaclient</artifactId>
<version>3.0</version>
========
<groupId>pamguard.org</groupId>
<artifactId>x3</artifactId>
<version>2.2.6</version>
>>>>>>>> upstream/main:repo/pamguard/org/x3/2.2.6/x3-2.2.6.pom
<description>POM was created from install:install-file</description>
</project>

View File

@ -1,4 +0,0 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Fri Jan 12 10:06:13 GMT 2024
x3-2.2.7.jar>=
x3-2.2.7.pom>=

View File

@ -1,11 +0,0 @@
#Fri Jan 12 10:09:16 GMT 2024
bedatadriven|https\://nexus.bedatadriven.com/content/groups/public/|javadoc=1705054156349
repo|file\://C\:\\Users\\dg50\\source\\repos\\PAMGuardPAMGuard/repo|sources=1705054009341
repo|file\://C\:\\Users\\dg50\\source\\repos\\PAMGuardPAMGuard/repo|javadoc=1705054156349
talan|https\://nexus.talanlabs.com/content/repositories/releases/|javadoc=1705054156349
central|https\://repo1.maven.org/maven2|sources=1705054009341
unidata-all|https\://artifacts.unidata.ucar.edu/repository/unidata-all/|javadoc=1705054156349
talan|https\://nexus.talanlabs.com/content/repositories/releases/|sources=1705054009341
bedatadriven|https\://nexus.bedatadriven.com/content/groups/public/|sources=1705054009341
unidata-all|https\://artifacts.unidata.ucar.edu/repository/unidata-all/|sources=1705054009341
central|https\://repo1.maven.org/maven2|javadoc=1705054156349

View File

@ -1,12 +0,0 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Fri Jan 12 10:09:16 GMT 2024
@default-talan-https\://nexus.talanlabs.com/content/repositories/releases/.lastUpdated=1705054156080
file\://C\:\\Users\\dg50\\source\\repos\\PAMGuardPAMGuard/repo/.lastUpdated=1705054154613
https\://repo1.maven.org/maven2/.error=
file\://C\:\\Users\\dg50\\source\\repos\\PAMGuardPAMGuard/repo/.error=
https\://artifacts.unidata.ucar.edu/repository/unidata-all/.error=
https\://nexus.bedatadriven.com/content/groups/public/.error=
https\://nexus.bedatadriven.com/content/groups/public/.lastUpdated=1705054156060
https\://artifacts.unidata.ucar.edu/repository/unidata-all/.lastUpdated=1705054155868
https\://repo1.maven.org/maven2/.lastUpdated=1705054156344
https\://nexus.talanlabs.com/content/repositories/releases/.error=Could not transfer artifact pamguard.org\:x3\:jar\:javadoc\:2.2.7 from/to talan (https\://nexus.talanlabs.com/content/repositories/releases/)\: nexus.talanlabs.com

View File

@ -1,12 +0,0 @@
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Fri Jan 12 10:06:49 GMT 2024
@default-talan-https\://nexus.talanlabs.com/content/repositories/releases/.lastUpdated=1705054009062
file\://C\:\\Users\\dg50\\source\\repos\\PAMGuardPAMGuard/repo/.lastUpdated=1705054007956
https\://repo1.maven.org/maven2/.error=
file\://C\:\\Users\\dg50\\source\\repos\\PAMGuardPAMGuard/repo/.error=
https\://artifacts.unidata.ucar.edu/repository/unidata-all/.error=
https\://nexus.bedatadriven.com/content/groups/public/.error=
https\://nexus.bedatadriven.com/content/groups/public/.lastUpdated=1705054008945
https\://artifacts.unidata.ucar.edu/repository/unidata-all/.lastUpdated=1705054008751
https\://repo1.maven.org/maven2/.lastUpdated=1705054009308
https\://nexus.talanlabs.com/content/repositories/releases/.error=Could not transfer artifact pamguard.org\:x3\:jar\:sources\:2.2.7 from/to talan (https\://nexus.talanlabs.com/content/repositories/releases/)\: nexus.talanlabs.com

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<<<<<<<< HEAD:repo/tethys/org/nilus/3.0/nilus-3.0.pom
<groupId>tethys.org</groupId>
<artifactId>nilus</artifactId>
<version>3.0</version>
========
<groupId>pamguard.org</groupId>
<artifactId>x3</artifactId>
<version>2.2.7</version>
>>>>>>>> upstream/main:repo/pamguard/org/x3/2.2.7/x3-2.2.7.pom
<description>POM was created from install:install-file</description>
</project>

View File

@ -242,12 +242,20 @@ public class FileInputSystem extends DaqSystem implements ActionListener, PamSe
constraints.gridy++;
constraints.gridx = 0;
constraints.gridwidth = 1;
addComponent(p, new JLabel("Skip initial"), constraints);
PamPanel skipPanel = new PamPanel(new GridBagLayout());
addComponent(skipPanel, new JLabel("Skip initial "), constraints);
constraints.gridx++;
addComponent(p, skipSecondsField = new JTextField(4), constraints);
addComponent(skipPanel, skipSecondsField = new JTextField(4), constraints);
constraints.gridx++;
addComponent(p, new JLabel("seconds"), constraints);
addComponent(skipPanel, new JLabel("seconds"), constraints);
constraints.anchor = GridBagConstraints.EAST;
constraints.gridwidth = 3;
constraints.gridx = 0;
addComponent(p, skipPanel, constraints);
// }
// addComponent(p, new JLabel("File date :"), constraints);

View File

@ -252,13 +252,21 @@ public class FolderInputSystem extends FileInputSystem implements PamSettings, D
constraints.gridy++;
constraints.gridx = 0;
constraints.gridwidth = 1;
addComponent(p, new JLabel("Skip initial :"), constraints);
constraints.gridx++;
addComponent(p, skipSecondsField = new JTextField(4), constraints);
constraints.gridx++;
addComponent(p, new JLabel("seconds"), constraints);
// }
//panel which allows the users to skip the first section of a file.
PamPanel skipPanel = new PamPanel(new GridBagLayout());
constraints.insets = new Insets(0,0,0,5);
addComponent(skipPanel, new JLabel("Skip initial "), constraints);
constraints.gridx++;
addComponent(skipPanel, skipSecondsField = new JTextField(4), constraints);
constraints.gridx++;
addComponent(skipPanel, new JLabel("seconds"), constraints);
constraints.anchor = GridBagConstraints.WEST;
constraints.gridwidth = 3;
constraints.gridx = 0;
addComponent(p, skipPanel, constraints);
//panel to show bespoke settings for certain audio loaders.
constraints.anchor = GridBagConstraints.WEST;
@ -570,6 +578,9 @@ public class FolderInputSystem extends FileInputSystem implements PamSettings, D
acquisitionDialog.setSampleRate(audioFormat.getSampleRate());
acquisitionDialog.setChannels(fudgeNumChannels(audioFormat.getChannels()));
audioStream.close();
//prevent the dialog from going nuts when components are resized.
acquisitionDialog.validate();
acquisitionDialog.pack();
}
catch (Exception Ex) {
// Ex.printStackTrace();

View File

@ -5,6 +5,7 @@ import java.awt.Color;
import java.awt.Component;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -22,6 +23,7 @@ import org.kordamp.ikonli.swing.FontIcon;
import PamUtils.PamCalendar;
import PamView.component.PamSettingsIconButton;
import PamView.dialog.PamGridBagContraints;
import PamView.panel.PamPanel;
/**
* Simpel dialog component which can interact with a file date.
@ -41,7 +43,7 @@ public class FileDateDialogStrip {
private JButton settingsButton;
// private ImageIcon settingsIcon = new ImageIcon(ClassLoader.getSystemResource("Resources/SettingsButtonSmall2.png"));
public static FontIcon settingsIcon = FontIcon.of(PamSettingsIconButton.SETTINGS_IKON, PamSettingsIconButton.NORMAL_SIZE, Color.DARK_GRAY);
public static FontIcon settingsIcon = FontIcon.of(PamSettingsIconButton.SETTINGS_IKON, PamSettingsIconButton.NORMAL_SIZE);
private Window parent;
@ -53,18 +55,32 @@ public class FileDateDialogStrip {
this.parent = parent;
settingsButton = new JButton(settingsIcon);
formatLabel = new JLabel(" ");
fileTime = new JTextField(20);
fileTime = new JTextField(20);
mainPanel = new JPanel(new BorderLayout());
JPanel centPanel = new JPanel(new BorderLayout());
centPanel.add(BorderLayout.NORTH, formatLabel);
centPanel.add(BorderLayout.SOUTH, fileTime);
mainPanel.add(BorderLayout.CENTER, centPanel);
mainPanel.add(BorderLayout.EAST, settingsButton);
JPanel westPanel = new JPanel(new BorderLayout());
westPanel.add(BorderLayout.NORTH, new JLabel(" "));
westPanel.add(BorderLayout.CENTER, new JLabel("File date : "));
mainPanel.add(BorderLayout.WEST, westPanel);
GridBagConstraints c = new GridBagConstraints();
PamPanel centPanel = new PamPanel(new GridBagLayout());
c.gridx = 0;
c.insets = new Insets(0,0,0,5);
JLabel fileDateLabel = new JLabel("File date ");
PamPanel.addComponent(centPanel,fileDateLabel, c);
c.gridx ++;
PamPanel.addComponent(centPanel, fileTime, c);
c.gridx++;
PamPanel.addComponent(centPanel, settingsButton, c);
//keep the lable below the text box
c.gridx = 1;
PamPanel.addComponent(centPanel, formatLabel, c);
mainPanel.add(BorderLayout.WEST, centPanel);
// mainPanel = new JPanel(new GridBagLayout());
// GridBagConstraints c = new PamGridBagContraints();

View File

@ -29,6 +29,8 @@ import javax.swing.ImageIcon;
import javax.swing.JInternalFrame;
import javax.swing.border.EmptyBorder;
import PamView.PamIcon;
/**
* @author Doug Gillespie
* <p>
@ -84,11 +86,8 @@ public class PamInternalFrame extends JInternalFrame implements ComponentListene
pamFramePlots.setFrame(this);
if (!System.getProperty("os.name").equals("Linux")) {
setFrameIcon(new ImageIcon(ClassLoader
.getSystemResource("Resources/pamguardIcon.png")));
}
setFrameIcon(PamIcon.getPAMGuardImageIcon(PamIcon.SMALL));
graphLayout = new PamGraphLayout(framePlots);
this.add(BorderLayout.CENTER, graphLayout.getMainComponent());

View File

@ -0,0 +1,167 @@
package PamController;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.Image;
import java.awt.Window;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JToggleButton;
import javax.swing.SwingConstants;
import javax.swing.border.TitledBorder;
import PamView.PamIcon;
import PamView.dialog.PamDialog;
import PamView.panel.PamPanel;
/**
* A simple dialog which allows the user to select which mode to run PAMGuard in.
*/
public class PamRunModeDialog extends PamDialog {
private static final long serialVersionUID = 1L;
private static PamRunModeDialog singleInstance;
private JPanel mainPanel;
private PamRunModeParams runbModeParams = new PamRunModeParams();
private AbstractButton normalMode;
private AbstractButton viewerMode;
public PamRunModeDialog(Window parentFrame) {
super(parentFrame, "Storage Options", false);
mainPanel = new JPanel();
mainPanel.setBorder(new TitledBorder("Select PAMGuard mode"));
mainPanel.setLayout(new GridBagLayout());
//toggle buttonb
normalMode = new JToggleButton("Normal");
normalMode.setFont(normalMode.getFont().deriveFont(Font.BOLD));
normalMode.addItemListener((a)->{
// event is generated in button
int state = a.getStateChange();
});
normalMode.setToolTipText(
"<html>Run PAMGuard in normal mode. <p>"
+ "Normal mode allows users to use PAMGuard in real time or processing <br>"
+ "raw acoustic data from recorders.</html>");
viewerMode = new JToggleButton("Viewer");
viewerMode.setFont(viewerMode.getFont().deriveFont(Font.BOLD));
viewerMode.addItemListener((a)->{
// event is generated in button
int state = a.getStateChange();
});
viewerMode.setToolTipText(
"<html>Run PAMGuard in viewer mode. <p>"
+"Viewer mode is used to view processed data from normal mode</html>");
try {
Image img = ImageIO.read(getClass().getResource(File.separator+PamIcon.getPAMGuardIconPath(PamIcon.NORMAL)));
normalMode.setIcon(new ImageIcon(img));
normalMode.setHorizontalAlignment(SwingConstants.TRAILING);
viewerMode.setIcon(new ImageIcon(img));
viewerMode.setHorizontalAlignment(SwingConstants.TRAILING);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ButtonGroup buttonGroup = new ButtonGroup();
buttonGroup.add(normalMode);
buttonGroup.add(viewerMode);
GridBagConstraints gridBagConstrints = new GridBagConstraints();
gridBagConstrints.gridy = 0;
gridBagConstrints.gridx = 0;
gridBagConstrints.insets = new Insets(5,5,5,5);
// PamPanel.addComponent(mainPanel, new JLabel("Select PAMGuard mode"), gridBagConstrints);
// gridBagConstrints.gridwidth=2;
//
// gridBagConstrints.gridwidth=1;
gridBagConstrints.gridy ++;
PamPanel.addComponent(mainPanel, normalMode, gridBagConstrints);
gridBagConstrints.gridx ++;
PamPanel.addComponent(mainPanel, viewerMode, gridBagConstrints);
setDialogComponent(mainPanel);
}
/**
* Show the run mode dialog.
* @param parentFrame - the parent frame - usually null.
* @param center - true to show the dialog in the center of the screen.
* @return run mode params.
*/
public static PamRunModeParams showDialog(JFrame parentFrame, boolean center) {
if (singleInstance == null || singleInstance.getOwner() != parentFrame) {
singleInstance = new PamRunModeDialog(parentFrame);
}
if (center) {
final Toolkit toolkit = Toolkit.getDefaultToolkit();
final Dimension screenSize = toolkit.getScreenSize();
final int x = (screenSize.width - singleInstance.getWidth()) / 2;
final int y = (screenSize.height - singleInstance.getHeight()) / 2;
System.out.println("Set dialog location: " + x + " " + y);
singleInstance.setLocation(x, y);
}
singleInstance.setVisible(true);
return singleInstance.runbModeParams;
}
@Override
public boolean getParams() {
if (normalMode.isSelected()) {
runbModeParams.runMode=PamController.RUN_NORMAL;
return true;
}
else if (viewerMode.isSelected()) {
runbModeParams.runMode=PamController.RUN_PAMVIEW;
return true;
}
else {
PamDialog.showWarning(singleInstance, "No PAMGuard mode selected", "You must select which mode to run PAMGuard in");
}
return false;
}
@Override
public void cancelButtonPressed() {
runbModeParams.runMode=-1;
}
@Override
public void restoreDefaultSettings() {
// TODO Auto-generated method stub
}
}

View File

@ -0,0 +1,34 @@
package PamController;
/**
* Parameters for choosing pAMGuard run mode.
*/
public class PamRunModeParams {
/**
* The mode to run.
*/
public int runMode = PamController.RUN_PAMVIEW;
public String getRunString() {
return getRunString(runMode);
}
public static String getRunString(int runbModeParams) {
String runMode =null;
switch (runbModeParams) {
case PamController.RUN_NORMAL:
runMode = "";
break;
case PamController.RUN_PAMVIEW:
runMode ="-v";
break;
}
return runMode;
}
public static String getRunString(PamRunModeParams runbModeParams) {
return getRunString(runbModeParams);
}
}

View File

@ -20,7 +20,7 @@ public class KillCommand extends ExtCommand {
@Override
public String getHint() {
return "kill PAMguard, don't necessarily stop detectors or clean anything up";
return "kill PAMGuard, don't necessarily stop detectors or clean anything up";
}
}

59
src/PamView/PamIcon.java Normal file
View File

@ -0,0 +1,59 @@
package PamView;
import javax.swing.ImageIcon;
/**
* Get the PAMGuard icon.
* <p>
* Handles the PAMGuard icon depending on operating system.
*/
public class PamIcon {
public final static int SMALL = 1;
public final static int NORMAL = 2;
public final static int LARGE = 3;
/**
* Get the path to the default icon for PAMGuard.
* @param sizeFlag - the size flag.
* @return
*/
public static String getPAMGuardIconPath(int sizeFlag) {
//Note: whether the there is a / in front of resource is very important here
//putting a / in front of the Resources will mean the class loader will not work
//the default is windows. Icon automatically resize on Windows.
String path = "Resources/pamguardIcon.png";
if (System.getProperty("os.name").equals("Linux") || System.getProperty("os.name").startsWith("Mac")) {
switch (sizeFlag) {
case SMALL:
path = "Resources/PAMGuardIcon2small.png";
break;
case NORMAL:
path = "Resources/PAMGuardIcon2medium.png";
break;
case LARGE:
path = "Resources/PAMGuardIcon2.png";
break;
}
}
return path;
}
public static ImageIcon getPAMGuardImageIcon(int sizeFlag) {
return new ImageIcon(ClassLoader.getSystemResource(getPAMGuardIconPath(sizeFlag)));
}
public static ImageIcon getPAMGuardImageIcon() {
return getPAMGuardImageIcon(NORMAL);
}
}

View File

@ -416,9 +416,7 @@ public class PamObjectViewer implements PamViewInterface, ComponentListener,
setTitle("Pamguard Data Model");
// fixed case of Resources 17/8/08 DG.
setIconImage(new ImageIcon(ClassLoader
.getSystemResource("Resources/pamguardIcon.png"))
.getImage());
setIconImage(PamIcon.getPAMGuardImageIcon(PamIcon.SMALL).getImage());
// setIconImages(getOwner().getIconImages());
setSize(new Dimension(800, 700));

View File

@ -25,8 +25,7 @@ public class PopupTextField {
private PopupTextField(String title) {
// frame = new JFrame();
frame = new JDialog();
frame.setIconImage(new ImageIcon(ClassLoader
.getSystemResource("Resources/pamguardIcon.png")).getImage());
frame.setIconImage(PamIcon.getPAMGuardImageIcon(PamIcon.SMALL).getImage());
frame.setModalityType(Dialog.ModalityType.DOCUMENT_MODAL);
frame.setIconImage(null);
frame.setLayout(new BorderLayout());

View File

@ -42,6 +42,7 @@ import PamView.ClipboardCopier;
import PamView.PamColors;
import PamView.ScreenSize;
import PamView.help.PamHelp;
import PamView.PamIcon;
import gpl.GPLParameters;
/**
@ -132,6 +133,12 @@ abstract public class PamDialog extends JDialog {
this.setResizable(false);
setAlwaysOnTop(parentFrame == null);
String icon = PamIcon.getPAMGuardIconPath(PamIcon.SMALL);
//
// System.out.println("Get icon: " + ClassLoader
// .getSystemResource(PamIcon.getPAMGuardIconPath(PamIcon.SMALL)));
setIconImage(new ImageIcon(ClassLoader
.getSystemResource("Resources/pamguardIcon.png")).getImage());

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -29,6 +29,7 @@ import PamModel.parametermanager.PamParameterSet;
import PamModel.parametermanager.PamParameterSet.ParameterSetType;
import PamModel.parametermanager.PrivatePamParameterData;
import PamView.MenuItemEnabler;
import PamView.PamIcon;
import clickDetector.offlineFuncs.OfflineEventDataUnit;
public class ClickDisplayManager implements PamSettings {
@ -166,9 +167,8 @@ public class ClickDisplayManager implements PamSettings {
pf = new PamInternalFrame(newClickDisplay, false);
if (!System.getProperty("os.name").equals("Linux")) {
newClickDisplay.getFrame().setFrameIcon(new ImageIcon(ClassLoader
.getSystemResource("Resources/pamguardIcon.png")));
if (!System.getProperty("os.name").equals("Linux") && !System.getProperty("os.name").startsWith("Mac")) {
newClickDisplay.getFrame().setFrameIcon(PamIcon.getPAMGuardImageIcon(PamIcon.SMALL));
}
newClickDisplay.getFrame().setClosable(true);

View File

@ -251,6 +251,7 @@ public class CPODControl2 extends PamControlledUnit implements PamSettings {
SettingsPane<CPODParams> setPane = (SettingsPane<CPODParams>) getSettingsPane();
setPane.setParams(this.cpodParams);
settingsDialog = new PamDialogFX2AWT<CPODParams>(parentFrame, setPane, false);
settingsDialog.setHelpPoint("sensors.cpod.docs.cpod");
settingsDialog.setResizable(true);
}
CPODParams newParams = settingsDialog.showDialog(cpodParams);

View File

@ -46,6 +46,8 @@ public class MLAnnotationsManager {
//first we need to find out which data annotation the data unit data block has - need to ensure we add all the annotation
//even if they don't exist- otherwise we may get dissimilar structure exceptions.
PamDataBlock parentblock = dataUnit.getParentDataBlock();
if (parentblock.getAnnotationHandler()==null) return;
DataAnnotationType annotType;
List<DataAnnotationType<?>> annotationTypes = parentblock.getAnnotationHandler().getAvailableAnnotationTypes();
@ -227,8 +229,6 @@ public class MLAnnotationsManager {
}
private Struct dlAnnoation2MAT(DLAnnotation dlAnnotation) {
float[][] predictions = new float[dlAnnotation.getModelResults().size()][];
boolean[] decision = new boolean[dlAnnotation.getModelResults().size()];

View File

@ -41,10 +41,12 @@ public class RAnnotationManager {
//first we need to find out which data annotation the data unit data block has - need to ensure we add all the annotation
//even if they don't exist- otherwise we may get dissimilar structure exceptions.
PamDataBlock parentblock = dataUnit.getParentDataBlock();
if (parentblock.getAnnotationHandler()==null) return rData;
DataAnnotationType annotType;
List<DataAnnotationType<?>> annotationTypes = parentblock.getAnnotationHandler().getAvailableAnnotationTypes();
for (int i=0; i<parentblock.getAnnotationHandler().getNumUsedAnnotationTypes(); i++) {
annotType = annotationTypes.get(i);

View File

@ -58,7 +58,7 @@ public class ExportProcessDialog {
private OfflineTaskGroup dlOfflineGroup;
private ExportOLDialog mtOfflineDialog;
private ExportOLDialog exportDialog;
/**
* Reference to the export manager.
@ -74,6 +74,7 @@ public class ExportProcessDialog {
//create the offline task group.
this.exportManager=exportManager;
dlOfflineGroup = new ExportTaskGroup("Export data");
}
@ -97,14 +98,16 @@ public class ExportProcessDialog {
createExportGroup();
//if null open the dialog- also create a new offlineTask group if the datablock has changed.
if (mtOfflineDialog == null) {
mtOfflineDialog = new ExportOLDialog(parentFrame,
if (exportDialog == null) {
exportDialog = new ExportOLDialog(parentFrame,
dlOfflineGroup, "Export Data");
//batchLocaliseDialog.setModalityType(Dialog.ModalityType.MODELESS);
}
mtOfflineDialog.setParams(params);
mtOfflineDialog.enableControls();
mtOfflineDialog.setVisible(true);
exportDialog.setHelpPoint("overview.dataexport.docs.dataexport");
exportDialog.setParams(params);
exportDialog.enableControls();
exportDialog.setVisible(true);
}
@ -478,7 +481,7 @@ public class ExportProcessDialog {
this.setPrimaryDataBlock(getTask(i).getDataBlock());
if (i<getNTasks()-1) {
//will start a new thread after this one has finished
this.setTaskMonitor(mtOfflineDialog.newExportTaskMonitor(i, this));
this.setTaskMonitor(exportDialog.newExportTaskMonitor(i, this));
}
super.runTasks();
}

View File

@ -131,6 +131,7 @@ public class MTClassifierControl extends PamControlledUnit implements PamSetting
SettingsPane<MatchedTemplateParams> setPane = (SettingsPane<MatchedTemplateParams>) getSettingsPane();
setPane.setParams(this.matchedTemplateParams);
settingsDialog = new PamDialogFX2AWT<MatchedTemplateParams>(parentFrame, setPane, false);
settingsDialog.setHelpPoint("classifiers.matchedtemplate.mathchedtemplate"); //spelling mistake in path - careful
settingsDialog.setResizable(true);
}
MatchedTemplateParams newParams = settingsDialog.showDialog(matchedTemplateParams);

View File

@ -547,6 +547,7 @@ public class MTClassifierPane extends SettingsPane<MTClassifier> {
@Override
public double[][] getWaveform(RawDataUnit pamDetection) {
if (pamDetection==null) return null;
//just return the waveform.
//System.out.println("Getting the waveform for the waveform plot: " + pamDetection.getRawData().length);
return new double[][]{pamDetection.getRawData()};

View File

@ -38,9 +38,13 @@ import java.util.TimeZone;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import com.formdev.flatlaf.FlatLightLaf;
import Acquisition.FolderInputSystem;
import PamController.PamController;
import PamController.PamGUIManager;
import PamController.PamRunModeDialog;
import PamController.PamRunModeParams;
import PamController.PamSettingManager;
import PamController.PamguardVersionInfo;
import PamController.pamBuoyGlobals;
@ -91,7 +95,7 @@ public class Pamguard {
* @param args
*/
public static void main(String[] args) {
Debug.setPrintDebug(false); // make sure the class instantiates static members.
try {
if (PlatformInfo.calculateOS() == OSType.WINDOWS) {
@ -100,8 +104,7 @@ public class Pamguard {
else {
//do not use the mac version...it's awful
//UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
UIManager.setLookAndFeel(new FlatLightLaf() );
}
// for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
// if ("Nimbus".equals(info.getName())) {
@ -120,7 +123,9 @@ public class Pamguard {
// System.out.println(keys.nextElement() + ": " + ui.get(nxt));
// }
// PamColors.getInstance().setColors();
} catch (Exception e) { }
} catch (Exception e) {
e.printStackTrace();
}
int runMode = PamController.RUN_NORMAL;
String InputPsf = "NULL";
@ -162,6 +167,20 @@ public class Pamguard {
String anArg;
while (iArg < nArgs) {
anArg = args[iArg++];
if (anArg.equalsIgnoreCase("-c")) {
//the user chooses which run mode
PamRunModeParams runbModeParams = PamRunModeDialog.showDialog(null, true);
if (runbModeParams==null || runbModeParams.runMode<0) {
//use cancelled
System.exit(0);
}
else {
//set anArg to whatever the user chose
anArg = runbModeParams.getRunString();
}
}
if (anArg.equalsIgnoreCase("-v")) {
runMode = PamController.RUN_PAMVIEW;
System.out.println("PAMGUARD Viewer");

View File

@ -430,6 +430,7 @@ public class DLControl extends PamControlledUnit implements PamSettings {
SettingsPane<RawDLParams> setPane = (SettingsPane<RawDLParams>) getSettingsPane();
setPane.setParams(this.rawDLParmas);
settingsDialog = new PamDialogFX2AWT<RawDLParams>(parentFrame, setPane, false);
settingsDialog.setHelpPoint("classifiers.rawDeepLearningHelp.docs.rawDeepLearning");
settingsDialog.setResizable(true);
}
RawDLParams newParams = settingsDialog.showDialog(rawDLParmas);

View File

@ -221,11 +221,10 @@ public class DelphinIDTest {
}
private static double[] whistle2AverageArray(double[][] whistleValues, double startseg, double seglen) {
private static double[] whistle2AverageArray(double[][] whistleValues, double startseg, double seglen, double[] freqLimits) {
//now perform the image transform in Java
double[] freqLimits = new double[] {2000., 20000.};
double[] size = new double[] {496., 369.};
// double[] freqLimits = new double[] {2000., 20000.};
double freqBin = 100.;
@ -261,16 +260,17 @@ public class DelphinIDTest {
return peakBins;
}
/**
* This test runs delphinID on one 4 second window from whistle contours saved
* This test runs delphinID on a single 4 second window from whistle contours saved
* in a mat file. The mat file also contains an image from Python. The test
* compares the Python image to to the image generated by exporting both images
* to a .mat file. The model is run on both images and results are compared
*
* @return
*/
public static boolean testDelphinIDImage(String imagePathOut) {
public static boolean testDelphin2DImage(String imagePathOut) {
System.out.println("------DelphinID image comparison test---------");
@ -352,6 +352,7 @@ public class DelphinIDTest {
.addArray("imageJava",DLMatFile.array2Matrix(pamguardWhistleImage));
Mat5.writeToFile(matFileWrite, imagePathOut);
}
@ -371,7 +372,7 @@ public class DelphinIDTest {
/**
* This test runs delphinID on one 4 second window from whistle contours saved
* in a mat file
* in a mat file.
*
* @return true if the test is passed.
*/
@ -380,7 +381,6 @@ public class DelphinIDTest {
System.out.println("------DelphinID 1D array comparison test---------");
double seglen = 4;
//test the model
//String modelPath = "/Users/au671271/Library/CloudStorage/Dropbox/PAMGuard_dev/Deep_Learning/delphinID/delphinIDmodels/Dde415/whistle_4s_415_model.zip";
String modelPath = "/Users/au671271/Library/CloudStorage/Dropbox/PAMGuard_dev/Deep_Learning/delphinID/delphinIDmodels/Ggr242/whistleclassifier.zip";
@ -408,9 +408,28 @@ public class DelphinIDTest {
//the values for the whistle detector.
double[][] whistleValues = DLMatFile.matrix2array(array);
//the values for the whistle detector.
double[] whistleArray = whistle2AverageArray(whistleValues, array.getDouble(0), seglen);
double[] freqLimits = new double[] {2000., 20000.};
//Create spectrum
//the values for the whistle detector.
double[] whistleArray = whistle2AverageArray(whistleValues, array.getDouble(0), seglen, freqLimits);
System.out.println("Whistle spectrum size: " + whistleArray.length);
float[] whistleSpectrumF = PamArrayUtils.double2Float(whistleArray);
//generate model input
float[][] input = new float[1][];
input[0] = whistleSpectrumF;
float[] outputJava = model.runModel(input);
System.out.println("Whistle spectrum output: ");
PamArrayUtils.printArray(outputJava);
}
catch (MalformedModelException | IOException e) {
// TODO Auto-generated catch block

View File

@ -142,9 +142,9 @@ public class DelphinIDTest {
public static void modelInputTest() {
//test whether a single segment gives the correct answer.
boolean result = rawDeepLearningClassifier.dlClassification.delphinID.DelphinIDTest.testDelphinIDImage(null);
// boolean result = rawDeepLearningClassifier.dlClassification.delphinID.DelphinIDTest.testDelphinIDImage(null);
assertTrue(result);
// assertTrue(result);
}
}

View File

@ -3,6 +3,8 @@ package userDisplay;
import javax.swing.ImageIcon;
import javax.swing.JInternalFrame;
import PamView.PamIcon;
/**
* Frames for general purpose user displays.
* Doesn't do much apart from use the normal frame functions, but
@ -28,8 +30,9 @@ public class UserDisplayFrame extends JInternalFrame {
// getLayeredPane().add(userDisplayComponent.getComponent(), JLayeredPane.DEFAULT_LAYER);
add(userDisplayComponent.getComponent());
setTitle(userDisplayComponent.getFrameTitle());
setFrameIcon(new ImageIcon(ClassLoader
.getSystemResource("Resources/pamguardIcon.png")));
setFrameIcon(PamIcon.getPAMGuardImageIcon(PamIcon.SMALL));
setSize(900, 400);
setVisible(true);
}