From f983c6b5cf8c5a512af6288ba092b2f2b4d5dc4c Mon Sep 17 00:00:00 2001 From: Jim Bowring Date: Sun, 18 Aug 2019 07:47:50 +0200 Subject: [PATCH] Adds open system date footnotes. (#185) * fixes bug in conversion math for ar232Th_238Ufc * adds open system date footnotes * provides for java 8 --- pom.xml | 2 +- .../UPb_Redux/reports/ReportSettings.java | 2 +- .../ReportSpecificationsUTh_Carb.java | 7 ++++++- ...acySamplesImporterFromTSVFileUseries_Carb.java | 9 ++++----- .../reports/ReportSettingsInterface.java | 15 +++++++++++++++ 5 files changed, 27 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index fa25cbbf..3f78cd1d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ org.cirdles ET_Redux ET_Redux - 3.6.85 + 3.6.86 Successor to U-Pb_Redux https://cirdles.org 2006 diff --git a/src/main/java/org/earthtime/UPb_Redux/reports/ReportSettings.java b/src/main/java/org/earthtime/UPb_Redux/reports/ReportSettings.java index 11775143..e77b2dec 100644 --- a/src/main/java/org/earthtime/UPb_Redux/reports/ReportSettings.java +++ b/src/main/java/org/earthtime/UPb_Redux/reports/ReportSettings.java @@ -55,7 +55,7 @@ public class ReportSettings implements * report models upon opening in ET_Redux. */ private static transient int CURRENT_VERSION_REPORT_SETTINGS_UPB = 405; - private static transient int CURRENT_VERSION_REPORT_SETTINGS_UTH_Carb = 6029; + private static transient int CURRENT_VERSION_REPORT_SETTINGS_UTH_Carb = 6032; private static transient int CURRENT_VERSION_REPORT_SETTINGS_UTH_Ign = 6007; // Fields diff --git a/src/main/java/org/earthtime/dataDictionaries/reportSpecifications/ReportSpecificationsUTh_Carb.java b/src/main/java/org/earthtime/dataDictionaries/reportSpecifications/ReportSpecificationsUTh_Carb.java index f45c5a6b..e8d6ace8 100644 --- a/src/main/java/org/earthtime/dataDictionaries/reportSpecifications/ReportSpecificationsUTh_Carb.java +++ b/src/main/java/org/earthtime/dataDictionaries/reportSpecifications/ReportSpecificationsUTh_Carb.java @@ -52,7 +52,7 @@ public class ReportSpecificationsUTh_Carb extends ReportSpecificationsAbstract { "", "false", "false", "2", "true", "Date BP (detrital Th-corr.)", "false", "false" }, {"", "Open-System", "Date", "ka", "getRadiogenicIsotopeDateByName", RadDates.dateOpenSys.getName(), "ABS", - "", "false", "false", "2", "true", "", "false", "false" + "FN-8", "false", "false", "2", "true", "", "false", "false" }, // {"uncorrected", "delta234U", "initial", "", "getAnalysisMeasure", UThAnalysisMeasures.delta234Ui.getName(), "ABS", @@ -210,5 +210,10 @@ public class ReportSpecificationsUTh_Carb extends ReportSpecificationsAbstract { "Uncorrected, closed-system date calculated using the decay constants ,\n, and .\nDates reported as Before Present (BP)," + " where Present is the year 1950 CE.,\nand do not include uncertainties associated with decay constants."); + reportTableFootnotes.put(// + "FN-8", // + "Open system date calculated using the algorithm of Thompson (2003), with a production <234lossgain> of 234U\n" + + "of %" + + " and the 230Th <230lossgain> is calculated from relative alpha decay energies."); } } diff --git a/src/main/java/org/earthtime/projects/projectImporters/UThProjectImporters/ProjectOfLegacySamplesImporterFromTSVFileUseries_Carb.java b/src/main/java/org/earthtime/projects/projectImporters/UThProjectImporters/ProjectOfLegacySamplesImporterFromTSVFileUseries_Carb.java index 21c38fd9..43133f2a 100644 --- a/src/main/java/org/earthtime/projects/projectImporters/UThProjectImporters/ProjectOfLegacySamplesImporterFromTSVFileUseries_Carb.java +++ b/src/main/java/org/earthtime/projects/projectImporters/UThProjectImporters/ProjectOfLegacySamplesImporterFromTSVFileUseries_Carb.java @@ -265,15 +265,14 @@ use the output (e.g. D3) decay constants to calculate isotope ratios from the re myFraction.getRadiogenicIsotopeRatioByName(ratioName)// .setOneSigma(oneSigmaAbs); } else { - // column 15 is ar232Th_238Ufc * 10^5 ACTIVITY RATIO + // column 15 is ar232Th_238Ufc ACTIVITY RATIO ratioName = UThAnalysisMeasures.ar232Th_238Ufc.getName(); myFraction.getLegacyActivityRatioByName(ratioName)// - .setValue(readDelimitedTextCell(myFractionData.get(15)).// - movePointLeft(5)); + .setValue(readDelimitedTextCell(myFractionData.get(15))); - // column 16 is ar232Th_238Ufc * 10^5 uncertainty ACTIVITY RATIO + // column 16 is ar232Th_238Ufc uncertainty ACTIVITY RATIO // convert 2-sigma to 1-sigma - oneSigmaAbs = readDelimitedTextCell(myFractionData.get(16)).movePointLeft(5). + oneSigmaAbs = readDelimitedTextCell(myFractionData.get(16)). divide(new BigDecimal(2.0)); myFraction.getLegacyActivityRatioByName(ratioName)// .setOneSigma(oneSigmaAbs); diff --git a/src/main/java/org/earthtime/reports/ReportSettingsInterface.java b/src/main/java/org/earthtime/reports/ReportSettingsInterface.java index 1dfb57fd..d87dd64a 100644 --- a/src/main/java/org/earthtime/reports/ReportSettingsInterface.java +++ b/src/main/java/org/earthtime/reports/ReportSettingsInterface.java @@ -973,6 +973,21 @@ public default String[][] reportFractionsByNumberStyle(// long dateOfAnalysisMS = ((UThFraction) fractions.get(0)).getDateTimeMillisecondsOfAnalysis(); footNote = footNote.replace("", makeFormattedDate(dateOfAnalysisMS)); } + // Aug 2019 + BigDecimal pctLoss = ((UThFraction) fractions.get(0)).getPctLoss().getValue(); + // calculate constants f234 and f230 + double f234 = 1.0 - pctLoss.doubleValue() / 100.0; + double f230 = ((f234 - 1.0) * (4.754 * 234 / 4.184 / 230.0) + 1.0 + f234) / 2.0; + + if (footNote.contains("")) { + footNote = footNote.replace("", pctLoss.toPlainString()); + } + if (footNote.contains("<234lossgain>")) { + footNote = footNote.replace("<234lossgain>", f234 < 1.0 ? "loss" : "gain"); + } + if (footNote.contains("<230lossgain>")) { + footNote = footNote.replace("<230lossgain>", f230 < 1.0 ? "loss" : "gain"); + } }