⚠️ EARLY DEVELOPMENT NOTICE: This package is in early stages and under heavy development. APIs and functionality may change frequently without notice. Use with caution in production environments.
A Python library for plotting data retrieved from Silixa Distributed Temperature Sensing (DTS) systems.
This repository contains code and jupyter notebook tutorial on data acquisiton, processing, and plotting of the distributed temperature sensor (DTS) which is owned by University of Rhode Island research group (see PhD thesis of Johann Becker )
The jupyter notebooks on how to access data in ONCs database and processing can be found here: notebooks
The below instructions are for monitoring real-time data coming into Oceannetworks.ca:
This project uses uv for dependency management and script execution. If you don't have uv installed, you'll need to install it first.
Installation Options:
-
Standalone installer (Recommended):
# On macOS/Linux: curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows (PowerShell): powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Alternative methods: See the official uv installation guide for other installation options including Homebrew, pip, winget, and more.
uvx is a tool that comes with uv for running Python tools and scripts in isolated environments. It automatically:
- Creates temporary virtual environments
- Installs dependencies as needed
- Runs the specified tool/script
- Cleans up after execution
This ensures your system Python remains clean and prevents dependency conflicts.
A unique Oceans 3.0 API token is required to access ONCs data. To obtain a token, follow the steps below:
- Register for an Oceans 3.0 account at https://data.oceannetworks.ca/Registration.
- Log into your account at https://data.oceannetworks.ca by clicking the Log In link.
- Click the Profile link (top right corner) to access your account profile.
- Access the Web Services API tab and click Copy Token.
If you forget your token, you can always find it again in your Oceans 3.0 account profile. You can store your token in a .env file in the same directory as ONC_API_TOKEN = ''.
The monitoring script can be executed directly from the GitHub repository without needing to clone or install the package locally:
uvx --from git+https://github.com/OceanNetworksCanada/onc_dts_data monitor_dts --start-time "2025-07-30T20:33:59.134Z" --log-level DEBUGParameter Breakdown:
uvx- The uv tool runner command--from git+https://github.com/OceanNetworksCanada/onc_dts_data- Specifies the source locationgit+tells uvx to install from a Git repository- The URL points to this project's GitHub repository
- uvx will clone the repo, install dependencies, and make the
monitor_dtscommand available
monitor_dts- The name of the script/command to run (defined in the project's configuration)--start-time "2025-07-30T20:33:59.134Z"- Sets the monitoring start time- Must be in ISO 8601 format with timezone (Z = UTC)
- Example format:
YYYY-MM-DDTHH:MM:SS.sssZ
--log-level DEBUG- Sets the logging verbosity level- Options:
DEBUG,INFO,WARNING,ERROR,CRITICAL DEBUGprovides the most detailed output for troubleshooting
- Options:
Example Usage:
# Basic monitoring from current time
uvx --from git+https://github.com/OceanNetworksCanada/onc_dts_data monitor_dts --start-time "2025-01-15T12:00:00.000Z"
# With detailed logging
uvx --from git+https://github.com/OceanNetworksCanada/onc_dts_data monitor_dts --start-time "2025-01-15T12:00:00.000Z" --log-level DEBUG
# With minimal logging
uvx --from git+https://github.com/OceanNetworksCanada/onc_dts_data monitor_dts --start-time "2025-01-15T12:00:00.000Z" --log-level WARNINGTroubleshooting:
- If you get a "command not found" error, ensure
uvis installed and in your PATH - If the script fails to start, check that your start time is in the correct ISO 8601 format
- Use
--log-level DEBUGto get detailed error information - Ensure you have an active internet connection for downloading dependencies and accessing the GitHub repository
Note: The first run may take longer as uvx downloads and installs all required dependencies. Subsequent runs will be faster due to caching.
For more information about uv and script execution, see the uv scripts documentation.