Matlab and R
While the PAMGuard Viewer provides a powerful tool for reviewing data offline, many researchers want to wrte their own bespoke algorithms to further analyse PAMGuard detections or to plot and view the data in ways not available within the viewer.
Although PAMGuard is fully open source, modifying the Java source code requires considerable programming expertise and is not for everyone. The PAMGuard team and our collaborators have therefore made available library functions in both the Matlab and R programming languages, which allow users to unpack binary files into those programming environments for further bespoke analysis.
Both the Matlab and R libraries are available for free. However, while the PAMGuard team are always interested in bug reports, both libraries are provided “as is” and come with no guarantee.
Matlab
MATLAB code for opening PAMGuard binary files is now on the PAMGuard GitHub repository.
Clicking the green “Code” button will allow you to download the code as a zip archive. Alternatively, you can clone the repository, which will make it easier to get updates if the code is updated.
If you don’t have a Matlab license, the library should also be compatible with the free programming language GNU Octave.
Thanks so much to our friends at NOAA Southwest Fisheries Science Center in San Diego , there is also an R package for opening PAMGuard binary files:
install.packages("PamBinaries")
You can find the source files on GitHub.
The best way to download and stay up-to-date with this is by following the installation instructions on the GitHub page. The R functions are written to work just like the MATLAB code, and there is a short tutorial on the GitHub page.