An experimental radiocarbon calibration module written in and for Haskell. Comes with a small CLI app to run calibration on the commandline.
The Haskell library is not on Hackage yet. Some documentation for the dev version can be found here: https://nevrome.github.io/currycarbon
For stable release versions we automatically prepare binaries that can be downloaded and run.
You can download them here: [ Linux 📥 | macOS 📥 | Windows 📥 ]. Older release versions are available here.
Usage: currycarbon calibrate [DATES] [-i|--inputFile ARG]
[--calibrationCurveFile ARG] [-q|--quickOut]
[--densityFile ARG] [--hdrFile ARG]
[--calCurveSegmentFile ARG]
[--calCurveMatrixFile ARG]
Simple intercept calibration for one or multiple radiocarbon dates
Available options:
-h,--help Show this help text
DATES A string with one or multiple uncalibrated dates of
the form "<sample name>,<mean age BP>,<one sigma
standard deviation>;..." where <sample name> is
optional. So for example
"S1,4000,50;3000,25;S3,1000,20".
-i,--inputFile ARG A file with a list of uncalibrated dates. Formated
just as DATES, but with a new line for each input
date. DATES and --uncalFile can be combined and you
can provide multiple instances of --uncalFile
--calibrationCurveFile ARG
Path to an calibration curve file in .14c format. The
calibration curve will be read and used for
calibration. If no file is provided, currycarbon will
use the intcal20 curve.
-q,--quickOut Should a simple calibration result per sample be
printed to the command line?
--densityFile ARG Path to an output file which stores output densities
per sample and calender year
--hdrFile ARG Path to an output file which stores the high
probability density regions for each sample
--calCurveSegmentFile ARG
Path to an output file which stores the relevant,
interpolated calibration curve segment for the first
(!) input date in a long format. This option as well
as --calCurveMatrixFile are mostly meant for
debugging
--calCurveMatrixFile ARG Path to an output file which stores the relevant,
interpolated calibration curve segment for the first
(!) input date in a wide matrix format
To install the latest development version you can follow these steps:
- Install the Haskell build tool Stack
- Clone the repository
- Execute
stack installinside the repository to build the tool and automatically copy the executables to~/.local/bin(which you may want to add to your path). This will install the compiler and all dependencies into folders that won't interfere with any installation you might already have.
The Github Actions script in .github/workflows/release.yml registers a new draft release and automatically builds and uploads currycarbon binaries when a new Git tag with the prefix v* is pushed.
# locally register a new tag (e.g. 0.3.1)
git tag -a v0.3.1 -m "see CHANGELOG.md"
# push tag
git push origin v0.3.1In case of a failing build delete the tag and the release draft on Github and then delete the tag locally with
git tag -d v0.3.1before rerunning the procedure above.
stack build --profile
stack exec --profile -- currycarbon calibrate "5000+200;5000+200;5000+200;5000+200;5000+200;5000+200;5000+200;5000+200" -q +RTS -p