James Allan's Igor Page
Updated 09/01/06

This is a general repository for any Igor related stuff I do along with some relevant things by other people.
Any comments or questions, feel free to email me.

Note that the NEW software for the time-of-flight based AMSs is not located here. This is held on the CIRES website.

Back to main page

AMS related files
AMS Analysis template
AMS Analysis Toolbox
Batch Files For Toolbox
Automatic Velocity Calibration Tool for AMS
Delta Analysis of Mass Spectra
Data Diagnostics for AMS

Other files
Axis Stacker
Globals Saver
NASA AMES 1001 Exporter
5C7-362 Peltier controller software
IPF comparison utility

IDL/Igor Converters



AMS Anaysis Template
Download latest version!
This is the 'ARI approved' template file for analysing AMS data put together by Tim Onasch. It contains the current versions of everything you need, which includes the Analysis Toolbox, the batch file, the delta analysis code and the diagnostics software. It also contains ARI's preferred default values. For more information on the components, see the relevant information below.
Version
Date
Notes (for more info see readme included in file)
AMS template 030106.pxt
06/01/03
This includes the following versions of the components:
  • Analysis Toolbox version1.27a
  • Diagnostics version 1.1.6 (with a tweak by Tim)
  • Delta Analysis version 5.3.5
  • Batch file 030103
AMS template 030121.pxt
21/01/03
This includes the following versions of the components:
  • Analysis Toolbox version 1.27c
  • Diagnostics version 1.1.7
  • Delta Analysis version 5.3.6
AMS template 030409 Mexico City_Update_i.pxt
09/04/09
This includes the following versions of the components:
  • Analysis Toolbox version 1.28i
  • Diagnostics version 1.1.7
  • Delta Analysis version 5.3.7
  • Batch file 030409
This was the template used by ARI during the Mexico City campaign 2003.
AMS template 030521.pxt
21/05/03
This includes the following versions of the components:
  • Analysis Toolbox version 1.29
  • Diagnostics version 1.1.7a
  • Delta Analysis version 5.3.7a
  • Batch file 030521
AMS template 031031.pxt 31/10/03
This includes the following versions of the components:
  • Analysis Toolbox version1.29
  • Diagnostics version 1.1.7a
  • Delta Analysis version 5.3.7b
  • Batch file 031031
AMS template 031104.pxt 04/11/03
This includes the following versions of the components:
  • Analysis Toolbox version1.30
  • Diagnostics version 1.1.7a
  • Delta Analysis version 5.3.7b
  • Batch file 031031


AMS Analysis Toolbox
Download the latest version!
My main Igor project is the analysis tools used to analyse data from the Aerodyne Aerosol Mass Spectrometer. The latest version is Deluxe v.1.33. Those within the AMS community should already be familiar with this programme and it'll be nigh on useless to anyone outside of it. This is an open source project and free for anyone to use but I do ask that if this is used for any publications or similar that I am acknowledged, as I have spent a lot of time and effort over the last few years working on this and NERC don't pay me by the hour. The analysis techniques used within and the toolbox itself are introduced in part 1 of my 2003 JGR paper (108 (D3) 4090 doi:10.1029/2002JD002358) and my 2004 JAerosolS paper (35 (7) 909-922 doi:10.1016/j.jaerosci.2004.02.007). It also builds on Jose's 2003 JGR paper (108 (D7) 8425 doi:10.1029/2001JD001213) and obviously John's 2000 AS&T paper (33 (1-2) 49-70 doi:10.1080/027868200410840). For a more detailed description of the version history and the people involved in creating this, see the information at the top of the file.
To use it, open it into an experiment, compile it and select 'James's' from the 'Panels' menu.
As this is an ongoing project, feedback is much appreciated. However, it must be stressed that this programme is not and was never meant to be a 'black box'. While it is relatively easy to use, it is important to know what is going on behind the scenes. I suggest reading mine and Jose's JGR papers and/or chatting to Doug.
The following is a summary of various versions of my code. As a general point, you should not use any version of my analysis code that has the suffix 'WIP', as this is my own acronym for 'Work In Progress'.
Important: Bugs were spotted in 1.20 so I strongly recommend upgrading to the latest version if you are using this (or any other prior) version. Also, if you're using 1.27a, I again suggest upgrading as this has some major performace issues. You need to use version 1.29 to be able to use the newer batch files properly.
In fact, screw it. Just get the latest version!!!
Version
Date
Notes
Unified 1.1.2
04/04/02
This was the last version of the Unified code. While it is now out of date and incredibly slow to use, it is very robust and backwardly compatible with other versions of the unified code.
Deluxe 1.2

If, you have any experiments running this version of the code, I cannot stress enough that you upgrade to version 1.25 as soon as possible. I never intended for this version to be on general release, as it is buggy as hell and gives some very dubious results.

Note: If you are upgrading an experiment to 1.20, you will have to close the panel (not saving in the process!!) and rebuild it by typing runme() at the command line. You will then have to check all the values and checkboxes on the panel are how you want them, paying particular attention to the 'corrections' tab.
Deluxe 1.20
18/10/02
Post second user's meeting version. There were some problems found with this so I'd recommend upgrading to the latest version.
Deluxe 1.25
02/12/02
  • All the bugs found in 1.20 have been fixed and I've also made the upgrade process a lot simpler. You just type 'runme()' at the command prompt, but this time, if you have a previous version of the panel open it will kill it. If you say 'yes' to applying the default values for the globals (recommended), I'd double check to make sure it hasn't overwritten any of your own settings. I've also been more thorough with the defaults on the panel, which I'm sure a lot of people will be thankful for!
  • This is also the first version to get 100% agreement with the Unified version in all of Qi's tests so I'm pretty sure that the basic analysis is robust but I'm not going to stick my neck out and say it's perfect, so keep an eye out for updates.
  • Some of the new features on the other hand are yet to be extensively tested. For instance, the slope correction on the 'recalculate sticks' part has had problems with some datasets. If it does anything spurious, simply disable it.
  • The most fundamental improvement to the programme is that the 'recalculate sticks' has been made more accurate by including interpolation, which means that m/z's that have a very low signal to noise ratio (such as 15 and 16) are more accurate. Also, it has been modified to accept the new IEfact_list and CEfact_list waves, which will be appearing in all the new batch files. There is also a speccorr_list wave for species-dependent correction factors, but this is only at the 'beta' stage right now so is probably best ignored. The aesthetics of the MS graphs have been heavily messed around with, but all the new options can be disabled if you so wish. I've also got a 'default graphs' panel on the 'misc' tab, which I'm sure will be a welcome relief to many people.
  • On another note, as I'm firmly in the last year of my PhD and I have lots of other work to do, I'm hoping that this will be the last major upgrade to the software for a while. Any work over the coming months I'm hoping to restrict to minor mods and bug fixes. If there is anything major you want or need, I'll be doing it in my spare time so buy me a beer first, then we'll talk.
Deluxe 1.26
16/12/02
Minor release; a few little tweaks inlcuding some features to make it interface better with Tim's code.
Deluxe 1.27
02/01/03
Yet more minor releases. A few tweaks and bug fixes in preparation for an ARI-approved template.
Deluxe 1.28
17/04/03
Made some compatibility tweaks for Tim's templates. Fixed bugs affecting the loading of analogue data and a performance issue in 1.27a in particular. Allowed for m/z scans that start after 1. Added graph controls and a few more ergonomics. Put in the ability to tweak the nominal/actual amu values. A few speed improvements and also tried to cut down on the wave lengths. Also allowed for separate species names and labels.
Deluxe 1.29
21/05/03
Fixed a bug in the batch table. Fixed the support for six-digit file numbers. Added a parameter for the gas phase/particle phase boundary in TOF normalization (useful for ammonium distributions).
Deluxe 1.30 04/11/03
Fixed some more bugs. Revamped the method used for stick recalculation, amongst other things. This may be the last version compatible with version 4 of Igor Pro, as version 5 is coming out soon. I'll try to keep things as backwardly-compatible as possible.
Deluxe 1.31 10/05/04
Minor update. I haven't done a huge amount of work on it recently (due to my thesis writing taking top priority) but there are a few new nicities in there. It still works on Igor 4. Hopefully, I should be doing some more work on it this summer due to the amount of field work. I also have a bunch of JMS data to go through, which I may write some stuff for.
Deluxe 1.32 17/05/04
Very minor mathematical mistake removed from a couple of the error propagation routines. This won't have affected anyone's data, but would have made me look silly if someone else had found it before I did.
1.32 with beta JMS support
07/06/04
Beta version containing JMS support coded by Jonny Crosier. Currently only loads the data into the memory and has only been tested on one dataset but it's a start. See the included text file for more info. Feedback welcomed.
Deluxe 1.33
01/11/04
Fixed a rather embarrasing bug in the error calculations that was causing them to be too low by 30%. A few bug fixes, tartings up and tweaks to the remapping.
Deluxe 1.33 with beta JMS
Documentation
11/11/04
Version 1.33 with Jonny's JMS analysis tools added. He also prepared some instructions, which you can get through the link on the left. Any questions about this should be be directed to him rather than me.
Deluxe 1.34 with JMS
07/04/05
Another version by Jonny. I also fixed a couple of bugs that cause non JMS analysis files to crap out.
Deluxe 1.35
Documentation
22/04/05
Yet another Jonny update. Plus I put the new Univerisity's logo in there! Igor version 5 is now a requirement (because of the picture).
Deluxe 1.36 22/08/05 More updates to the JMS analysis.
Deluxe 1.37 17/11/05 Bug fixes

Like I said, if you have any questions, don't hesitate to email me. Unless it's about the JMS stuff, in which case email Jonny.


Batch Files For AMS Analysis Toolbox
Many thanks to Tim Onasch at Aerodyne for the help with this list.
Most Recent
Archive
The following is an archive of fragmentation, batch, and colour files for use with the AMS analysis toolbox. These are posted here for the benefit of the AMS user's community under the direction of Doug Worsnop (Aerodyne Research, Inc.) The reasons for having a library of these files are to pool resources (such as uncommon fragmentation waves such as metals and specific organic compounds, etc.), keep a record of successful fragmentation waves, and to share experiences.
The files posted here are the culmination of many people's work in the community as a whole. Particularly deserving a mention are Doug, Jose, Alice, Tim, Ann, Brendan, Jay, Qi and Frank.
If you have any files that you would like to see appear on this list, please email them to me and/or Tim Onasch.

Important comments regarding the fragmentation waves:
  • Things like SO4 isotopes calculated from the major peaks (m/z 48, 64) don't need tweaking by the individual user.
  • The air fragmentation pattern does need to be measured by the individual user, e.g. the amount of O+ and O2++ at m/z 16 can vary by a factor of 2 between instruments.
  • I would advise at least checking that the SO4, NH4, NO3 fragmentation patterns for the major peaks agree with those in the frag file. In particular this can change if the quadrupole resolution settings (and the quadrupole itself) are slightly different between users, and according to Balzers we should see these differences.
  • As a general rule, I would recommend that in the frag waves, if you refer to a different species from an m/z, you should only refer to the fragment of the same m/z and do not use a multiplier. The fragmentation pattern of the other species should be handled by itself. Using this approach makes inconsistencies less likely.

Fragmentation List Archive
Date
File(s)
Species
Description/Comments
Can't remember
AMSbatch_sasua.itx

Author(s): James Allan
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium
  1. The batch file I used with the SASUA 3 dataset.
  2. This is incredibly out of date but was the first one I released after making the unified analysis code. (3) This contains the batch, frag and colour waves.
  3. These contain the 'organics100' and 'organics200' species, which were included because we were having electronic noise problems that impacted our signals above m/z=100. The calculations are very crude in this one but it's a good example of a starting point.
  4. The Nitrate, Sulphate, Ammonium, and Organic fragmentation waves are defined in the batch waves and not as separate fragmentation waves.
29/10/02
Colours_SASUA.itx

Author(s): James Allan
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium
  1. These are the colour waves contained within the SASUA 3 batch files. The colours used here follow the scheme decided on during the first AMS user's meeting at ARI in 2001.
I forget
AMSbatch_Manchester_paper.itx

Author(s): James Allan
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium
  1. The batch file I used for the summer Manchester analysis in my paper.
  2. This only really has nitrate, sulphate and organic but it does have the weighted TOF distribution as described in the paper. This is not done in any of the other files here. However, it must be stressed that the weighting factors used here are campaign and instrument specific and not necessarily suitable for everyone.
Dunno
Batch_Ron_Brown_v1.itx
Frag_Ron_Brown_v1.itx

Author(s): Ann Middlebrook, Doug Worsnop
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium
  1. These are the frag and the batch files that Doug and Ann used on the Ron Brown during 2002, submitted by Jose.
  2. These waves contain more complicated sulphate and ammonium fragmentation patterns than previous fragmentation waves.
25/10/02
Alice_batch_frag_102502.itx

Author(s): Alice Delia
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium, NH4_16, NH4_17, SO4_48, SO4_64, SO4_80, SO4_81, SO4_98, NO3_30, NO3_46, Delta0, Delta2
  1. Includes everything discussed at the users' meeting, plus a conservative correction for gas-phase relative humidity in frag_air (0.006*frag_water[18]) and a correction for oxygenated organics in frag_water and frag_organic, as well as a bunch of new frag waves for looking at fragmentation patterns and a Delta0 and Delta2 frag wave for marking averaged MS.
  2. Colour wave does not include the single m/z signals or the delta signals.
29/10/02
AMS_Frag_Waves_021029.itx

Author: Doug Worsnop
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium
  1. This file used to be the 'best' fragmentation list file. Now it isn't.
  2. This file contains the fragmentation waves, the batch waves, and the colour waves.

19/11/02
AMSbatch_JA_021119.itx

Author: James Allan
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium
  1. This is the same as above, only with the fragments tweaked for continuity and the isotope ratios for the sulphate ratios have been revised.
29/11/02
AMSbatch.11.29.02.itx

Author: Doug Worsnop (by committee)
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium
  1. This Igor Text file contains the "best" fragmentation waves (Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride, Potassium) as determined by Doug Worsnop (Aerodyne Research, Inc.).
  2. Version 1.21 or later of the analysis code is required for this, as it includes the ne CEfac and IEfac waves.
  3. This file will be updated frequently, so please note the listed date.
  4. This file contains the fragmentation waves, the batch waves, and the colour waves.
03/01/03
AMSbatch files 030103.itx

Author: Tim Onasch
Air, Water, Nitrate, Sulphate, Ammonium, Organic, Chloride
  1. Fragmentation list produced in conjunction with the template dated 030106
  2. The definition of "Sulphate" in the "Batch" list has been changed from "frag_SO3,frag_H2SO4" to "frag_Sulphate"
  3. The order of the fragmentation waves and the species within the "Batch" has been changed.
  4. The definition of "Total" in the "Batch" list has been changed from "$Nitrate, $Sulphate, $Organics, $Ammonium" to "$Water, $Ammonium, $Nitrate, $Sulphate, $Organics, $Chloride".
  5. Corrected an error in m/z=81 element of "frag_Organic".  The element was "0.5*frag_organic[81] + 0.5*frag_organic[95]" and has been changed to "0.5*frag_organic[67], 0.5*frag_organic[95]"
09/04/03
AMSbatch 030409 Mexico City.itx

Author: Tim Onasch
As above
  1. The template used during the Aerodyne Mexico City campaign during the spring of 2003.
  2. Fully approved by Doug Worsnop.
  3. Special thanks to Ann Middlebrook and Brendan Matthew at NOAA AL for their work on the fragmentation patterns. Includes a few tweaks, which are detailed in the corresponding template file.
21/05/03
AMSbatch 030521.itx

Author: Tim Onasch, modified by James Allan
As above
  1. This is the first batch to use the shorted wave name system. You'll need version 1.29 of the analysis code and the tweaked versions of Tim's and Alice's codes as well (1.1.7a and 5.3.7a), which you can find in the latest template (030521).
  2. Other than that, it's exactly the same as the Mexico City one above.
31/10/03
AMSbatch 031031.itx

Author: Tim Onasch
Whatever
  1. Post 2003 AMS user's meeting version. Questions should be directed to Tim and Doug.


Automatic Velocity Calibration Tool
By David Anderson at CEH Edinburgh.
Download!
A nifty tool that takes the back work out of AMS velocity calibrations. The instructions are contained within the file. The current version is 1.0.
The program works fine on data from the CEH AMS, but since the velocity curve seems to bend the other way (positive second derivative) from everybody else's then you might need to tweak some global parameters (see Help button).

Delta Analysis for AMS Mass Spectra
By Tim Onasch at Aerodyne Research Inc.
Download! (hosted by ARI)
This is a plugin for the standard AMS Analysis toolkit and follows on from previous code by Manula and Frank. This allows the user to probe the chemical nature of organics observed, amongst other things.

Data Diagnostics for AMS
By Alice Delia at University of Colorado, Boulder.
Download! (hosted by ARI)
This is another plugin for the analysis toolbox. This is used to probe the relative abundacies of various chemical fragments and species to aid in getting the fragment lists tweaked right for a given campaign.

Axis Stacker
Download!
A couple of handy little routines I wrote to stack a number of axes on top of one another and align axes vertically. This is useful if you have multiple axes on the left hand side with one common x axis (e.g. a time series).

Globals Saver
Download!
A neat-o utility for saving a list of global strings or variables into an itx file. I'll probably expand this and make it more user friendly in the future.

NASA AMES 1001 Export Utility
Download!
A user-friendly utility for saving Igor data in the NASA AMES 1001 format, which is used by the BADC amongst other things. This includes notebooks for entering comments and a table for entering the metadata.

Oven Industries 5C7-362 Interface Software
Download!
Software routines and command library for communicating with the Oven Industries 5C7-362 Peltier controller board through an RS232 interface. This requires VDT.xop, which is shipped with IGOR pro. I used this for the basis of some logging and control software in Finland and it seems pretty robust. I may upgrade this to VDT2 and Igor 5 at some point in the future.

IPF comparison utility
Download!
A rather useful utility for comparing to Igor procedure files (.ipf). This will list off all functions that are either unique to each file or contain differences, in a somewhat dumbed-down fashion to the version control systems used by 'real' software engineers. This is really handy if (like us) you often have more than one person working on some software at once. Now in version 1.2, this works even better than before, giving more detail in the summary, being more bulletproof and even handling the preprocessor declarations as well.

If you encounter any strange behaviour with this, please let me know. I've tried to cover all bases with the filtering, but it'll be very dependent on programming style.

IDL/Igor converter

Download!
Some IDL routines for importing and export Igor data. No idea if they work or not - I don't use IDL. These courtesy of Dan Murphy.