Calculator

The calculator tool is used to calculate new channels from existing channels. It can accessed from Tools ‣ Calculator menu. The general workflow is as follows:

  1. Click “Add” to create a new entry in the list.
  2. Double click in the “Name” column to type a name for your new channel.
  3. Double click in the “Expression” column to type in the expression used to calculate the channel data.
  4. Double click in the “Type” column to specify the type of your new channel (i.e. Input, Intermediate, or Output).
  5. Repeat as necessary to create multiple new channels.
  6. Click “Calculate!”.
  7. If the calculation was successful, a green check mark will appear in the “State” column, otherwise a red x will appear. Information about the error can be found in the tooltip and in the “Python Console” tool.
  8. If this is a series of calculations you will use frequently, you can save and recall the list using the “Save” and “Load” buttons in the upper right.

The screenshot below shows an example where a new intermediate channel (“U238/U235”) was to be calculated from some baseline subtracted channels. Note that in this case, the expression references baseline subtracted channels that have not yet been created so the calculation is not successful.

iolite calculator

A few things to keep in mind:

  • The time associated with each channel will always be index time.
  • The order of channel creation may be important, e.g. if one channel depends on another. If you need to reorder the statements, use the “Up” and “Down” buttons.
  • Channel names with spaces are problematic for the python expression, therefore for these names the spaces are mapped to “_”. For example, if you wanted to reference “My New Channel” in a subsequent calculation, you would put it in the expression as “My_New_Channel”.
  • The expression field can access iolite’s python API, so more complex expressions involving reference material data and splines are also possible. However, if you require those features, you may want to consider creating a python-based data reduction scheme so that you have better integration with iolite and the ability to use more python features. As an example, here is how you might calculate a semi-quantitative Ca concentration:
Name Expression Type
Ca_blsub Ca43 - data.spline(“Baseline”, “Ca43”).data() Intermediate
Ca_sq_ppm Ca_blsub * data.referenceMaterialData(“G_NIST612”)[“Ca”].valueInPPM() / data.spline(“G_NIST612”, “Ca”).data() Output