ISAAKiel / oxcAAR

R Package - Interaction with Oxcal
GNU General Public License v2.0
21 stars 4 forks source link

oxcAAR crashes for large ages and/or very low precisions #24

Closed MartinHinz closed 4 years ago

MartinHinz commented 5 years ago

Salvador Herrando-Perez wrote:

I have tried the new version, and the problem has been solved for the sigma thresholds stated in my first email, however the script continues to crash for large ages and/or very low precisions. For instance, for uncalibrated ages of 40, 50 and 60 ky, the crashing occurs at precisions somewhere within intervals 9 to 10, 1.7 to 1.8 and 6 to 7 ky, respectively.

MartinHinz commented 5 years ago

Actually, I can not confirm a proper crash. oxcAAR reacts in predictable manner to return an NA. Possible improvements of behaviour from my perspective:

  1. Return an warning, or even an error, if range exceeds cal curve.
  2. For derived methods (eg. calcurve_plot), also catch situation of missing sigma ranges.

Or could you please specify the kind of crash you are experiencing, and what the expected or desired reaction of the package should be?

Oxcal itself reacts in the following way, given 40000+-9000:

... ocd[1].likelihood.warning[0]="Warning! Date may extend out of range - 40000+/-9000BP"; ... ocd[1].likelihood.range[2][0]=["...", -34307.2, 95.4]; ... ocd[1].likelihood.comment[4]=" ... (95.4%) 34309BC"; ... ocd[1].likelihood.range[3][0]=["...", -31437.8, 99.7]; ... ocd[1].likelihood.start=-48049.5;

So it ignores everything before max cal curve range.

MartinHinz commented 4 years ago

Should be solved with b7b3a5e05b6819a444120c5e703888f50355b9d2.