File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -51,15 +51,17 @@ def calibrate
51
51
52
52
# Force recalibration and update all attributes accordingly
53
53
def recalibrate
54
- return nil unless c14_age . present? && c14_error . present? && c14_curve . present?
54
+ return nil unless c14_age . present? && c14_error . present? && c14_curve . present?
55
55
56
56
logger . info "Calibrating #{ { c14_age : c14_age , c14_error : c14_error , c14_curve : c14_curve } } "
57
57
calibration = Calibrator ::Calibration . new ( c14_age , c14_error , c14_curve )
58
58
59
- self . taq = calibration . hd_intervals . map { |i | i [ "begin" ] } . max
60
- self . tpq = calibration . hd_intervals . map { |i | i [ "end" ] } . min
61
- # TODO: terrible, but currently unused, so...
62
- self . centre = self . tpq + ( ( self . taq - self . tpq ) / 2 )
59
+ return nil unless calibration . hd_intervals . present?
60
+
61
+ self . taq = calibration . hd_intervals . map { |i | i [ "begin" ] } . max
62
+ self . tpq = calibration . hd_intervals . map { |i | i [ "end" ] } . min
63
+ # TODO: terrible, but currently unused, so...
64
+ self . centre = self . tpq + ( ( self . taq - self . tpq ) / 2 )
63
65
64
66
# Not persisted
65
67
self . prob_dist = calibration . prob_dist
You can’t perform that action at this time.
0 commit comments