Skip to content

SQ2.50 Procedural Framework: Part 6

sbodorkos edited this page Jul 5, 2018 · 4 revisions

Now that Loop A has finally been completed, the code finishes off with the calculation of the remaining columns (SQUID 2.50 performs these calculations separately for the StandardData and SampleData sheets). The code continues:

If (pbCanDriftCorr =TRUE) AND (pbStdsOnly = FALSE)
 
  [out-of-scope stuff]  
  
End If

The next step is to calculate all LA-switched expression columns and cells. SQUID 2.50 does this via subroutine LastEquations, which has two Boolean inputs:

  • StdCalc (TRUE = perform calculations on StandardData sheet; FALSE = SampleData sheet)
  • IncludeSingleCells (obsolete; always TRUE. It was presumably replaced by Switch.SC at some point)

The code continues:

LastEquations TRUE, TRUE --subroutine not documented, probably obsolete
--This invocation calculates LA-switched expression on StandardData only.

"StdConcPlots" is a Boolean set buy the user in SQUID 2.50's preferences. In essence, it dictates whether SQUID 2.50 should attempt to portray analyses of the Standard on a conventional (Wetherill) concordia diagram, for visualisation of data quality. This is a somewhat artificial process, because in secondary ion mass spectrometry, calibrated 206Pb/238U is not independently determined for the Standard. Instead, the WtdMeanA value (determined from the calibration constants) is defined as a proxy for the IDTIMS-defined reference 206Pb/238U of the Standard. From there, 206Pb/238U "values" for individual analyses of the Standard can be derived by assessing the extent to which the analysis-specific calibration constant value is offset from the WtdMeanA value defined by the population, and offsetting the analysis-specific 206Pb/238U value from the IDTIMS-defined reference 206Pb/238U value in proportion.

It's not completely clear why StdConcPlots is user-controlled; I think maybe it could simply be set to TRUE, as it embodies calculations that are commonly useful, and which are not performed at all when StdConcPlots = FALSE. The only reason I can think of is that perhaps in geologically young reference materials (< 50 Ma), it might be possible to calculate spurious isotopic ratios that could not be properly represented on a concordia diagram. But it seems to me that in that case, error handling should be handled differently anyway. The code continues:

If StdConcPlots = TRUE  

  StdRadiogenicCols plaFirstDatRw(1), plaLastDatRw(1)
  --subroutine documented separately
  
End If

The code now turns to the corresponding calculations on the SampleData sheet. It begins with a rather inelegant kluge on the SampleData set, essentially aimed at refreshing all the expression-results and calculations, and which I will not document.

If pbStdsOnly = FALSE --i.e. if processing loops includes Samples AND Standards
  
  [Activate SampleData sheet]
  Rows(plHdrRw).Font.Bold = TRUE

  If ( piaSpotCt[0] > 0 ) OR ( piaSpotCt[1] > 0 ) 
  --i.e. trivial check for the presence of ANY analyses
  
    [Kluge to "refresh formulas so will be current"]
    plOutputRw = plSpotOutputRw

    If piaSpotCt[0] > 0 --i.e. if there are ANY Sample analyses
    --then do SamRadiogenicCols from first to last row on SampleData

      SamRadiogenicCols plaFirstDatRw[0], plaLastDatRw[0]
      --subroutine being documented separately
  
    End If
    
  End If
  
  LastEquations FALSE, TRUE
  --This invocation calculates LA-switched expression on SampleData only.
  
End If --pbStdsOnly = FALSE
Clone this wiki locally