Examples

Uncertainty propagation

Carry out simple forward propagation of uncertainties in an algebraic functions (95% confidence intervals are shown):

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Show confidence intervals with ± instead of in parentheses:

In[4]:=
Click for copyable input
Out[5]=

Carry out a Monte Carlo simulation (optionally with parallel kernels) with a numerical function and input parameters with uncertainties and 1000 iterations:

In[6]:=
Click for copyable input

Display the resulting mean and standard deviation:

In[7]:=
Click for copyable input
Out[7]=

Display sensitivity plots, which can be used to identify input uncertainties that affect the variance in the result, and explore the simulation data:

In[8]:=
Click for copyable input
Out[8]=
In[9]:=
Click for copyable input
Out[9]=
DataTables

Construct a DataTable from an array of data or associations. The buttons can be used to show the table in Microsoft Excel (in Windows systems) or copy it to the clipboard as tab separated values (TSV):

In[10]:=
Click for copyable input
Out[10]=

Use a queries and other Dataset functions to the results with automatic uncertainty propagation:

In[11]:=
Click for copyable input
Out[11]=

Use functions or operators such as FoldValues, GroupByKey, MeanAndStandardError, PartitionAssociation, QueryTo for transformations of data tables:

In[12]:=
Click for copyable input
Out[12]=

Construct an effective variance fit, fitting the data to a non-linear equation under consideration of uncertainties in all variables:

In[13]:=
Click for copyable input
Out[13]=

Plot the data using error bars (the SciDraw package can also be used):

In[14]:=
Click for copyable input
Out[14]=
Calibration of analytical data

Load some measurement data:

In[17]:=
Click for copyable input
Out[17]=

Load known concentrations of calibration standards and measurement data (more than one element, isotope or compound can be used):

In[18]:=
Click for copyable input
Out[18]=

Show the calibration curve, optionally subtracting blank measurements and using a quadratic calibration curve:

In[19]:=
Click for copyable input
Out[19]=

Calibrate the measurements by interpolating standard and drift measurements based on the time of analysis:

In[20]:=
Click for copyable input
Out[20]=
Conversion between components

Define chemical components using the chemical formula:

In[21]:=
Click for copyable input

Convert between from a mass to a molar amounts:

In[23]:=
Click for copyable input
Out[23]=

Input some sample compositions and convert to a different set of chemical components and project from components:

In[24]:=
Click for copyable input
Out[24]=
In[25]:=
Click for copyable input
Out[25]=

Calculate the coefficients for the cations for a mineral formula for a given number of oxygens:

In[26]:=
Click for copyable input
Out[26]=
PHREEQC in Mathematica

Open a link to IPhreeqC (a library for the popular USGS geochemistry software package PHREEQC) and load a database:

In[27]:=
Click for copyable input

Define a PHREEQC script with variables:

In[29]:=
Click for copyable input

Run the script and return the full SELECTED_OUTPUT:

In[31]:=
Click for copyable input
Out[31]=

Run a Monte Carlo simulation with PHREEQC and uncertainties in the input variables:

In[32]:=
Click for copyable input
In[33]:=
Click for copyable input
Out[33]=
In[34]:=
Click for copyable input
Out[34]=
Data import

Import data from common file formats in analytical chemistry, for example mass-spectrometer .exp files:

In[36]:=
Click for copyable input
In[37]:=
Click for copyable input
Out[37]=