RAPIDKRILL is a Python application for unsupervised processing of echosounder data to derive krill distribution and density estimates in near real-time. This document describes the rapidkrill library, see installation instructions here .
The library contains 5 scripts:
listen.py
desktop.py
read.py
process.py
report.py
The Rapidkrill routine can be run in near real-time, interrogating echosounder data as it is written using the script listen.py
. Or, it can be run on an existing directory of echosounder data using desktop.py
. Both scripts call read.py
, process.py
and report.py
.
This script is used to listen for new raw files written by the echosounder. Once a new RAW file is found, listen.py
calls read.py
, process.py
, and report.py
sequentially. listen.py
processes the penultimate raw file written. If the vessel speed falls below 3 knots during a raw file, the vessel is assumed to be stationary, and the processing is aborted for that file.
The directory where the RAW files are stored by the echosounder needs to be mounted in the computer running the listening routine.
When listen.py
calls report.py
, it requires an internet connection to send the data to land via email.
This script runs the processing routine on all the RAW files contained in a directory. It is designed for large-scale processing with acoustic datasets already collected. It processes all raw files in a specified directory sorted by file name (alphabetically and by time stamp assuming a default filename generated by ER60 software). desktop.py
calls read.py
, process.py
, and report.py
sequentially. However, unlike listen.py
, it does not send out reports via email.
It reads EK60 SIMRAD RAW files and returns the following Numpy data arrays:
- Sv (dB)
- Athwart-ship angle (deg)
- Along-ship angle (deg)
- Time (numpy.datetime64)
- Range (m)
- Longitude (deg)
- Latitude (deg)
- Distance travelled (nmi & km)
- Pitch (deg)
- Roll (deg)
- Heave (deg)
Acoustic and NMEA data is extracted using PyEcholab. Where NMEA datagrams are delayed in time with respect to acoustic datagrams, read.py
generates a workflow where NMEA packets from preceding files are used in the current file being read, so that NMEA data is properly interpolated to the timestamps of RAW datagrams:
RapidKrill looks for GGA, GLL and RMC GPS fixes within the NMEA data and uses the first one available (they are sorted alphabetically). No data quality evaluation is applied to the GPS data. GPS data is then used to calculate the distance travelled and vessel speed. An error will be raised if the vessel speed is calculated to be above 20 knots, read.py
will fail to read the file and listen.py
will move onto the next one. This vessel speed value can be changed in read.nmea
.
read.py
also returns flags telling whether or not the file is continuous with a preceding files. E.g, a file is not continuous if a time breach is identified between the preceding and the current file. If so, a new transect number is given and the distance counting starts again from zero. A time breach is calculated as greater than 1.5 times the ping-rate within the file.
These flags are used by other scripts in the library to allocate results by transect and distance units. read.py
accepts calibration parameters, sound speed, and absorption which is used to correct the data.
This script runs a processing routine, based on the swarms identification method developed by Cox (2017) for Commission for the Conservation of Antarctic Marine Living Resources (CCAMLR) in the 2019 Area48 Survey, to identify acoustic data attributed to krill. It is based on :
The routine is implemented using the open source python toolbox EchoPy. The processing starts with the removal of strong noise such as intermittent signals from other acoustic instruments (Wang et al. 2016), followed by background noise correction (De Robertis and Higginbottom 2007), and seabed detection. Finally the SHAPES algorithm (Coatzee 2000) was used to identify krill swarms, using the settings indicated in Cox (2017). Acoustic data attributed to krill swarms were integrated from 20 m below the surface to the maximum detection limit in 1 nautical mile long cells, and expressed as Nautical Area Scattering Coefficient (NASC m2 nmi-2). process.py
returns the same numpy data arrays as in read.py
, in addition to clean, de-noised and resampled acoustic data identified in the processing workflow.
This script takes outputs from process.py
to generate reports and log results. It has 3 modules:
report.console
: Build a report which is displayed on the console while rapidkrill is running.report.log
: Save results as a csv file in the log directory.report.land
: Send results to land via email.
RapidKrill reports the Nautical Area Scattering Coefficient (NASC, m^2 nmi^-2) attributed to krill, every one nautical mile and from 20 to 250 m depth. The following information comes with the NASC data:
- Time (yyyy-mm-ddTHH:MM:SS.SSS)
- Longitude (deg)
- Latitude (deg)
- Transect number
- Transect cumulated Distance (mmi)
- Seabed (m)
- samples (%, referred to the percentage of valid samples in a cell used to calculate NASC)
Coetzee J (2000). Use of a shoal analysis and patch estimation system (SHAPES) to characterize sardine schools. Aquatic Living Resources 13(1): 1-10.
Cox MJ (2017). Describing krill: swarms or integration intervals?. CCAMLR SG-ASAM-17/02.
De Robertis, A. and I. Higginbottom (2007). A post-processing technique to estimate the signal-to-noise ratio and remove echosounder background noise. ICES Journal of Marine Science 64: 1282-1291.
Wang X, Zhang J and Zhao X (2016). A post-processing method to remove interference noise from acoustic data collected from Antarctic krill fishing vessels. CCAMLR Science 23: 17-30.