Converting ppm channels to weight % oxide

· ☕ 3 min read · ✍️ Joe

One question that came up recently was how to get the results in weight percent oxide rather than ppm. In this note, we’ll go through one way you can do that using iolite’s python functionality.

Getting element data and oxide-to-element factors

We have a mini database of element/isotope data available in iolite that can be accessed from python via the data.elements dictionary. For example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
data.elements['Si']
{
    'CI': 106500.0, 
    'MORB': 236000.0, 
    'MUQ': 315678.758, 
    'atomicNumber': 14, 
    'atomicRadius': 132.0, 
    'atomicWeight': 28.085, 
    'block': 'p', 
    'boilingPoint': 2628.0, 
    'density': 2.33, 
    'electronAffinity': 1.3895211, 
    'geochemicalClass': 'major', 
    'goldschmidtClass': 'lithophile', 
    'group': 14, 
    'ionizationEnergies': (8.151683, 16.345845, 33.493, 45.14179, 166.767, 205.267, 246.32, 303.66, 351.1, 401.38, 476.18, 523.415, 2437.65804, 2673.1774),
    'isotopes': (
        {
            'abundance': 0.92191, 
            'mass': 27.976926535, 
            'massNumber': 28
        }, 
        {
            'abundance': 0.04699, 
            'mass': 28.976494665, 
            'massNumber': 29
        }, 
        {
            'abundance': 0.0311, 
            'mass': 29.97377001, 
            'massNumber': 30
        }), 
    'meltingPoint': 1683.0,
    'name': 'Silicon', 
    'period': 3, 
    'series': 5, 
    'symbol': 'Si'
}

This data can be useful for a variety of tasks, but in this instance we are interested in using it to get atomic weights so we can calculate a conversion factor between element and oxide forms. We could do this as follows:

1
2
3
4
wSi = data.elements['Si']['atomicWeight']
wO = data.elements['O']['atomicWeight']
fSiO2 = (wSi + 2*wO)/wSi
# fSiO2 = 2.1393...

Or more conveniently, you can get this factor using a built in function:

1
2
fSiO2 = data.oxideToElementFactor('SiO2')
# fSiO2 = 2.1393...

Calculating major elements as weight % oxide

Equipped with these conversion factors, we can now calculate weight % oxide channels from our existing ppm outputs from the trace elements data reduction scheme as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Create a dict indicating the oxide formula to be used for each element
formulae = {
    'Si': 'SiO2',
    'Al': 'Al2O3',
    'Ti': 'TiO2',
    'Fe': 'Fe2O3',
    'Mn': 'MnO',
    'Mg': 'MgO',
    'Ca': 'CaO',
    'Na': 'Na2O',
    'K': 'K2O',
    'P': 'P2O5'
}

# Iterate through the elements in our dict
for el in formulae:
    # Iterate through output channels matching the current element
    # (note: there may be no matches, and that is ok)
    for c in data.timeSeriesList(data.Output, {'Element': el}):
        # Get the conversion factor for this element
        f = data.oxideToElementFactor(formulae[el])
        # Compose a string for the name of our new channel
        name = '%s%s_wt_pct_oxide'%(c.property('Element'), c.property('Mass'))
        # Create the new channel using the above info
        data.createTimeSeries(name, data.Output, None, c.data()*f/1e4)

And that’s it!

Click here to discuss.


iolite team
WRITTEN BY
Joe
iolite developer


What's on this Page