API Reference¶
- Date:
Jan 28, 2026
This page provides an auto-generated summary of TOAD’s API. All interaction with TOAD happens through the :class:`toad.TOAD` class, which serves as the main entry point for the entire framework.
Main Entry Point¶
The toad.TOAD class is the primary interface for all TOAD functionality. You initialize it with your data (xarray Dataset or path to netCDF file), then use its methods and properties to perform shift detection, clustering, visualization, and analysis.
|
Main object for interacting with TOAD. |
The TOAD class provides:
Computation methods:
toad.TOAD.compute_shifts()andtoad.TOAD.compute_clusters()for the main analysis pipelinePlotting interface: Access via
toad.TOAD.plotproperty (returns atoad.plotting.Plotterinstance)Statistics interface: Access via
toad.TOAD.stats()method (returns atoad.postprocessing.Statsinstance)Aggregation interface: Access via
toad.TOAD.aggregateproperty (returns atoad.postprocessing.Aggregationinstance)Preprocessing interface: Access via
toad.TOAD.preprocesspropertyData access: The underlying xarray Dataset is available via
toad.TOAD.data
Shift Detection Methods¶
Shift detection algorithms that can be passed to toad.TOAD.compute_shifts():
|
Detect abrupt shifts in a time series using gradient-based analysis related to [Boulton+Lenton2019]. |
Clustering Methods¶
Clustering algorithms from scikit-learn (or custom implementations) can be passed to toad.TOAD.compute_clusters(). TOAD is compatible with any clustering method that follows the scikit-learn ClusterMixin interface.
Common examples:
- sklearn.cluster.HDBSCAN
- sklearn.cluster.DBSCAN
Plotting and Visualization¶
The plotting functionality is accessed through the toad.TOAD.plot property, which returns a toad.plotting.Plotter instance. You can customize map styling using toad.plotting.MapStyle.
Plotting utilities for TOAD objects. |
|
|
Configuration for map styling parameters. |
Regridding¶
Regridding utilities for ensuring equal spacing in global datasets. These are typically used automatically when needed, but can be configured via the regridder parameter in toad.TOAD.compute_clusters().
|
Regrid data onto a equal-area HEALPix grid to avoid polar bias in clustering |
Abstract base class for spatial regridders in TOAD. |
Supporting Modules¶
These modules provide the underlying functionality used by the TOAD class:
Shifts module for TOAD. |
|
Clustering module for TOAD (Temporal Offset Analysis and Detection). |
|
Utility functions and constants for TOAD. |