Go Back

Spotter Data Parsing Script

Team Sofar

Sofar’s internal open-source parsing script can help you analyze your Spotter’s SD card data. The script will help associate your data with a human-readable timestamp and translate the spectral data into bulk parameters.

Please note: The parsing script is not an actively supported tool and we recommend that customers build their ingesting tools using the raw Spotter SD card data. Further information on the meaning of the data in the SD card files can be found in the Spotter SD Card Data Guide.

Computer requirements

  • Python 3 or higher
  • Python modules installed: pandas, numpy, scipy

Download the latest parsing script

Access the latest parsing script here.

Further information on how the parser script works can be found in the comments at the top of the file and in the README. 

Includes:

  • Ability to parse data from Spotter and Smart Mooring devices running firmware v2.0 and higher.
  • Ability to parse data from Spotter and Smart Mooring devices running firmware v1.12.0 and lower.

Using the parsing script

  • Download the parsing script onto the computer you will use to retrieve Spotter SD card data.
  • Unzip the file.
  • Be sure you have the following python modules installed: pandas, numpy, scipy. If Python is already installed, this can usually be accomplished by running the following in a Terminal or shell window:

pip3 install --user pandas numpy scipy

  • Copy the Spotter files to your computer.
  • Copy the parsing script into the directory where you copied the Spotter files.
  • Open a terminal window at the directory from the previous step and run:

python3 sd_file_parser.py

  • The parser script should find the Spotter files in its current directory and operate on them.

Optional command-line parameters

You can use the following command-line parameters to customize the operation and output of the parser.

outputFileType

Specify additional file types to be output. For example, outputFileType=matlab will output Matlab-formatted files.

spectra

By default, the script will only produce the variance density spectrum. If in addition the directional moments are desired, add the command line switch spectra=’all’ , i.e.:

python3 sd_file_parser.py spectra='all'

…in which case files containing a1,b1,a2,b2 (in separate files) will be produced.

If you have questions about the parsing script, please email support@sofarocean.com.

Sofar in the News

Deep sea thinking
Access insights from Sofar's team of ocean scientists to power your next deployment, voyage, or operation. Subscribe to our blog.

Related Stories