Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- renderCalDatesPretty :: [(UncalC14, CalPDF, CalC14)] -> String
- renderCalDatePretty :: (UncalC14, CalPDF, CalC14) -> String
- readCalibrationMethod :: String -> Either String CalibrationMethod
- parseCalibrationMethod :: Parser CalibrationMethod
- writeCalC14s :: FilePath -> [CalC14] -> IO ()
- writeCalC14 :: FilePath -> CalC14 -> IO ()
- appendCalC14 :: FilePath -> CalC14 -> IO ()
- renderCalC14ForFile :: CalC14 -> String
- renderCalC14s :: [CalC14] -> String
- renderCalC14 :: CalC14 -> 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
- renderCLIPlotCalPDF :: Int -> Int -> CalPDF -> 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
renderCalDatesPretty :: [(UncalC14, CalPDF, CalC14)] -> String Source #
Combine UncalC14
, CalPDF
and CalC14
to render pretty command line output
like this:
Sample: 1 ~> [5000±30BP] 1-sigma: 3894-3880BC, 3797-3709BC 2-sigma: 3941-3864BC, 3810-3700BC, 3680-3655BC *** *'''** ***** *** *''''''***
'''''* ******'''* '''''''''''''''' ** *''''''''''** **''''''''''''''''* **''* ***'''''''''''''********
'''''''''''''''''''***
'''''** -3960 <~~~~~~~~~|~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~|~~~~~~~~~~> -3640
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 #
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 #