Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- getRelevantCalCurveSegment :: UncalC14 -> CalCurveBP -> CalCurveBP
- prepareCalCurveSegment :: Bool -> CalCurveBP -> CalCurveBCAD
- makeCalCurveMatrix :: UncalPDF -> CalCurveBCAD -> CalCurveMatrix
- uncalToPDF :: UncalC14 -> UncalPDF
- calibrateDate :: CalibrateDatesConf -> CalCurveBP -> UncalC14 -> Either CurrycarbonException CalPDF
- calibrateDates :: CalibrateDatesConf -> CalCurveBP -> [UncalC14] -> [Either CurrycarbonException CalPDF]
- refineCalDates :: [CalPDF] -> [Either CurrycarbonException CalC14]
- refineCalDate :: CalPDF -> Either CurrycarbonException CalC14
- data CalibrateDatesConf = CalibrateDatesConf {}
- defaultCalConf :: CalibrateDatesConf
- data AgeSamplingConf = AgeSamplingConf {}
- sampleAgesFromCalPDF :: AgeSamplingConf -> CalPDF -> Either CurrycarbonException RandomAgeSample
Calibration functions
getRelevantCalCurveSegment :: UncalC14 -> CalCurveBP -> CalCurveBP Source #
Take an uncalibrated date and a raw calibration curve and return the relevant segment of the calibration curve
prepareCalCurveSegment :: Bool -> CalCurveBP -> CalCurveBCAD Source #
Modify a calibration curve (segment) with multiple optional steps, including interpolation and transforming dates to BC/AD format
makeCalCurveMatrix :: UncalPDF -> CalCurveBCAD -> CalCurveMatrix Source #
Construct a matrix representation of a calibration curve for a given date
uncalToPDF :: UncalC14 -> UncalPDF Source #
Transform an uncalibrated date to an uncalibrated probability density table
:: CalibrateDatesConf | Configuration options to consider |
-> CalCurveBP | A calibration curve |
-> UncalC14 | An uncalibrated radiocarbon date |
-> Either CurrycarbonException CalPDF | The function returns either an exception if the
calibration failed for some reason, or a |
Calibrates a date with the provided calibration curve
:: CalibrateDatesConf | Configuration options to consider |
-> CalCurveBP | A calibration curve |
-> [UncalC14] | A list of uncalibrated radiocarbon dates |
-> [Either CurrycarbonException CalPDF] | The function returns a list for each input date, with
either an exception if the calibration failed for some
reason, or a |
Calibrates a list of dates with the provided calibration curve
refineCalDates :: [CalPDF] -> [Either CurrycarbonException CalC14] Source #
Transforms the raw, calibrated probability density table to a meaningful representation of a calibrated radiocarbon date
data CalibrateDatesConf Source #
A data type to cover the configuration options of the calibrateDates function
CalibrateDatesConf | |
|
Instances
Show CalibrateDatesConf Source # | |
Defined in Currycarbon.Calibration.Calibration showsPrec :: Int -> CalibrateDatesConf -> ShowS # show :: CalibrateDatesConf -> String # showList :: [CalibrateDatesConf] -> ShowS # | |
Eq CalibrateDatesConf Source # | |
Defined in Currycarbon.Calibration.Calibration (==) :: CalibrateDatesConf -> CalibrateDatesConf -> Bool # (/=) :: CalibrateDatesConf -> CalibrateDatesConf -> Bool # |
defaultCalConf :: CalibrateDatesConf Source #
A default configuration that should yield almost identical calibration results to the Bchron R package
data AgeSamplingConf Source #
A data type to define the settings for age sampling
AgeSamplingConf | |
|
Instances
Show AgeSamplingConf Source # | |
Defined in Currycarbon.Calibration.Calibration showsPrec :: Int -> AgeSamplingConf -> ShowS # show :: AgeSamplingConf -> String # showList :: [AgeSamplingConf] -> ShowS # | |
Eq AgeSamplingConf Source # | |
Defined in Currycarbon.Calibration.Calibration (==) :: AgeSamplingConf -> AgeSamplingConf -> Bool # (/=) :: AgeSamplingConf -> AgeSamplingConf -> Bool # |
sampleAgesFromCalPDF :: AgeSamplingConf -> CalPDF -> Either CurrycarbonException RandomAgeSample Source #
Draw random samples from a probability density table