Importing Concentration or Intensity Data From a Disk File
CalcZAF allows the user to create ASCII files for importing concentration or intensity data from a disk file. An example file is supplied which is called CALCZAF.DAT. See the File | Open and File | Close menu for loading input data from file. Click the Calculate button to perform the calculations and click the Load Next Dataset from Input File button to load the next data set.
Each data set in the input file consists of 3 or more lines. The first line contains the calculation mode (defined above), number of analyzed and specified elements, operating voltage and takeoff angle. The second line contains the oxide or elemental calculation flag (1=oxide,2=elemental), the element by difference, element by stoichiometry to stoichiometric oxygen, the stoichiometric ratio, the element by stoichiometry relative to another element, the element to which the stoichiometry is calculated relative to and the relative ratio. The third (and subsequent lines) are the element data for each element including the element symbol, the x-ray symbol ("ka", "kb", "la", "lb", "ma", "mb" or " " for a specified concentration), the number of cation atoms, the number of oxygen atoms, the standard number assigned as the primary standard (from the Probe for EPMA STANDARD.MDB default database), the concentrations (for intensity calculations), the unknown intensity and the standard intensity (if required). This structure is repeated as often as desired for each data set. The program will automatically detect if the last data set has been reached.
The structure is shown below in pseudo-code:
' Read calculation mode (0, 1, 2, or 3), number of elements, kilovolts and takeoff, (optional sample name)
Input #3, CalcMode%, LastChan%, Kilovolts!, Takeoff!, (SampleName$)
' Read oxide/elemental mode, difference, stoichiometry, relative
Input #3, OxideOrElemental%, DifferenceElement$, StoichiometryElement$, StoichiometryRatio!, RelativeElement$, RelativeToElement$, RelativeRatio!
' Loop on each element
For i% = 1 To LastChan%
Input #3, Elsyms$(i%), Xrsyms$(i%), NumCat%(i%), NumOxd%(i%), StdAssigns%(i%), ElmPercents!(i%), UnkCounts!(i%), StdCounts!(i%)
next i%
Note:
CalcMode% = 0 for calculation of k-ratios from concentrations
CalcMode% = 1 for calculation of concentrations from unknown and standard intensities
CalcMode% = 2 for calculation of concentrations from "raw" k-ratios (no standard intensities necessary)
CalcMode% = 3 for calculation of concentrations from "normalized" k-ratios (no standards necessary)
Note:
OxideorElemental%=1 calculate oxide output based on stoichiometry
OxideorElemental%=2 calculate as elemental output (default)
Note: all strings (element symbols, etc.) must be in double quotes, elements not analyzed (specified concentrations or calculated) are indicated by a blank (empty double quotes) x-ray line string. If the element is a specified concentration, be sure to give the concentration in elemental weight percent for the "ElmPercents!(I%)" parameter and leave the count intensity fields zero.
An example of a CalcZAF input file demonstrating each calculation mode is shown here: