Skip to content

Commit

Permalink
Adds open system date footnotes. (#185)
Browse files Browse the repository at this point in the history
* fixes bug in conversion math for ar232Th_238Ufc

* adds open system date footnotes

* provides for java 8
  • Loading branch information
bowring authored Aug 18, 2019
1 parent 6d5a38c commit f983c6b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<groupId>org.cirdles</groupId>
<artifactId>ET_Redux</artifactId>
<name>ET_Redux</name>
<version>3.6.85</version>
<version>3.6.86</version>
<description>Successor to U-Pb_Redux</description>
<url>https://cirdles.org</url>
<inceptionYear>2006</inceptionYear>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -210,5 +210,10 @@ public class ReportSpecificationsUTh_Carb extends ReportSpecificationsAbstract {
"Uncorrected, closed-system date calculated using the decay constants <lambda230>,\n<lambda234>, and <lambda238>.\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 <pctLoss>%"
+ " and the 230Th <230lossgain> is calculated from relative alpha decay energies.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/org/earthtime/reports/ReportSettingsInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,21 @@ public default String[][] reportFractionsByNumberStyle(//
long dateOfAnalysisMS = ((UThFraction) fractions.get(0)).getDateTimeMillisecondsOfAnalysis();
footNote = footNote.replace("<dateOfAnalysis>", 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("<pctLoss>")) {
footNote = footNote.replace("<pctLoss>", 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");
}

}

Expand Down

0 comments on commit f983c6b

Please sign in to comment.