{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Northern Strait of Georgia — January 2018\n", "This notebook walks through an example analysis of acoustic tracking performance using range test data from the Northern Strait of Georgia near Comox BC in January 2018. \n", "\n", "In this notebook we will: \n", "* Load configuration settings from yaml files\n", "* Create a `Detections` object by loading detection event data & receiver/transmitter deployment metadata, processing those detections, and adding in other environmental variables. \n", "* Generate visual reports to assist in analysing what factors drive a transmitter tag's range. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Data Set Up\n", "\n", "First off, we need to download the data files that we will be using in this notebook. Download the `data` folder from [this](https://vault.sfu.ca/index.php/s/RQLttH4gyK5QcvM) SFU Vault link. Once the full folder has been downloaded place it in the same folder where this notebook is located. With this, your `range-driver-tutorials/tutorials/NSOG_Jan2018` folder should contain 2 folders (`configs` & `data`) & 1 file (this notebook)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Imports" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import range_driver as rd\n", "import pandas as pd\n", "import kadlu \n", "\n", "%matplotlib inline\n", "rd.mpl_set_notebook_params()\n", "\n", "# Set the kadlu storage location to point to cached data\n", "kadlu.storage_cfg(setdir=f'{rd.utils.repo_path()}/data/NSOG_Jan2018/kadlu_data/')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load configuration from YAML files" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "baseconfig = rd.yload(rd.load_file(\"configs/base_config.yaml\"))\n", "viewconfig = rd.yload(rd.load_file(\"configs/view_config.yaml\"))\n", "rd.deep_update(baseconfig, viewconfig)\n", "\n", "rawconfig = rd.yload(rd.load_file(\"configs/nsog_jan2018_config.yaml\"))\n", "config = rd.merge_dicts(baseconfig, rawconfig)\n", "\n", "rd.prepare_config(config)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Read Detections, Metadata, and Environmental Variables" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "dets = rd.Detections(config, do_processing=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Detail Reports" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "scrolled": true }, "outputs": [], "source": [ "rd.report_group_info(dets)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Data Sources" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2020-11-17T18:47:09.169759Z", "start_time": "2020-11-17T18:47:09.165447Z" } }, "outputs": [], "source": [ "print(rd.kadlu_source_map())\n", "print(\"Configured data sources:\\n\")\n", "print(rd.ydump(config.data.sources))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Maps visualization\n", "Map view including region of interest bound, environmental data source nodes, receiver and tag locations." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "rd.report_map_view(dets)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Heatmap Visualization of Features" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "rd.report_heatmap(dets)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "authors": [ { "name": "Steven Bergner (SFU)" } ], "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8" }, "title": "Acoustic tracking performance analysis" }, "nbformat": 4, "nbformat_minor": 4 }