API Reference
aitana.access
Pure I/O access layer for volcano monitoring data (GeoNet TILDE, WFS, seismic waveforms).
- access.tilde.tilde_request()
-
Request data from the tilde API (https://tilde.geonet.org.nz/v3/api-docs/).
- access.wfs.wfs_request()
-
Load volcano-tectonic earthquake catalogues from GeoNet’s WFS service (http://wfs.geonet.org.nz).
- access.seismic.SeismicData
- access.seismic.WaveformBaseclass
-
Base class for waveform clients.
- access.seismic.SDSWaveforms
- access.seismic.FDSNWaveforms
- access.seismic.S3Waveforms
- access.seismic.MockSDSWaveforms
-
Mock SDSWaveforms class for testing by creating
- access.seismic.PostProcess
-
Class for checking waveforms and station metadata for valid values,
- access.seismic.PostProcessException
- access.seismic.get_instrument_response()
-
Retrieve instrument response file in STATIONXML format.
- access.api.AitanaAPI
- access.util.get_defaults_with_names()
-
Get parameter names and their default values
- access.util.generate_cache_key()
-
Generate a unique filename for caching based on function name and arguments.
- access.util.cache_dataframe()
-
Decorator to cache pandas DataFrames, handle date ranges, and persist the cache to disk.
- access.util.gradient()
-
Compute gradient for time series by first smoothing
- access.util.eqRate()
-
Compute earthquake rate.
- access.util.reindex()
-
Reindex and forward fill to generate a
- access.util.hex_to_rgb()
-
Return (red, green, blue) for the color given as #rrggbb.
- access.util.rgb_to_hex()
-
Return color as #rrggbb for the given color values.
- access.util.get_color()
-
Return a color from the matplotlib color cycle by index.
- access.logging_config.setup_logging()
-
Configure logging for the aitana package.
- access.logging_config.get_logger()
-
Get a logger for a specific module within aitana.
aitana.volcanoes
Per-volcano domain aggregates for Ruapehu, Whakaari, and Taupo.
- volcanoes.whakaari.Gas
- volcanoes.whakaari.Seismicity
- volcanoes.whakaari.eruptions()
-
This function loads the eruption catalogue for White Island and
- volcanoes.whakaari.load_all()
- volcanoes.ruapehu.CraterLake
- volcanoes.ruapehu.Gas
- volcanoes.ruapehu.Seismicity
- volcanoes.ruapehu.eruptions()
-
This function loads the eruption catalogue for Mt. Ruapehu and declusters
- volcanoes.ruapehu.load_all()
- volcanoes.ruapehu.lake_height_scaling()
-
Calculate the scaling factor between the lake height sensors 08 and 03.
- volcanoes.assimilate.SemiLinearTrend
- volcanoes.assimilate.LocalLinearTrend
- volcanoes.assimilate.SO2FusionModel
- volcanoes.get_data()
-
Get path to bundled data in the aitana.volcanoes package.
aitana.features
Algorithms over in-memory waveforms for volcano monitoring (RSAM, DSAR, SSAM).
- features.feature_base.FeatureBaseClass
- features.rsam.RSAM
-
Compute RSAM as the mean of the absolute value of a signal filtered
- features.rsam.rsam_wideband_energy_ratio()
- features.dsar.DSAR
-
DSAR is the ratio of
- features.ssam.SSAM
-
SSAM is basically the same as computing a spectrogram. Data are split into
- features.spectral_features.SpectralFeatures
- features.cpxtrace.Inst_Band
-
Computes the instantaneous bandwidth of the given data which can be
- features.cpxtrace.Inst_Freq
-
Computes the instantaneous frequency of the given data which can be
- features.cpxtrace.Norm_Env
-
Computes the normalized envelope of the given data which can be
- features.cpxtrace.Centroid
-
Computes the centroid time of the given data which can be windowed or
- features.cpxtrace.WindowCentroid
-
Computes the centroid of a given time window,
- features.util.stride_windows()
-
Get all windows of x with length n as a single array,
- features.util.demean()
-
Return x minus the mean(x).
- features.util.apply_hanning()
-
Apply a hanning window to the given 1D or 2D array along
- features.util.window_array()
-
Take a 1-D numpy array and devide it into (overlapping)
- features.util.trace_window_times()
-
Subdivide an
obspy.core.trace.Traceinto windows ofwindow_len - features.util.trace_window_data()
-
Subdivide an
obspy.core.trace.Traceinto windows ofinterval - features.util.apply_freq_filter()
-
Apply frequency filter to seismic data.
- features.util.round_time()
-
Find closest multiple of interval to time.
- features.util.stack_feature()
-
Stack features in a dataarray.
- features.visualise.spectrogram_preprocessing()
- features.visualise.plot_ssam_mpl()
-
Plot spectrogram data using matplotlib.
- features.visualise.multi_feature_plot_mpl()
-
Plot two features in one figure. 2D features have to be plotted first.
- features.visualise.plot_ssam_plotly()
-
Plot spectrogram data using matplotlib.
- features.visualise.get_trace()
-
Return a plotly graphics object from a feature.
- features.visualise.multi_feature_plot()
-
Return a combined time-series plot of two features.
- features.get_data()
-
Return path to aitana.features package.
aitana.anomaly
Anomaly detection in time-series data.
- anomaly.anomaly_base.AnomalyDetectionBaseClass
- anomaly.anomaly_base.min_max_scale_netcdf()
- anomaly.pca.PCA
- anomaly.pca.runPca()
- anomaly.pca.runPcaCore()
- anomaly.pca.ModelException
- anomaly.matrix_profile.MatrixProfile
-
Score how unlike its own past each subsequence of a time series is.
- anomaly.snet.SNet
- anomaly.autoencoder.AutoEncoder
- anomaly.autoencoder.TiedAutoEncoder
-
Applies an tied-weight autoencoder to the incoming data.
- anomaly.autoencoder.FuzzyCluster
- anomaly.anomaly_base.MinMaxScale
-
Fill gaps with the median and scale each feature column to [0, 1].
- anomaly.evaluation.inject_faults()
-
Inject synthetic faults into a DataFrame for anomaly detection evaluation.
- anomaly.evaluation.inject_change_points()
-
Inject persistent regime shifts (change points) into a DataFrame.
- anomaly.evaluation.simulate_regime_series()
-
Generate a synthetic multivariate time series stitched from discrete regimes.
- anomaly.evaluation.quiet_series()
-
Generate a quiet background: a repeating template plus small noise.
- anomaly.evaluation.score_detector()
-
Score a detector against the fault-injection ground-truth mask.
aitana.storage
Store time series data as HDF5 (netCDF) or Zarr files and access them through an API.
- storage.storage.Storage
-
Query computed features
- storage.storage.Path
- storage.storage.AitanaDataset
-
PyTorch Dataset of features from a store.
- storage.storage.SliceBatchSampler
-
Batch sampler that yields slices of consecutive sample indices.
- storage.ingest.IngestWorker
- storage.ingest.enqueue_dataset()
-
Enqueue a dataset for ingestion.
- storage.api.StorageAPI
- storage.api.parse_path()
-
Split a comma-separated path string into (group, subdir_list).
- storage.xarray2netcdf.xarray2netcdf()
-
Store an xarray dataset as an HDF5 file.
- storage.xarray2zarr.xarray2zarr()
-
Write xarray dataset to zarr files.
- storage.xarray2zarr.PathNotFoundError
- storage.grafana_annotations.sync_labels()
-
Bring the label annotations in Grafana and the stored labels in step.
- storage.grafana_annotations.is_label()
-
Whether tags mark an annotation as a
label:label. - storage.utils.generate_test_data()
-
Generate a 1D or 2D feature for testing.
- storage.utils.round_datetime()
-
Find closest multiple of interval to given time.
- storage.utils.floor_datetime()
-
Floor a datetime to the latest multiple of a given interval.
- storage.utils.get_dt()
-
Infer the sampling interval of a time axis.
- storage.utils.snap_to_grid()
-
Round time stamps to the nearest point of a regular grid.
- storage.utils.fill_time_gaps()
-
Fill gaps in time series with NaN values by reindexing to a complete datetime range.
- storage.utils.merge_arrays()
-
Merge two xarray datasets with the same datetime index.
- storage.get_data()
-
Return path to aitana.storage package.
aitana.pipelines
Reproducible workflows that run and evaluate aitana components for volcano monitoring.
- pipelines.cli.WorkflowDescriptor
- pipelines.cli.PipelineBackend
- pipelines.cli.SnakemakeBackend
- pipelines.cli.PipelineError
- pipelines.cli.discover_workflows()
- pipelines.cli.run()
-
Run the workflow registered for a volcano.
- pipelines.cli.clean()
-
Delete the outputs of a volcano’s workflow, chosen with
--workflowif it has several. - pipelines.cli.list_workflows()
-
List all registered workflows.
- pipelines.scoring.get_evaluation_windows()
-
Get the evaluation windows for the forecasted rates.
- pipelines.scoring.compute_rates()
-
Compute the forecasted rates for positive and negative windows.
- pipelines.scoring.evaluate_threshold()
-
Evaluate the number of true positives, false positives, true negatives and false negatives for a given threshold.
- pipelines.scoring.get_roc_curve()
-
Compute the ROC curve for a given model and thresholds.
- pipelines.scoring.make_strictly_increasing()
-
Make a sequence strictly increasing. Some of the ROC curves computed with
- pipelines.visualise.set_style()
- pipelines.visualise.trellis_plot()
-
Create a trellis plot for the given models and data.
- pipelines.visualise.scoring_plot()
-
Plot the forecast probabilities and the evaluation windows.
- pipelines.get_data()
-
Get path to bundled data in the aitana.pipelines package (workflow files, etc.).
aitana.testing
Synthetic seismic waveforms with known spectral content for testing aitana packages.
- testing.synthetic.synthetic_trace()
-
Produce a test signal for which we know where the peaks