GithubHelp home page GithubHelp logo

calibrator's Introduction

calibrator

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

Calibrator is a small c++ command line tool to calibrate 14C dates. In can process inputs in csv, json or as cli parameters, and it outputs csv or json, that can be piped into a file.

Usage

Allowed arguments:
  -h [ --help ]               Produce this help message.
  -i [ --input-file ] arg     Specifies input file.
  -b [ --bp ] arg             The BP Value.
  -s [ --std ] arg            The standard deviation.
  -j [ --json-string ] arg    Input as as JSON string. Format: {"bp": xx, 
                              "std": xx}
  -r [ --ranges ]             calculate sigma ranges (only for json output).
  --sum                       calculate sum probability.
  -o [ --output ] arg (=json) csv for csv-output, json for json (default).

Examples

./calibrator -b 5000 -s 50
./calibrator -i input_test.txt
./calibrator -i input_test2.txt
./calibrator -i input_test3.csv

Documentation

See doxygen docu.

calibrator's People

Contributors

martinhinz avatar nevrome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

calibrator's Issues

Documentation of the input formats

Currently, the input formats are only documented via the example files. That is not desirable. Should write a more verbose explanation what the calibrator expects in terms of data structure.

Handle arbitrary calibration curves

Currently, at runtime, the calibration curve ../data/intcal13.14c is loaded. This cause an error when the bin is run outside of its directory. This is not a good behaviour.

  1. Import the CalCurve at compile time (but than we loose the ability to use newer cal curves)?
  2. Add a switch to specify a CalCurve at runtime, defaulting to the one shipped with the calibrator.

I would rather go for option 2.

Build issue

I just tried to make calibrator on Ubuntu 18.04.5 LTS x86_64, with GNU Make 4.1 and g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 and get the following error:

$ make
 build/uncal_date_list.o build/main.o build/cal_date_list.o build/sigma_range.o build/uncal_date.o build/cal_curve.o build/cal_date.o
 g++ -O2 -g -Wall -std=c++11 -fmessage-length=0 -I ~/boost -c -o build/main.o src/main.cpp
In file included from src/../include/sigma_range.h:22:0,
                 from src/../include/cal_date.h:23,
                 from src/../include/uncal_date.h:23,
                 from src/main.cpp:13:
src/../include/json.hpp: In function ‘bool nlohmann::operator<(nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType>::const_reference, nlohmann::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType>::const_reference)’:
src/../include/json.hpp:5539:62: error: wrong number of template arguments (1, should be 2)
                     return *lhs.m_value.array < *rhs.m_value.array;
                                                              ^~~~~
In file included from src/../include/json.hpp:33:0,
                 from src/../include/sigma_range.h:22,
                 from src/../include/cal_date.h:23,
                 from src/../include/uncal_date.h:23,
                 from src/main.cpp:13:
/usr/include/c++/7/array:94:12: note: provided for ‘template<class _Tp, long unsigned int _Nm> struct std::array’
     struct array
            ^~~~~
Makefile:23: recipe for target 'build/main.o' failed
make: *** [build/main.o] Error 1

It did work for me in the past on another system, so I assume it's some sort of dependency issue? Any ideas, @MartinHinz?

Location of the example files

Currently, the example datasets are stored in the bin-folder. That is probably not desirable. Might be necessary to find another location. Probably /examples or /test_data, or simply /data, where currently the calibration curve is living? I opt for the latter option.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.