Skip to content

SQ2.50 Procedural Framework: Part 1

sbodorkos edited this page May 26, 2017 · 3 revisions

Most SQUID 2.50 documentation to date has focused on elucidation and documentation of code relating to arithmetical procedures in SQUID 2.50. Thus far, the logical sequence in which these calculations are performed has been largely neglected, and this page is aimed at filling the gap, at least partially.

This page contains a synopsis of the SQUID 2.50 VBA subroutine 'SquidGeochron', which Ludwig described as the 'master procedure for processing raw-data PD or XML files for U-Pb geochronology'

Prerequisites

SquidGeochron assumes the presence of a valid Prawn Data XML file, including measurements of U, Th and Pb species appropriate for U-Pb geochronology. It also assumes the existence of a Task (species-matched to the XML file) with sound syntax, and which is appropriate to conduct data processing.

Initial steps

The subroutine begins by reading user-defined Preferences (predominantly Boolean), mostly related to calculation type. In terms of the options implemented in Calamari to date (April 2017), this encompasses the selection of 'linear regression' versus 'spot average' as methods for determining the 'spot-mean' of inter-scan, Dodson-interpolated ratio values.

This is followed by the subroutine CondenseRawData, which in its early stages invokes subroutines InhaleRawData and ParseXML. These two subroutines parse the XML file according to a static schema hard-wired in SQUID 2.50, and Jim Bowring has already developed a superior parser. The latter part of CondenseRawData is equivalent to the calculations already described herein as SHRIMP: Step 1.

Returning from CondenseRawData to SquidGeochron, the next subroutine is EqnDetails, which parses the selected Task in order to identify the 'ratios of interest' and their numerator-denominator species, the peak-order for these species, and so on.

The 'Concentration' reference material

The first directly pertinent subroutine is that which collects information about the "concentration" reference material, which is typically a natural reference mineral with a known (or nominated) abundance of either U or Th, against which the analogous abundances can be approximated for all other analyses. It is important to note that:

  1. Defining a 'concentration' reference material is optional (and SQUID includes a user-form check-box labelled "No U or Th standard" in order to obtain user confirmation that the omission of a definition for the 'concentration' reference material was deliberate, rather than accidental). It is perfectly acceptable to do U-Pb geochronology without a 'concentration' reference material, i.e. without proxies for absolute abundances of U and Th. The ratio 232Th/238U can be estimated with tolerable accuracy using an empirical relationship (e.g. Williams et al. 1996) that depends only on a combination of measured isotopic ratios, without ever needing to convert the figures into absolute abundances.
  2. The 'concentration' reference material can be the same as the 'primary' (i.e. 206Pb/238U, or 208Pb/232Th) reference material or it can be a different material. There may only be a single analysis of the material, if it serves no analytical purpose beyond 'concentration' definition (and in fact, this is the case in the demo XML).
  3. As for the 206/238U reference material, it is identified via spot-label prefix. In the demo XML, the key one-character prefix is M.

If the user has defined a prefix (one or more characters) for analyses of the 'concentration' reference material and the expression for EqNum = -4 is not null (i.e. there exists a Task expression to be used for evaluating a 'concentration constant'), then the main SquidGeochron routine invokes the subroutine GetConcStdData to get concentration reference material info:


Usage

GetConcStdData()


Definition of variables

Values of type Boolean
IgnoredChangedRunTable

Values of type String
TimeDate

Values of type Integer
i, piNumConcStdSpots, piParentEleStdN, SpotNumber

Values of type Double
ConcStdConstSum, pdMeanParentEleA, temp1, temp2

Vectors comprising values of type Integer
piaConcStdSpots

Vectors comprising values of type String
Task.EqnAsString[EqNum] (Vector of strings reflecting Task-expressions; referenced by EqNum).


The function of the subroutine is paraphrased as follows:

ConcStdConstSum = 0  
piParentEleStdN = 0  
IgnoredChangedRuntable = FALSE  

For i = 1 To piNumConcStdSpots  --i.e. total number of 'conc-prefixed' spots  

  SpotNumber = piaConcStdSpots[i] --vector of index numbers for 'conc-prefixed' spots  

  ParseRawData SpotNumber, FALSE, IgnoredChangedRuntable, TimeDate, FALSE, FALSE, FALSE  
  --See separate documentation of Sub ParseRawData for argument list
  --Note that FirstPass = FALSE even though this is 'first occurrence' of ParseRawData

  If IgnoredChangedRuntable = FALSE  
    EqnInterp Task.EqnAsString[-4], -4, temp1, temp2, 1, 0, TRUE  
    --See separate documentation of Sub EqnInterp for argument list  

    If temp1 <> 0 And temp1 <> [SQUID error value]  
      piParentEleStdN = 1 + piParentEleStdN --subset of 'conc-prefixed' spots  
      --for which Task.EqnAsString[-4] can be sensibly evaluated. 
      ConcStdConstSum = ConcStdConstSum + temp1  
    End If
  
  End If
 
Next i

If piParentEleStdN > 0  
  pdMeanParentEleA = ConcStdConstSum / piParentEleStdN
End If

End Sub  

Note that GetConcStdData calls two separately-documented subroutines: ParseRawData and EqnInterp. Note that ParseRawData is invoked with FirstPass = FALSE (even though this call is the first time that subroutine is used).

The sole purpose of GetConcStdData is to calculate and store the final double-precision value pdMeanParentEleA. In a future segment of the code, this value [and its ratio to the reference element (usually uranium) concentration in the refernce zircon] will be used to estimate the uranium contents of sample analyses.

The next part of this series deals with the start of the first "Reference Material-Sample" loop.

Clone this wiki locally