Calibrator  0.1
Command line tool for 14C calibration
cal_date.h
Go to the documentation of this file.
1 
20 #ifndef _cal_date_h_
21 #define _cal_date_h_
22 
23 #include "sigma_range.h"
24 #include <iostream>
25 #include <vector>
26 #include "json.hpp"
27 #include <random>
28 
30 
31 using namespace std;
32 
33 class CalDate{
34  public:
35  CalDate(string name, vector<double> probabilities, vector<int> bp, int uncal_bp, int uncal_error, vector<int> full_bp, vector<double> full_probabilities);
36  CalDate(string name, vector<double> probabilities, vector<int> bp, int uncal_bp, int uncal_error);
37  CalDate();
38  void info()const;
39  json to_json();
40  string get_name();
41  void calculate_sigma_ranges();
42  vector<SigmaRange> get_sigma_ranges();
43  vector<int> get_full_bp();
44  vector<double> get_full_probabilities();
45  string to_csv();
46  private:
47  string _name;
48  int _uncal_bp;
49  int _uncal_error;
50  vector<double> _probabilities;
51  vector<int> _bp;
52  vector<double> _full_probabilities;
53  vector<int> _full_bp;
54  json prob_to_json();
55  json bp_to_json();
56  vector<SigmaRange> _sigma_ranges;
57  double LinearInterpolate(double y1, double y2, double mu);
58  vector<int> sigma_range_helper(double &prob);
59  json sigma_ranges_to_json() ;
60 };
61 
62 #endif
63 
nlohmann::json json
Definition: cal_date.h:29
Represents a calibrated date.
Definition: cal_date.h:33