Skip to content

joeroe/ruby-radiocarbon

Repository files navigation

ruby-radiocarbon

latest release on rubygems.org downloads from rubygems.org tests test coverage

A Ruby gem for fast radiocarbon calibration.

Full documentation can be found at RubyDoc.

Installation

Install the latest release from RubyGems:

gem install radiocarbon

Or by add it to your project's Gemfile:

gem 'radiocarbon', '~> 0.1.0'

Usage

As a Ruby library:

# Returns a calibrated radiocarbon date
c14_date = Radiocarbon::C14Date.new(age = 10000, error = 30)
cal_date = c14_date.calibrate()

# Returns the probability distribution of a calibrated date over the full
# range of the calibration curve
cal_date.pdist

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT