Skip to main content

An Open Source Python package for TEX86 calibration

Project description

An Open Source Python package for TEX86 calibration.

This package is based on the original BAYSPAR (BAYesian SPAtially-varying Regression) for MATLAB (

Quick example

First, load key packages and an example dataset:

import numpy as np
import bayspar as bsr

example_file = bsr.get_example_data('castaneda2010.csv')
d = np.genfromtxt(example_file, delimiter=',', names=True)

This dataset (from Castañeda et al. 2010) has two columns giving sediment age (calendar years BP) and TEX86.

We can make a “standard” prediction of sea-surface temperature (SST) with predict_seatemp():

prediction = bsr.predict_seatemp(d['tex86'], lon=34.0733, lat=31.6517,
                                 prior_std=6, temptype='sst')

To see actual numbers from the prediction, directly parse prediction.ensemble or use prediction.percentile() to get the 5%, 50% and 95% percentiles.

You can also plot your prediction with bsr.predictplot() or bsr.densityplot().

For further details, examples, and additional prediction functions, see the online documentation (


To install baysparpy with pip, run:

$ pip install git+git://

Unfortunately, baysparpy is not compatible with Python 2.

Support and development


baysparpy is available under the Open Source GPLv3 (

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for baysparpy, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size baysparpy-0.0.3-py3-none-any.whl (49.4 MB) File type Wheel Python version py3 Upload date Hashes View
Filename, size baysparpy-0.0.3.tar.gz (49.4 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page