-
Notifications
You must be signed in to change notification settings - Fork 16
SHRIMP: Sub StdRadiogenicCols
This subroutine (which is solely for the Standard) places, row-by-row, formulae to calculate radiogenic (i.e. corrected for common Pb) ratios for Pb/U (and Pb/Th, as a proxy) in the StandardData sheet.
StdRadiogenicCols plaFirstDatRw, plaLastDatRw
plaFirstDatRw: Integer index number of the first row containing spot-by-spot data (for the Standard).
plaLastDatRw: Integer index number of the last row containing spot-by-spot data (for the Standard).
Values of type Boolean
pbTh, pbU
Values of type Integer
f, L, piNumDauPar
Values of type String
s, SA, sae, t, WtdMnA
Values of type Range
rw1, rw2, r4
The subroutine starts by determining the address of the column in which the row-by-row ["206Pb/238U calibr. const."] values will be found. In truth, this column occurs as the primary calibration constant for both Perm1 and Perm2, and as the secondary calibration constant in Perm4. However, Perm3 does not include a direct calculation of ["206Pb/238U calibr. const."], so this code incorporates an (isotopic) "kluge" where 208Pb*/232Th is substituted for 206Pb*/238U. It is important to note that this does not make sense in terms of portraying the data (e.g. on a Concordia diagram), but at the same time, it is clear that Ludwig did this Perm3-specific substitution deliberately, as will become clear from the following code.
Note also that all of this SQUID 2.50 code is predicated on the calculation of no more than one of each calibration constant (206Pb*/238U and/or 208Pb*/232Th), because in SQUID 2.50, the index isotope has already been uniquely specified by the user. This means that in due course, some of this code will require additional generalisation, with particular respect to Perm1 and catering for the possibility of 208-corrected data. The following documents the SQUID 2.50 code as written, but also points out gaps to be addressed later.
The following "If" incorporates bug-fixes required in the SQUID 2.50 code (and implemented by me there, dated 2018-07-02). Ludwig realised that "SA" (which is the column of ["206Pb/238U calibr. const."] values) would be located in a different column for Perm4 than is the case for Perms1-3, as described above. However, he appears not to have realised that "WtdMnA" (i.e. the value of the weighted mean of ["206Pb/238U calibr. const."]) and "sae" (i.e. the location of ["206Pb/238U calibr. const. %err"] both also required analogous Perm4-specific addressing. Instead, the Perm1-3 addresses were used universally for WtdMnA and sae, with nonsensical results in Perm4.
If (pbTh = TRUE) and piNumDauPar = 2 --i.e. Perm4
SA = " sA(2) "
WtdMnA = " WtdMeanA2 "
sae = " sAe(2) "
--because 206/238 is the "secondary" calibr. const. in Perm4
Else --Perm1, Perm2, Perm3
SA = " sA(1) "
WtdMnA = " WtdMeanA1 "
sae = " sAe(1) "
--because 206/238 is the "primary" calibr. const. in Perm1 and Perm2, and
--because for Perm3, 206/238 is being "kluged" using 208/232, which is the
--"primary" calibr. const. in Perm3
End If
f = plaFirstDatRw
L = plaLastDatRw
Note that the following headers are not always an accurate representation of the data within the column. It is true that "207*/235" = ["4corr-207Pb*/235U"] always, but the same is not always true for "206*/238". In fact, for Perm1, Perm2, and Perm4, "206*/238" = ["Xcorr-206Pb*/238U"], where X denotes the (user-specified) index isotope for common-Pb correction (i.e. one of 4, 7, or (in the case of Perm1 only) 8). In the case of Perm3, "206*/238" = ["Xcorr-208Pb*/232Th"], where X denotes the (user-specified) index isotope for common-Pb correction (i.e. 4 or 7). This is definitely odd, but it seems clear in the code that it is deliberate...
If piStdPb7U5_4col > 0 --i.e. if column 204corr 207Pb*/235U exists on StandardData
If (pi204PkOrder > 0) AND (pi207PkOrder > 0) AND (pbHasU = TRUE)
--i.e. if mass stations 204Pb AND 207Pb AND at least one U-bearing mass-station
--(e.g. 238U, 254UO, 270UO2) have ALL been measured, then define the headers:
CFs plHdrRw, piStdPb7U5_4col, "207*|/235", -1 --header for 204corr 207Pb*/235U
CFs plHdrRw, piStdPb7U5_4eCol, "%err", -1 --header for 204cor 207Pb*/235U %err
--The following are so-called 204corr 206*/238 (and err corr) but see above!
CFs plHdrRw, piStdPb6U8_4col, "206*|/238", -1 --header for 204corr 206Pb*/238U
CFs plHdrRw, piStdPb6U8_4eCol, "%err", -1 --header 204corr 206Pb*/238U %err
CFs plHdrRw, piStdPb7U5Pb6U8_4rhoCol, "err|corr", -1 --header 204c err correl.
End If
End If
The next step is to specify the IDTIMS-determined reference isotopic ratio for the Standard (part of the Standard-specific "model", and derived in SQUID 2.50 simply by converting the reference "age" of the Standard (206Pb*/238U, or 208Pb*/232Th, or both) to the corresponding isotopic ratio value. As described previously, those age-specific reference isotopic ratios are stored as StdUPbRatio (206Pb*/238U), StdThPbRatio (208Pb*/232Th), and Std_76 (207Pb*/206Pb*), respectively.
Before resuming the SQUID 2.50 code, I have inserted some code to calculate ["Total 206Pb/238U"] (and its %err) as well as ["Total 208Pb/232Th"] (and its %err) for the Standard. Note that these calculations do not exist in SQUID 2.50, but they are required in order to repair some SQUID 2.50 bugs affecting Perm3, and to sensibly extend the functionality of SQUID 2.50 (and Squid3) in Perm1. These newly-defined parameters appear to have no direct use in Perm2 or Perm4, but I see no harm in calculating them anyway. By analogy with other similar code in SQUID 2.50, the first part of the new insertion is a For loop that closely resembles that employed in subroutine SamRadiogenicCols:
For i = 1 To piNumDauPar --recall piNumDauPar = 2 for Perm2 and Perm 4, else 1
If ( (i = 1) AND (pbU = TRUE) ) OR ( (i = 2) AND (pbTh = TRUE) )
-- first part of the If covers Perm1 and Perm2; the second part covers Perm4
m = piPb6U8_totCol --index number for ["Total 206Pb/238U"] column
--NOTE that SQUID 3.0 will need to key this to index-isotope, no matter how
--counter-intuitive that seems!
ElseIf ( (i = 1) AND (pbTh = TRUE) ) OR ( (i = 2) AND (pbU = TRUE) )
-- first part of the If covers Perm3 and Perm4; the second part covers Perm2
m = piPb8Th2_totCol --index number for ["Total 208Pb/232Th"] column
--NOTE that SQUID 3.0 will need to key this to index-isotope, no matter how
--counter-intuitive that seems!
Else
m = 0 --should never happen
End If
--Now place formulae for so-called ["Total 206Pb/238U"] and/or so-called
--["Total 208Pb/232Th"]. Note that in SQUID 3.0, because we are performing
--calculations for ALL candidate index-isotopes, these calculations need to
--be generalised to give results like ["Xcorr Tot 206Pb/238U"] (where X can
--be 4 or 7 (Perm1,2,4) or 8 (Perm1 only)), or ["Ycorr Total 208Pb/232Th"]
--(where Y can be 4 or 7 (Perm2,3,4)).
--Calculate ["Total 206Pb/238U"] or ["Total 208Pb/232Th"]
If m = piPb6U8_totCol --Place row-by-row expression for ["Total 206Pb/238U"]
If i = 1 --Perm1 and Perm2
--Place row-by-row expression for ["Total 206Pb/238U"]
PlaceFormulae " = ["Uncorr Pb/U const"] / WtdMeanA1 * StdUPbRatio ", f, m, L
--i.e. place expression in col m, rows f to L
--Place row-by-row expression for ["Total 206Pb/238U %err"]
PlaceFormulae " = SQRT( ["Uncorr Pb/U const %err"]^2 + ExtPerrA1 ^ 2 ) ",
f, m + 1, L
--i.e. place expression in col m + 1, rows f to L
--Recall that ExtPerrA is defined as max(R, S) where S is the ExtPerr
--value (at 1-sigma, as a percentage) returned by the relevant
--WtdMeanAcalc, and R is an arbitrary "minimum" value for S (R = 0.75%
--at Geoscience Australia, by convention). There is more detail on this
--at the very end of the documentation of subroutine WtdMeanAcalc: it
--is described under extBox.
ElseIf i = 2 --Perm4
--Place row-by-row expression for ["Total 206Pb/238U"]
PlaceFormulae " = ["Uncorr Pb/U const"] / WtdMeanA2 * StdUPbRatio ", f, m, L
--i.e. place expression in col m, rows f to L
--Place row-by-row expression for ["Total 206Pb/238U %err"]
PlaceFormulae " = SQRT( ["Uncorr Pb/U const %err"]^2 + ExtPerrA2 ^ 2 ) ",
f, m + 1, L
--i.e. place expression in col m + 1, rows f to L
End If --i = 1 or 2
ElseIf m = piPb8Th2_totCol --Place expression for ["Total 208Pb/232Th"]
If i = 1 --Perm3 and Perm4
--Place row-by-row expression for ["Total 208Pb/232Th"]:
PlaceFormulae " = ["Uncorr Pb/Th const"] / WtdMeanA1 * StdThPbRatio ", f, m, L
--i.e. place expression in col m, rows f to L
--Place row-by-row expression for ["Total 208Pb/232Th %err"]:
PlaceFormulae " = SQRT( ["Uncorr Pb/Th const %err"]^2 + ExtPerrA1 ^ 2 ) ",
f, m + 1, L
--i.e. place expression in col m + 1, rows f to L
ElseIf i = 2 --Perm2
--Place row-by-row expression for ["Total 208Pb/232Th"]:
PlaceFormulae " = ["Uncorr Pb/Th const"] / WtdMeanA2 * StdThPbRatio ", f, m, L
--i.e. place expression in col m, rows f to L
--Place row-by-row expression for ["Total 208Pb/232Th %err"]:
PlaceFormulae " = SQRT( ["Uncorr Pb/Th const %err"]^2 + ExtPerrA2 ^ 2 ) ",
f, m + 1, L
--i.e. place expression in col m + 1, rows f to L
End If --i = 1 or 2
End If --m = piPb8Th2_totCol
Next i
The second part of the new insertion involves calculation of the "secondary" daughter-parent isotopic ratio, for the permutations where no calibration constant is available. Specifically, this means calculating ["Total 208Pb/232Th"] for Perm1, and ["Total 206Pb/238U"] for Perm3.
If (pbU = TRUE) AND (Switch.DirectAltPD = FALSE) --i.e. Perm1 only
If piPb8Th2_totCol > 0 --i.e. if column ["Total 208Pb/232Th"] exists
--Fill column ["Total 208Pb/232Th"]:
PlaceFormulae " = ["Total 206Pb/238U"] * ["208/206"] / ["232Th/238U"] ",
f, piPb8Th2_totCol, L
--Fill column ["Total 208Pb/232Th %err"]:
PlaceFormulae " = SQRT( ["208/206 %err"]^2 + ["Total 206Pb/238U %err"]^2 +
["232Th/238U %err"]^2 ) ", f, piPb8Th2_totEcol, L
End If
ElseIf (pbTh = TRUE) AND (Switch.DirectAltPD = FALSE) AND (piPb6U8_totCol > 0)
--i.e. Perm3 only, and even then, only if column ["Total 206Pb/238U"] exists
--Fill column ["Total 206Pb/238U"]:
PlaceFormulae " = ["Total 208Pb/232Th"] / ["208/206"] * ["232Th/238U"] ",
f, piPb6U8_totCol, L
--Fill column ["Total 206Pb/238U %err"]:
PlaceFormulae " = SQRT( ["208/206 %err"]^2 + ["Total 208Pb/232Th %err"]^2 +
["232Th/238U %err"]^2 ) ", f, piPb6U8_totEcol, L
End If
This marks the end of the newly-inserted code, because now we have the "new" columns ["Total 206Pb/238U"] and its %err, and ["Total 208Pb/232Th"] and its %err, for all four permutations. The adapted (and de-generalised) SQUID 2.50 code continues:
If piStdPb6U8_4col > 0 --i.e. if 204corr 206Pb*/238U exists on StandardData
If (pbTh = TRUE) AND (piNumDauPar = 1) --i.e. Perm3 only
--Bodorkos 2018-08-06: It is necessary to derive ["4-corr 206*/238"] from
--["Total 206Pb/238U"], analogous to the procedure routinely undertaken for
--unknowns, as the Th-Pb-centric expression originally placed by Ludwig:
--" = SA / WtdMnA * StdThPbRatio "
--is a nonsense with respect to 206*/238.
--Place expression for ["4corr-206*/238"]:
PlaceFormulae " = ["Total 206Pb/238U"] * ( 1 - sComm_64 * ["204/206"] ) ",
f, piStdPb6U8_4col, L
--Place expression for ["4corr-206*/238 %err"]:
PlaceFormulae " = SQRT( ["Total 206Pb/238U %err"]^2 +
( sComm_64 * ["204/206 %err"] / ( 1/["204/206"] - sComm_64 ) )^2 ) ",
f, piStdPb6U8_4ecol, L
Else --i.e. Perm1, Perm2, Perm4
--Bodorkos 2018-08-06: Outside of Perm3, there is no change to the method of
--calculating ["4corr-206*/238"] or its error: code has been revised to bring
--The PlaceFormulae statements inside the "Else" clause:
--Place expression for ["4corr-206*/238"]:
PlaceFormulae " = SA / WtdMnA * StdUPbRatio ", f, piStdPb6U8_4col, L
--Then place expression ["4corr-206*/238 %err"], but note that Ludwig's
--original contains a bug! When primary ratio = 208/232 and piNumDauPar = 2
--(i.e. 206/238 is calculated directly, but as the secondary ratio, which is
--the definition of Perm4), Ludwig's original code wrongly equates
--["206*/238 %err"] with the %err of the 208/232 calibr. const. This is
--obviously bad: instead, ["206*/238 %err"] should be equated with %err of the
--206/238 calibr. const. Easily fixed via Perm-dependent definition of "sae"
--near the start of sub StdRadiogenicCols:
--PlaceFormulae "= sAe(1) ", f, 1 + piStdPb6U8_4col, L --Ludwig original
PlaceFormulae "= sae", f, 1 + piStdPb6U8_4col, L --Bodorkos 2018-07-02 revision
--End of Bodorkos 2018-08-06 changes to ["4corr 206*/238"]
End If --(pbTh = TRUE) AND (piNumDauPar = 1) i.e. Perm3 only
ElseIf piStdPb6U8_7col > 0 --i.e. if 207corr 206Pb*/238U exists on StandardData
If (pbTh = TRUE) AND (piNumDauPar = 1) --i.e. Perm3 only
--Bodorkos 2018-08-06: It is necessary to derive ["7-corr 206*/238"] (which in
--turn requires the derivation of ["207corr 206Pb/238U Age"]) from
--["Total 206Pb/238U"], analogous to the procedure routinely undertaken for
--unknowns, as the Th-Pb-centric expression originally placed by Ludwig:
--" = SA / WtdMnA * StdThPbRatio "
--is a nonsense with respect to 206*/238.
--Place LudwigLibrary expression for ["207corr 206Pb/238U Age"]:
PlaceFormulae " = Age7corr( ["Total 206Pb/238U"], ["207/206"], sComm_76 ) ",
f, piAgePb6U8_7col, L
--Place LudwigLibrary expression for ["207corr 206Pb/238U Age 1serr"], noting
--that Ludwig function AgeEr7corr has a total of seven arguments. Two of these
--arguments are *ABSOLUTE* uncertainties, which I have evaluated in advance,
--for clarity. Calculate TotPb6U8AbsErr and TotPb76AbsErr as:
TotPb6U8AbsErr = ["Total 206Pb/238U %err"] / 100 * ["Total 206Pb/238U"]
TotPb76AbsErr = ["Total 207Pb/206Pb %err"] / 100 * ["Total 207Pb/206Pb"]
--Then place LudwigLibrary expression for ["207corr 206Pb/238U Age 1serr"]:
PlaceFormulae " = AgeEr7corr( ["207corr 206Pb/238U Age"],
["Total 206Pb/238U"], TotPb6U8AbsErr, ["207/206"], TotPb76AbsErr,
sComm_76, 0 ) ", f, piAgePb6U8_7ecol, L
--Now evaluate ["7corr 206*/238"] and ["7corr 206*/238 %err"]:
--Place expression for ["7corr-206*/238"]:
PlaceFormulae " = EXP( Lambda238Ma * ["207corr 206Pb/238U Age"] ) - 1 ",
f, piStdPb6U8_7col, L
--where Lambda238Ma has units "Ma^-1", and Age is in Ma.
--Place expression for ["7corr-206*/238 %err"]:
PlaceFormulae " = Lambda238Ma * EXP( Lambda238Ma * ["207corr 206Pb/238U Age"] ) *
["207corr 206Pb/238U Age 1serr"] / ["7corr-206*/238"] * 100 ",
f, piStdPb6U8_7ecol, L
--where Lambda238Ma has units "Ma^-1", and both Age and Age 1serr are in Ma.
Else --i.e. Perm1, Perm2, Perm4
--Bodorkos 2018-08-06: Outside of Perm3, there is no change to the method of
--calculating ["7corr-206*/238"] or its error: code has been revised to bring
--The PlaceFormulae statements inside the "Else" clause:
--Place expression for ["7corr-206*/238"]:
PlaceFormulae " = SA / WtdMnA * StdUPbRatio ", f, piStdPb6U8_4col, L
--Then place expression ["7corr-206*/238 %err"], but note that Ludwig's
--original contains a bug! When primary ratio = 208/232 and piNumDauPar = 2
--(i.e. 206/238 is calculated directly, but as the secondary ratio, which is
--the definition of Perm4), Ludwig's original code wrongly equates
--["206*/238 %err"] with the %err of the 208/232 calibr. const. This is
--obviously bad: instead, ["206*/238 %err"] should be equated with %err of the
--206/238 calibr. const. Easily fixed via Perm-dependent definition of "sae"
--near the start of sub StdRadiogenicCols:
--PlaceFormulae "= sAe(1) ", f, 1 + piStdPb6U8_7col, L --Ludwig original
PlaceFormulae "= sae", f, 1 + piStdPb6U8_7col, L --Bodorkos 2018-07-02 revision
--End of Bodorkos 2018-08-06 changes to ["7corr 206*/238"]
End If --(pbTh = TRUE) AND (piNumDauPar = 1) i.e. Perm3 only
ElseIf piStdPb6U8_8col > 0 --i.e. if 208corr 206Pb*/238U exists on StandardData
If (pbU = TRUE) AND (piNumDauPar = 1) --i.e. Perm1 only
--Bodorkos 2018-08-06: There is no change to the method of calculating
--["8corr-206*/238"] or its error: code has been revised to bring
--The PlaceFormulae statements inside the "Else" clause:
--Place expression for ["8corr-206*/238"]:
PlaceFormulae " = SA / WtdMnA * StdUPbRatio ", f, piStdPb6U8_8col, L
--Then place expression ["8corr-206*/238 %err"], but note that Ludwig's
--original contains a bug (although the bug is specific to Perm4):
--PlaceFormulae "= sAe(1) ", f, 1 + piStdPb6U8_8col, L --Ludwig original
PlaceFormulae "= sae", f, 1 + piStdPb6U8_8col, L --Bodorkos 2018-07-02 revision
--End of Bodorkos 2018-08-06 changes to ["8corr 206*/238"]
End If --(pbU = TRUE) AND (piNumDauPar = 1) i.e. Perm1 only
End If --piStdPb6U8_Xcol > 0 --i.e. if 20Xcorr 206Pb*/238U exists on StandardData
The next segment of code is unchanged, and assembles the Wetherill concordia columns for 204Pb-corrected StandardData:
If piStdPb7U5_4col > 0 --i.e. if 204corr 207Pb*/235U exists on StandardData
--Place the expression for ["4corr-207Pb*/235U"]:
t = " = ["4corr-207Pb*/206Pb*] * ["4corr-206Pb*/238U"] * [Present 238U/235U] "
--where SQUID 2.50 specifies [Present 238U/235U] = 137.88.
PlaceFormulae t, f, piStdPb7U5_4col, L
--Place the expression for ["4corr-207Pb*/235U %err"]:
q = " =sqrt( ["4corr-206Pb*/238U %err"]^2 + ["4corr-207Pb*/206Pb* %err]^2 ) "
PlaceFormulae q, f, piStdPb7U5_4eCol, L
--Place the expression for ["4corr-errcorr"]:
q = " = ["4corr-206Pb*/238U %err"] / ["4corr-207Pb*/235U %err"] "
PlaceFormulae q, f, 2 + piStdPb6U8_4col, L
--Note that "2 + piStdPb6U8_4col" corresponds to the "err corr" column.
End If
The next piece of newly-inserted code (i.e. not included in SQUID 2.50) is to generate the corresponding 208Pb-corrected Wetherill Concordia columns on the StandardData sheet, noting that this option is only available for Perm1. Remembering that for Perm1, we have already calculated ["8corr 206*/238"] and ["8corr 206*/238 %err"], and by association ["208corr 206Pb/238U Age"] and ["208corr 206Pb/238U Age 1serr"], the code continues:
If (pbU = TRUE) AND (Switch.DirectAltPD = FALSE) AND (piStdPb6U8_8col > 0)
--i.e. Perm1 only, and only if the column ["8corr 206*/238"] exists:
--Place LudwigLibrary expression for ["8corr 207*/235"]:
PlaceFormulae " = Rad8corPb7U5( ["208corr 206Pb/238U Age"], ["Total 206Pb/238U"],
["207/206"], sComm_76 ) ", f, piPb7U5_8col, L
--Define row-by-row TotPb7U5 as follows (noting that SQUID 2.50 hard-codes a
--numeric value of 137.88 in lieu of physical constant Present238U235U):
TotPb7U5 = ["Total 206Pb/238U"] * ["207/206"] / Present238U235U
--Now place LudwigLibrary expression for [8corr 207*/235 %err"], noting that
--the function has a total of 12 arguments:
PlaceFormulae " = Rad8corPb7U5perr( ["Total 206Pb/238U"],
["Total 206Pb/238U %err"], ["8corr 206*/238"], TotPb7U5, ["232Th/238U"],
["232Th/238U %err"], ["207/206"], ["207/206 %err"], ["208/206"],
["208/206 %err"], sComm_76, sComm_86 ) ", f, piPb7U5_8ecol, L
--Now place LudwigLibrary expression for ["8corr err corr"], noting that the
--function has a total of 11 arguments (as per previous, without TotPb7U5):
PlaceFormulae " = Rad8corConcRho( ["Total 206Pb/238U"], ["Total 206Pb/238U %err"],
["8corr 206*/238"], ["232Th/238U"], ["232Th/238U %err"], ["207/206"],
["207/206 %err"], ["208/206"], ["208/206 %err"], sComm_76, sComm_86 ) ",
f, piPb7U5Pb6U8_8rhoCol, L
End If --(pbU = TRUE) AND (Switch.DirectAltPD = FALSE) AND (piStdPb6U8_8col > 0)
--i.e. Perm1 only, and only if the column ["8corr 206*/238"] exists.
Remembering that ["4corr 207Pb/206Pb"], ["4corr 207Pb/206Pb %err"], ["204corr 207Pb/206Pb Age"] and ["204corr 207Pb/206Pb Age 1serr"] have already been calculated and placed in an earlier subroutine ("OverCtMeans" in Part 4), the final step in this loop is to evaluate ["8corr 207Pb/206Pb"] and ["8corr 207Pb/206Pb %err"], and then use those to generate ["208corr 207Pb/206Pb Age"] and ["208corr 207Pb/206Pb Age 1serr"]:
If (pbU = TRUE) AND (Switch.DirectAltPD = FALSE) AND (piStdPb76_8col > 0)
--i.e. Perm1 only, and only if the column ["8corr 207Pb/206Pb"] exists:
--Place expression for ["8corr 207Pb/206Pb"], noting that once again SQUID 2.50
--uses the hard-coded numeric value 137.88 in lieu of Present238U235U:
PlaceFormulae " = ["8corr 207*/235"] / ["8corr 206*/238"] / Present238U235U ",
f, piStdPb76_8col, L
--Place expression for ["8corr 207Pb/206Pb %err"]:
PlaceFormulae " = SQRT( ["8corr 207*/235 %err"]^2 + ["8corr 206*/238 %err"]^2 -
2 * ["8corr 207*/235 %err"] * ["8corr 206*/238 %err"] * ["8corr err corr"] ) ",
f, piStdPb76_8ecol, L
--Place LudwigLibrary expression for ["208corr 207Pb/206Pb Age"]:
PlaceFormulae " = AgePb76( ["8corr 207Pb/206Pb"] ) ", f, piStdAgePb76_8col, L
--Place LudwigLibrary expression for ["208corr 207Pb/206Pb Age 1serr"]:
PlaceFormulae " = AgeErPb76( ["8corr 207Pb/206Pb"], ["8corr 207Pb/206Pb %err"]
,,,, TRUE ) ", f, piStdAgePb76_8ecol, L
End If --(pbU = TRUE) AND (Switch.DirectAltPD = FALSE) AND (piStdPb76_8col > 0)
--i.e. Perm1 only, and only if the column ["8corr 207Pb/206Pb"] exists.
End Sub
This marks the end of the expanded and de-generalised calculations to be incorporated into StdRadiogenicCols, although perserved below (in italics) for posterity is the original signoff for this subroutine, flagging the need for the revisions recently performed:
Note that this subroutine makes no attempt to calculate 208corr 207Pb*/235U (as could be legitimately required by Perm1 where index isotope = 208Pb), nor (by analogy) 208corr 207Pb*/206Pb*. Similarly, for the radiogenic daughter-parent pair, the focus is exclusively on 206Pb*/238U, whereas in Perm2 and Perm4, there ought to be an analogous calculation for 208Pb*/232Th (it's possible that this is done later, but there isn't much code left!). Furthermore, in Perm3, we see the calculation for 208Pb*/232Th (as the sole daughter-parent pair) deliberately inserted into the column labelled "206*/238", which really shouldn't happen, although I can see why Ludwig found it expedient.
So at some future point, it will be necessary to revisit these calculations to ensure that all the relevant calculations for each Perm are performed and tabulated. This should not require the invention of new arithmetic; it should rather just involve a wider range of analogous calculations in each Perm.