Quickstart#

An interactive session with IOSACal in Jupyter Notebook is the best way to get familiar with the software and create beautiful reports that are also self-explaining. Reproducible science![1]

This is the standard import needed to start working with IOSACal and Jupyter Notebook:

from iosacal import R, combine, iplot
%matplotlib inline

Radiocarbon data#

Now define three radiocarbon determinations and combine them:

rs = [R(3320, 65, 'LTL-32131'), R(3320,65,'LTL-123414'), R(3325,55,'LRS-8384')]
cr = combine(rs)
print(cr)
RadiocarbonDetermination( Combined from LTL-32131, LTL-123414, LRS-8384 with test statistic 0.005 : 3322 ± 35 )

Now that we have a combined age, calibrate it using the IntCal20 curve:

calcr = cr.calibrate('intcal20')

The calibrated date can be plotted as normal:

iplot(calcr)
_images/82cde5123db585b4ed9d9a77f9ab5835486d16fe670e2ea4a1f80457080a012d.png

Multiple dates#

IOSACal can plot multiple dates for comparing, and you can use Python as normal

rs = [R(7729, 80, "P-1365"),
      R(7661, 99, "P-1375"),
      R(7579, 86, "P-827"),
      R(7572, 92, "P-772"),
      R(7538, 89, "P-778"),
      R(7505, 93, "P-769")]
multiple = [r.calibrate('intcal13') for r in rs]

It’s also possible to change Matplotlib settings without need to edit the underlying source code:

import matplotlib.pyplot as plt
plt.style.use('ggplot')

And create the resulting plot:

iplot(multiple)
_images/aa783d750a012497d6f133c04e4737a115a9871851eb762f330169986a569114.png

Any plot can be saved directly to a file on disk, if needed:

This was a quick tour of IOSACal used interactively in Jupyter. Thank you!