{ "cells": [ { "cell_type": "markdown", "id": "5fca9723", "metadata": {}, "source": [ "# IOSACal: open source radiocarbon calibration\n", "\n", "IOSACal is an open source tool for radiocarbon calibration. It has a\n", "command-line program:\n", "\n", "```console\n", "$ iosacal -d 7505 -s 93 --id \"P-769\"\n", "```\n", "\n", "which also creates nice plots like this:" ] }, { "cell_type": "code", "execution_count": null, "id": "85242c1b", "metadata": {}, "outputs": [], "source": [ "from iosacal import R, iplot\n", "r = R(7505, 93, 'P-769')\n", "cal_r = r.calibrate('intcal20')\n", "iplot(cal_r)" ] }, { "cell_type": "markdown", "id": "d802dbd0", "metadata": {}, "source": [ "The same features are available as a Python 3 library:" ] }, { "cell_type": "code", "execution_count": null, "id": "e5de49b6", "metadata": {}, "outputs": [], "source": [ "from iosacal import R\n", "from iosacal.text import single_text\n", "r = R(7505, 93, 'P-769')\n", "cal_r = r.calibrate('intcal20')\n", "print(single_text(cal_r))" ] }, { "cell_type": "markdown", "id": "f119d786", "metadata": {}, "source": [ "Multiple determinations from the same event can be checked for consistency and combined:" ] }, { "cell_type": "code", "execution_count": null, "id": "9e1ea502", "metadata": {}, "outputs": [], "source": [ "from iosacal import R, combine\n", "from iosacal.text import single_text\n", "\n", "r1 = R(4430, 100, 'Birm-637')\n", "r2 = R(4430, 120, 'Birm-638')\n", "r3 = R(4400, 100, 'Birm-639')\n", "r4 = R(4350, 130, 'Birm-636')\n", "r_combined = combine([r1, r2, r3, r4])\n", "print(r_combined)" ] }, { "cell_type": "code", "execution_count": null, "id": "4460cd3f", "metadata": {}, "outputs": [], "source": [ "r_combined_cal = r_combined.calibrate('intcal13')\n", "print(single_text(r_combined_cal))" ] }, { "cell_type": "markdown", "id": "19c862c4", "metadata": {}, "source": [ "Radiocarbon determinations can be simulated for known calendar \n", "dates and expected measurement error to test hypotheses and models:" ] }, { "cell_type": "code", "execution_count": null, "id": "bf7d41f8", "metadata": {}, "outputs": [], "source": [ "from iosacal import R, combine, simulate\n", "from iosacal.text import single_text\n", "r1 = simulate(710, 28, 'Heid.inv. Arab. 2 (target 1)', 'intcal20')\n", "r2 = simulate(710, 28, 'Heid.inv. Arab. 2 (target 2)', 'intcal20')\n", "r3 = simulate(710, 28, 'Heid.inv. Arab. 2 (target 3)', 'intcal20')\n", "r_combined = combine([r1, r2, r3])\n", "print(r_combined)\n" ] }, { "cell_type": "code", "execution_count": null, "id": "6d2477fb", "metadata": {}, "outputs": [], "source": [ "r_combined_cal = r_combined.calibrate('intcal20')\n", "print(single_text(r_combined_cal, BP='ce'))" ] }, { "cell_type": "markdown", "id": "259adab9", "metadata": {}, "source": [ "IOSACal can be used interactively with Jupyter Notebook (formerly known as IPython Notebook). This page is generated by a Jupyter notebook! This page is generated from a Jupyter Notebook[^download].\n", "[^download]: This notebook can be downloaded as {nb-download}`index.ipynb`." ] }, { "cell_type": "markdown", "id": "f6d90823", "metadata": {}, "source": [ "## Why another 14C calibration software ?\n", "\n", "Most available programs for radiocarbon calibration, like OxCal, CALIB and others, are *freeware*. You don't have to pay for them, but on the other side you're not free to modify them as you need, nor to access and study the source code.\n", "\n", "This is the main motivation behind IOSACal: creating a free-as-in-freedom radiocarbon calibration software, with a clean programming library, that enables experiments and integration in existing archaeological information systems.\n", "\n", "Furthermore, writing this software from scratch is an alternative way of learning how 14C calibration works, not only in strict mathematical terms, but also from a practical point of view.\n" ] }, { "cell_type": "markdown", "id": "35db3730", "metadata": {}, "source": [ "# Can I use IOSACal for my research?\n", "\n", "Yes, IOSACal has been used in research projects with large numbers of radiocarbon dates like [Antarctica Marine Radiocarbon](http://marine.antarctica.ice-d.org/) and the [IPHES PALEODEOM project](https://github.com/PALEODEM/Palaeo-demographic-models). See the [list of publications](literature.txt).\n", "\n", "Using IOSACal with Jupyter Notebooks is ideal for reproducible research that can be easily shared.\n", "\n", "Furthermore, it takes little effort to customize and adapt the existing code to your specific needs.\n", "\n", "IOSACal is reasonably fast, especially for batch processing.\n", "\n", "If you make use of IOSACal in your work, please cite it with the [IOSACal Zenodo record](https://doi.org/10.5281/zenodo.630455).\n", "\n", "This helps us get some recognition for creating and maintaining this software free for everyone." ] }, { "cell_type": "markdown", "id": "1a2823d3", "metadata": {}, "source": [ "```{toctree}\n", ":hidden:\n", "install\n", "how\n", "```" ] }, { "cell_type": "markdown", "id": "5ba962d2-eec4-42a2-b20e-fe89182182d9", "metadata": {}, "source": [ "```{toctree}\n", ":caption: Tutorials\n", ":hidden:\n", "load_dates_from_file\n", "```" ] }, { "cell_type": "markdown", "id": "708c317f", "metadata": {}, "source": [ "```{toctree}\n", ":caption: How-to guides\n", ":hidden:\n", "quickstart\n", "quantiles_demo\n", "google_colab\n", "```" ] }, { "cell_type": "markdown", "id": "f87eeecd-76fd-4370-8e7b-3b4bbd3c8707", "metadata": {}, "source": [ "```{toctree}\n", ":caption: Reference\n", ":hidden:\n", "literature\n", "resources\n", "```" ] }, { "cell_type": "markdown", "id": "b6a9163d", "metadata": {}, "source": [ "```{toctree}\n", ":caption: Development\n", ":hidden:\n", "contributing\n", "whatsnew\n", "license\n", "Codeberg repo \n", "```" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.1" } }, "nbformat": 4, "nbformat_minor": 5 }