Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- readCalibrationMethod :: String -> Either String CalibrationMethod
- parseCalibrationMethod :: Parser CalibrationMethod
- renderCalDatePretty :: Bool -> (CalExpr, CalPDF, CalC14) -> String
- renderCalExpr :: CalExpr -> String
- spaceChar :: Char -> Parser Char
- add :: Parser CalExpr
- mul :: Parser CalExpr
- parens :: Parser CalExpr
- factor :: Parser CalExpr
- term :: Parser CalExpr
- expr :: Parser CalExpr
- readCalExpr :: String -> Either String [CalExpr]
- readCalExprFromFile :: FilePath -> IO [CalExpr]
- writeCalC14s :: FilePath -> [CalC14] -> IO ()
- writeCalC14 :: FilePath -> CalC14 -> IO ()
- appendCalC14 :: FilePath -> CalC14 -> IO ()
- renderCalC14ForFile :: CalC14 -> String
- renderCalC14s :: [CalC14] -> String
- renderCalC14 :: CalC14 -> String
- renderCalRangeSummary :: CalRangeSummary -> String
- renderYearBCAD :: YearBCAD -> String
- renderHDRsForFile :: [HDR] -> [(String, String)]
- renderHDRForFile :: HDR -> (String, String)
- renderHDRs :: [HDR] -> String
- renderHDR :: HDR -> String
- writeCalCurveMatrix :: FilePath -> CalCurveMatrix -> IO ()
- renderCalCurveMatrix :: CalCurveMatrix -> String
- writeCalPDFs :: FilePath -> [CalPDF] -> IO ()
- writeCalPDF :: FilePath -> CalPDF -> IO ()
- appendCalPDF :: FilePath -> CalPDF -> IO ()
- renderCalPDFs :: [CalPDF] -> String
- renderCalPDF :: CalPDF -> String
- data PlotSymbol
- renderCLIPlotCalPDF :: Bool -> Int -> Int -> CalPDF -> CalC14 -> String
- renderUncalC14WithoutName :: UncalC14 -> String
- renderUncalC14 :: UncalC14 -> String
- readUncalC14FromFile :: FilePath -> IO [UncalC14]
- readUncalC14 :: String -> Either String [UncalC14]
- parseUncalC14 :: Parser UncalC14
- writeCalCurve :: FilePath -> CalCurveBCAD -> IO ()
- renderCalCurve :: CalCurveBCAD -> String
- readCalCurveFromFile :: FilePath -> IO CalCurveBP
- readCalCurve :: String -> CalCurveBP
- parseCalCurve :: Parser [(YearBP, YearBP, YearRange)]
- parseCalCurveLine :: Parser (YearBP, YearBP, YearRange)
- comments :: Parser String
Parsing, rendering and writing functions
This module contains a number of functions to manage data input and output plumbing for different datatypes
:: Bool | Should the CLI plot be restricted to (boring) ASCII symbols? |
-> (CalExpr, CalPDF, CalC14) | |
-> String |
Combine CalExpr
, CalPDF
and CalC14
to render pretty command line output
like this:
DATE: (5000±30BP + 5100±100BP) Calibrated: 4150BC >> 3941BC > 3814BC < 3660BC << 3651BC 1-sigma: 3941-3864BC, 3810-3707BC, 3667-3660BC 2-sigma: 4150-4148BC, 4048-3651BC ▁ ▒▁ ▁▁ ▁▁▁ ▁▒▒▁▒▒ ▁▁▒▒▒ ▒▒▒▒▒▒ ▁▁▒▒▒▒▒▁▁▁▁▒▒▒▒▒▒▁ ▁ ▁▁▁▁▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▁▒▁ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▁▁▁▁▁▁▁▁ -4330 ┄──┬─────┬─────┬─────┬──────┬─────┬─────┬─────┬─────┄ -3530 > > ^ < ────── ──────── ── ─ ──────────────────────────
renderCalExpr :: CalExpr -> String Source #
writeCalC14s :: FilePath -> [CalC14] -> IO () Source #
Write CalC14
s to the file system. The output file is a long .csv file with the following structure:
sample,hdrSigma,hdrStartBCAD,hdrStopBCAD Sample1,1,-3797,-3709 Sample1,1,-3894,-3880 Sample1,2,-3680,-3655 Sample1,2,-3810,-3700 Sample1,2,-3941,-3864 Sample2,1,-1142,-1130 Sample2,1,-1173,-1161 Sample2,1,-1293,-1194 Sample2,1,-1368,-1356 Sample2,2,-1061,-1059 Sample2,2,-1323,-1112 Sample2,2,-1393,-1334
renderCalC14ForFile :: CalC14 -> String Source #
renderCalC14s :: [CalC14] -> String Source #
renderCalC14 :: CalC14 -> String Source #
renderYearBCAD :: YearBCAD -> String Source #
renderHDRs :: [HDR] -> String Source #
writeCalCurveMatrix :: FilePath -> CalCurveMatrix -> IO () Source #
writeCalPDFs :: FilePath -> [CalPDF] -> IO () Source #
Write CalPDF
s to the file system. The output file is a long .csv file with the following structure:
sample,calBCAD,density ... Sample1,-1391,2.8917924e-4 Sample1,-1390,3.3285577e-4 Sample1,-1389,3.5674628e-4 Sample1,-1388,3.750703e-4 ... Sample2,-3678,1.8128564e-3 Sample2,-3677,1.9512239e-3 Sample2,-3676,2.0227064e-3 Sample2,-3675,2.095691e-3 ...
renderCalPDFs :: [CalPDF] -> String Source #
renderCalPDF :: CalPDF -> String Source #
renderUncalC14 :: UncalC14 -> String Source #
readUncalC14FromFile :: FilePath -> IO [UncalC14] Source #
Read uncalibrated radiocarbon dates from a file. The file should feature one radiocarbon date per line in the form "<sample name>,<mean age BP>,<one sigma standard deviation>", where <sample name> is optional. A valid file could look like this:
Sample1,5000,30 6000,50 Sample3,4000,25
writeCalCurve :: FilePath -> CalCurveBCAD -> IO () Source #
renderCalCurve :: CalCurveBCAD -> String Source #
readCalCurve :: String -> CalCurveBP Source #