https://github.com/joeroe/ruby-radiocarbon
Ruby gem for fast radiocarbon calibration
https://github.com/joeroe/ruby-radiocarbon
radiocarbon radiocarbon-calibration radiocarbon-dates ruby
Last synced: 10 months ago
JSON representation
Ruby gem for fast radiocarbon calibration
- Host: GitHub
- URL: https://github.com/joeroe/ruby-radiocarbon
- Owner: joeroe
- License: mit
- Created: 2023-03-30T14:29:12.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T10:23:12.000Z (over 2 years ago)
- Last Synced: 2025-08-12T00:24:48.472Z (11 months ago)
- Topics: radiocarbon, radiocarbon-calibration, radiocarbon-dates, ruby
- Language: Ruby
- Homepage: https://rubydoc.info/github/joeroe/ruby-radiocarbon
- Size: 90.8 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ruby-radiocarbon
[](https://rubygems.org/gems/radiocarbon)
[](https://rubygems.org/gems/radiocarbon)
[](https://github.com/joeroe/ruby-radiocarbon/actions/workflows/tests.yml)
[](https://coveralls.io/github/joeroe/ruby-radiocarbon?branch=main)
A Ruby gem for fast radiocarbon calibration.
Full documentation can be found [at RubyDoc](https://rubydoc.info/github/joeroe/ruby-radiocarbon).
## Installation
Install the latest release [from RubyGems](https://rubygems.org/gems/radiocarbon):
```
gem install radiocarbon
```
Or by add it to your project's Gemfile:
```
gem 'radiocarbon', '~> 0.1.0'
```
## Usage
As a Ruby library:
```ruby
# 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](https://choosealicense.com/licenses/mit/)