Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions quarto/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/.quarto/

**/*.quarto_ipynb
6 changes: 6 additions & 0 deletions quarto/about.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ title: "About PAMGuard"

Marine mammals, whales and dolphins in particular, are highly vocal. This means that it's often easier to hear them, than it is to see them. This is particularly true at night or in poor weather.

If you've used PAMGuard in your research, please cite our most recent paper:
Gillespie, D., Macaulay, J., Oswald, M., and Roch, M. (2026). “PAMGuard: Application software for passive acoustic detection, classification, and localisation of animal sounds,” The Journal of the Acoustical Society of America, 159, 437–443. [doi.org/10.1121/10.0042245](https://doi.org/10.1121/10.0042245).

You may also want to cite the specific PAMGuard release you're using using it's Zenodo DOI, e.g.
Gillespie, D., & Macaulay, J. (2025). PAMGuard (V2.02.17). Zenodo. [https://doi.org/10.5281/zenodo.15593810](https://doi.org/10.5281/zenodo.15593810) and any papers written about specific detectors or models you're using.

## Vision

The PAMGuard project started in 2006, intending to address the fundamental limitations of existing cetacean passive acoustic monitoring (PAM) software by creating an integrated software infrastructure that is open source and available to all PAM users for the benefit of the marine environment.
Expand Down
9 changes: 9 additions & 0 deletions quarto/admin/downloadstats.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ https://github.com/pamguard/VisualAngles/

<br>


<h3>Goniometer (Fastloc GPS)</h3>

::: pgdownload
https://github.com/douggillespie/pamgonio/
:::

<br>

<h3>Plugin Demo</h3>

::: pgdownload
Expand Down
4 changes: 1 addition & 3 deletions quarto/devmodules.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ Available components of a PAMGuard module are
- Graphic Overlays
- Plug in display panels

All components of a PAMGuard module are optional except for the main PamControlledUnit class.
A good place to start is to look at the [Wild Haggis Detector](plugins/haggis.html) which is a
relatively simple detector and classifier that uses most of the above features.
All components of a PAMGuard module are optional except for the main PamControlledUnit class. A good place to start is to look at the [Wild Haggis Detector](plugins/haggis.html) which is a relatively simple detector and classifier that uses most of the above features.

### The Constructor

Expand Down
78 changes: 67 additions & 11 deletions quarto/devplugins.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,39 @@
title: "Creating Plugin Modules"
---

There are two types of PAMGuard module. [Core modules](coremodules.html) which are built into the main PAMGuard code and [Plugin modules](pluginmodules.html) which are distributed separately. This page tells you how to prepare a [Plugin modules](pluginmodules.html) for PAMGuard.
## Introduction

There are two types of PAMGuard module. [Core modules](coremodules.html) which are built into the main PAMGuard code and [Plugin modules](pluginmodules.html) which are distributed sparately. This page tells you how to prepare a [Plugin modules](pluginmodules.html) for PAMGuard.

Before reading this page, make sure you've read up on how to [develop a core module](devmodules.html)

## Writing PAMGuard Plug-ins
## Setting up a PAMGuard Plugin

The best way to create a PAMGuard, especially if it relies on external dependencies, is to set up a Java Maven project.

Using [Eclipse IDE](https://eclipseide.org/) set up [PAMGuard as a project](sourcecode.qmd) in your workspace. Then create a separate Maven project in the same workspace. Right click on the Maven project, select *Properties* and in the *Java Build Path* section, select the *Projects* tab. Click on *Add* and select the PAMGuard project to add it as a dependency.

![Adding the project as a dependency](images/pamguard_plugin_eclipse.png)

*Add PAMGuard to the plugin project's classpath*

Now your plugin project will know all the classes in PAMGuard and you can start developing your plugin module. There are multiple types of plugins and each has an example project which you can use as a starting point.

- To develop a standard PAMGuard module refer to the [Detector for the Scottish Wild Haggis](https://github.com/PAMGuard/haggis) detector project.
- To develop a plugin for the SoundAcquisition module (e.g. to implement new type of sound card) refer to the [Windows Sound](https://github.com/douggillespie/WindowsSound) project as an example.
- To develop a plugin for the AnalogSensor module (e.g. to implement new type of analog sensor) refer to the [Dummy Analog Device plugin](https://github.com/PAMGuard/DummyAnalogDevice) project.

ARCHIVING PLUG-INS INTO A JAR FILE FOR DISTRIBUTION
Note that in all these plugins you must duplicate a PAMGaurd class in your plugin project. For example, in a standard module class oyu must create PamModel class with the same package name as in PAMGuard. Copy the PamModel class from PAMGaurd and then add your new module in the plugin version of your PamModel class. When you run your project, the PamModel class from your plugin project will be used instead of the PAMGuard version and your plugin will appear as a module.

Even if the plugin is intended as an External module, it is easiest to develop it as a Core module. In other words, create a new package in the PAMGuard code base to hold all of the new classes, and add a reference to the package classes in PamModel. This way, dependencies do not need to be explicitly managed and debugging is simplified. All development should be done within the new package, and the core PAMGuard classes should not be changed (if modifications are necessary, please contact the PAMGuard development team first).
To run the plugin from Eclipse simply run create a Run Configuration that launches the PAMGuard main class (pamguard.Pamguard). Ensure that the plugin project is the selected in the *Project:* field. When PAMGuard starts it will find the plugin classes in the classpath and load them as if they were part of the core PAMGuard code.

To make an external PAMGuard plug-in available to PAMGuard users once development is complete, it is necessary to archive the class files and support files (including help files, graphics, sound files, etc.) into a java archive (jar) file.
![Running the plugin prject from Eclipse](images/pamguard_plugin_eclipse_2.png) *Running a plugin project (in this called X3) from Eclipse.*

Prior to archiving, the developer must add a class to the project package which implements one of two interfaces: PamModel.PamPluginInterface (for standard plug-in modules) or Acquisition.DaqSystemInterface (for data acquisition modules such as sound cards, file streams, etc.). Override all of the Interface’s inherited methods, returning appropriate values as specified in the Javadoc comments. Create a String object to hold the jar file name. This parameter does not need to be initialized to anything specific; the value will be set by PAMGuard via the inherited setter method. The code could be as simple as
## Building a plugin

Prior to building, you must ensure that your project implements the correct plugin interface e.g. PamModel.PamPluginInterface (for standard plug-in modules) or Acquisition.DaqSystemInterface (for data acquisition modules such as sound cards, file streams, etc.).

Override all of the Interface’s inherited methods, returning appropriate values as specified in the Javadoc comments. Create a String object to hold the jar file name. This parameter does not need to be initialized to anything specific; the value will be set by PAMGuard via the inherited setter method. The code could be as simple as

``` java
String jarFile;
Expand All @@ -23,9 +43,49 @@ String jarFile;
}
```

If you have external dependencies, you will need to build as a Maven project. Maven does not consider Eclipse build settings and so the build will fail unless you add PAMGuard as dependency. In your pom.xml add PAMGuard as a dependency as follows.

``` xml
<dependency>
<groupId>org.pamguard</groupId>
<artifactId>pamguard</artifactId>
<version>2.02.18</version>
<scope>provided</scope>
</dependency>
```

It is also important to exclude any of the duplicate classes from your build that have been used to run the Plugin. For example, if building a standard module, ensure the PamModel class is excluded from the build.

``` xml
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>21</release>
<excludes>
<exclude>**/PamModel/PamModel.java</exclude>
</excludes>
</configuration>
</plugin>
```

Run `mvn clean install` for your PAMGuard prject (not the plugin) to make sure PAMGuard is added to your local Maven repository. Maven will then build the jar. It's very import to keep `<scope>provided</scope>` as this prevents from the entire PAMGuard source code being added to the jar file. `mvn clean package` run from your plugin project will then build the plugin.

Note that sometimes Eclipse can get confused between the workspace PAMGuard and Maven dependency so it's best to keep the Maven dependency commented out until you are ready to build the jar.

## Help files

It is strongly recommended that help files be included with the plug-in. PAMGuard uses Oracle’s JavaHelp 2.0 system (complete details can be found here). Each page in the help file is an HTML document. Create individual HTML pages (with links and images) to describe the setup and operation of the plug-in, and save all files in the same package folder that your java program is in. Once the pages are completed, create the helpset and support files (map, TOC, index, etc.). Programs like jhelpdev can greatly simplify the process of creating these files.

### Notes:
## Testing the Plugin jar file

To test the jar file, move it to the plugins subfolder in the PAMGuard installation folder. If there is no plugins folder, create one. When PAMGuard is started, it should find the jar file and use the information in the interface class to dynamically load the code. Remember to rename/delete the package in the PAMGuard code first, to ensure that you are really testing the jar file contents and not the original code.

## Tips and Notes

Even if the plugin is intended as an External module, it can be more straightforward to develop it as a Core module. In other words, create a new package in the PAMGuard code base to hold all of the new classes, and add a reference to the package classes in PamModel. This way, dependencies do not need to be explicitly managed and debugging is simplified. All development should be done within the new package, and the core PAMGuard classes should not be changed (if modifications are necessary, please contact the PAMGuard development team first).

If plug-in development has been done in the core PAMGuard code and then exported to a jar, the \*.class files may still exist in the PAMGuard project’s bin subfolder (even if the original package has been deleted). If testing the plug-in jar in the IDE, first look through the bin subfolder and delete any plug-in\* .class files that are stored. If PAMGuard finds the classes in both the bin folder and the jar file, it is unclear which would get loaded at runtime. The class files are replaced in the bin folder every time a build is completed. Also, remember to remove references to the new module from the PamModel class, as this will be taken care of by the jar file.

To have the help files added to an existing category (i.e. Classifiers, Detectors, etc.) in the PAMGUARDhelp table of contents, the top-level tag text attribute in the plug-in’s TOC xml file must match the category name exactly. Some category names have a space character at the end. If in doubt, check the PAMGUARDTOC.xml file found in src/help for a list of the TOC entries. If the top-level tag text attribute in the plug-in’s TOC xml file does not match any of the category names in the table of contents, the item is simply appended to the bottom of the list. To match the existing table of contents look-and-feel, each tag in the plug-in’s TOC xml file should have image=”topic” added as an attribute. Copy the image.gif file found in src/help to the plug-in package folder. Ensure the line is in the plug-in’s map.jhm file

Expand All @@ -34,7 +94,3 @@ Specify the name of the helpset file in the plug-in interface class. Look throug
Follow these steps to bundle all files together into a single jar, ready for distribution. Note the following are specific to the Eclipse IDE. Other IDE’s will have similar functionality:

Right-click on the project name in the Package Explorer view and select Export In the Export window, click on the Java folder and highlight JAR file. Hit Next In the window frame on the left, make sure the package and all necessary subfolders are selected to export (sometimes subfolders created by JavaHelp - such as JavaHelpSearch – are not included in the export list by default). Click on the box beside “Export generated class files and resources” and “Export Java source files and resources”. Enter the name of the exported jar file in the text box under “Select the export destination”. You can click on the box beside “Compress the contents of the JAR file”, though this is optional. The default values for the remainder of the windows can be used. Hit Finish to export the package to the location specified.

To test the jar file, move it to the plugins subfolder in the PAMGuard installation folder. If there is no plugins folder, create one. When PAMGuard is started, it should find the jar file and use the information in the interface class to dynamically load the code. Remember to rename/delete the package in the PAMGuard code first, to ensure that you are really testing the jar file contents and not the original code.

Final note: if plug-in development has been done in the core PAMGuard code and then exported to a jar, the \*.class files may still exist in the PAMGuard project’s bin subfolder (even if the original package has been deleted). If testing the plug-in jar in the IDE, first look through the bin subfolder and delete any plug-in\* .class files that are stored. If PAMGuard finds the classes in both the bin folder and the jar file, it is unclear which would get loaded at runtime. The class files are replaced in the bin folder every time a build is completed. Also, remember to remove references to the new module from the PamModel class, as this will be taken care of by the jar file.
21 changes: 21 additions & 0 deletions quarto/devsubplugins.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: "Creating Sub-module Plugins"
---

As well as [plugins that are complete PAMGuard modules](pluginmodules.qmd) is is possible to develop
sub modules for certain PAMGuard modules. Examples are additional types of acquisition device for
the [Sound Acquisition Module](https://www.pamguard.org/olhelp/sound_processing/AcquisitionHelp/docs/AcquisitionOverview.html) and new types of analog input device for the [Array Sensor module](https://www.pamguard.org/olhelp/sensors/analogarray/docs/analogarray.html).

For example, you may have a bespoke data acquisition system for audio data, or a new method for reading other sensors.
e.g. we've recently developed a reader for a sensor that is only available for the Raspberry Pi. It wouldn't be appropriate
to include this in the PAMGuard core, but it's useful to us on one particular project.

The PAMGuard framework allows for easy development of additional types of sub-module plugin as required. These must all be based around a sub-class of [CommonPluginInterface](https://www.pamguard.org/api/PamModel/CommonPluginInterface.html). Any plugin module found in the PAMGuard plugins folder will be loaded when PAMGuard starts and it's help files added to the PAMGuard online help. If it's a new sub-plugin type, you'll also have to add code to the module using the plugin in oder to use that plugin. Examples modules that use sub-module plugins are
[AnalolgDeviceManager](https://github.com/PAMGuard/PAMGuard/blob/main/src/analoginput/AnalogDevicesManager.java)
and
[AcquisitionControl](https://github.com/PAMGuard/PAMGuard/blob/main/src/Acquisition/AcquisitionControl.java)
for examples.

An example analog sensor plugin is [here](https://github.com/PAMGuard/DummyAnalogDevice/tree/main) and
a sound acquisition plugin [here](https://github.com/douggillespie/WindowsSoundJNA).

Binary file added quarto/images/pamguard_plugin_eclipse.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added quarto/images/pamguard_plugin_eclipse_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion quarto/news/250813_pypamguardv1.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ We're pleased to announce the availability of pypamguard version 1.0.0: a <a hre

Further details of pypamguard, including installation and a quick-start guide, can be found on the [data export](../matlabandr.qmd) page.

Please report any bugs to the [pypamguard GitHub repository](https://github.com/PAMGuard/pypamguard).
Please report any bugs to the [pypamguard GitHub repository](https://github.com/PAMGuard/pypamguard).
11 changes: 11 additions & 0 deletions quarto/news/260115_jasa.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "New PAMGuard plublication"
description: "PAMGuard: Application software for passive acoustic detection, classification, and localisation of animal sounds"
date: 2026-01-15
---

We're pleased to announce a new publication about PAMGuard in the Journal of the Acoustical Society of America:


Gillespie, D., Macaulay, J., Oswald, M., and Roch, M. (2026). “PAMGuard: Application software for passive acoustic detection, classification, and localisation of animal sounds,” The Journal of the Acoustical Society of America, 159, 437–443. [doi.org/10.1121/10.0042245](https://doi.org/10.1121/10.0042245)

10 changes: 7 additions & 3 deletions quarto/plugins/tritech.qmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Tritech Sonar Processing"
author: Doug Gillespie
date: 2024-09-06
date: 2025-12-19
image: ./images/gemini720is.jpg
description: "Acquisition and processing of data from Tritech Gemini sonars."
---
Expand All @@ -13,13 +13,17 @@ Acquires and processed data in real time or from files from [Tritech Gemini Mult
### References

Douglas Gillespie, Gordon Hastie, Jessica Montabaranom, Emma Longden, Katie Rapson, Anhelina Holoborodko, and Carol Sparling. "Automated detection and tracking of marine mammals in the vicinity of tidal turbines using multibeam sonar." Journal of Marine Science and Engineering 11, no. 11 (2023): 2095.
[doi.org/10.3390/jmse11112095](https://doi.org/10.3390/jmse11112095).

Montabaranom, J., Gillespie, D., Longden, E., Rapson, K., Holoborodko, A., Sparling, C., and Hastie, G. (2025). “Seals exhibit localised avoidance of operational tidal turbines,” Journal of Applied Ecology. [doi:10.1111/1365-2664.14844](https://doi.org/10.1111/1365-2664.14844).


### Downloads

For further information see the release notes on [GitHub](https://github.com/douggillespie/TritechAcquisitionPlugin/releases)

[Source Code](https://github.com/douggillespie/TritechAcquisitionPlugin)

[Built Module](https://github.com/douggillespie/TritechAcquisitionPlugin/releases/tag/V1.41)
[Built Module](https://github.com/douggillespie/TritechAcquisitionPlugin/releases/tag/V1.47)

[Online Help](https://douggillespie.github.io/TritechAcquisitionPlugin/docs/tritechoverview.html)
[Online Help](https://douggillespie.github.io/TritechAcquisitionPlugin/docs/tritechoverview.html)
Loading