#pragma rtGlobals=1 // Use modern global access method. // HRDataBaseAddTagsProcedure version 1.0 // // Donna Sueper Aerodyne & University of Colorado // April 1, 2008 // // These procedures are intended to be used in conjuction with the downloaded igor text files available for the web site: // http://cires.colorado.edu/jimenez-group/Restricted/HRAMSsd/#STD // which contains ToF AMS high-resoution mass spectra. // // It is presumed that the user of the files will load these files into an igor experiment via the typical Data - Load Waves - Load Igor Text manu item. // The result of this operation is the plotting of two graphs: // (1) "Processed", which conatins the integer - and family grouped results of the difference high resolution spectra // (2) "Raw", which contains the raw difference mass spectra and the magnitudes of each species. // // The example in these comments, will use the text file ""L_STD_HR_001_Nonanal.itx" but any from the web site will work similarly. // The purpose of the functions contained in the igor procedure file is to provide a simple tool for displaying additional information presented in these graphs. // Specifically, when the user executes // // Add_HR_Tags(Nonanal_Stickdiff, Nonanal_ExactMassTag) // in the command line, tags will be appended to the high resolution stick values in the graph named "Raw" // // To remove tags, simply execute // Remove_HR_Tags() // This function doesn't check for the existence of a tag, and work for less than 1000 tags. // Function Add_HR_Tags( ExactMassStickWave, IonTagWave) wave ExactMassStickWave wave/t IonTagWave variable idex, num string mystr, mylist num = numpnts(ionTagWave) // check to see if the wave is plotted in top graph mylist = WaveList("*", ";","WIN:") if (WhichListItem(NameofWave(ExactMassStickWave), mylist) <0) abort "The wave "+NameofWave(ExactMassStickWave)+ " was expected to have been plotted in the top graph - Aborting from Add_HR_Tags" endif // check to see that the waves have the same number of points as expected if (num != numpnts(ExactMassStickWave)) abort "The waves "+NameofWave(ExactMassStickWave)+ " and "+NameofWave(IonTagWave)+ " do not have the same number of points. Aborting from Add_HR_Tags" endif for(idex=0;idex