IgorPro is a powerful command-line based data analysis and plotting software. Asylum Research (our AFM manufacturer) uses Igor to control their AFMs. See also the Jimenez research group's Igor page for a quick reference.

Useful hotkeys:

  • cntrl+j Quick switch to command line
  • cntrl+i Adds cursor palette to a plot

Useful windows:

  • The “data browser” window is helpful to keep track of the names of waves you are manipulating. Data > Data Browser.

Useful commands:

  • To learn more about a command, write it at the command line, highlight it, right click and choose the help option.
  • “edit data1, data2” creates a table with the waves data1 and data2
  • “display data1 vs data2” Plots data1 vs data2
  • “duplicate data1, data1copy” Creates a duplicate wave of data1 called data1copy
  • “duplicate/R=[1502,7102] ithrom ithrom_short” Creates a duplicate wave that use a limited range of the original data.
  • “DeletePoints startdatapoint, numberofdatapoints, data1” Deletes a specified number of datapoints starting at a specified datapoint.
  • “Note data1, “some text”” Attaches some text as a note to a wave. Useful for storing informal comments relating to the wave
  • “print note(data1)” Displays any notes associated with a wave
  • SetAxis changes the x and y axes of a plot
    • SetAxis/A Automatically sets the x & y axes
    • SetAxis bottom 1,3 Sets the x-axis to the range 1 to 3
    • SetAxis left 1e-9,5e-9 Sets the y-axis to the range 1e-9 to 5e-9
  • DeletePoints 50, 150, data Deletes 150 datapoints from data starting from datapoint 50
  • “vgthrom_flat = vgthrom - p*0.00833333*0.21+2” The index p is used to define a line. In this example, the command was used to flatten some biosensing data.
  • “duplicate/R=(0,11) vgflat vg30” The R stands for range. The coordinates refer to either the data point in the wave or the scaled x axis for the wave.
  • “Smooth 60, vg100_smth” The smoothing window will be 60 data points. I already used the duplicate command to make a wave called vg100_smth.
  • “Make/N=150/D Xb” This is like the Matlab command zeros(150), making a vector that has 150 entries of zero.
  • “Xb = p” This makes a vector [0, 1, 2, 3, …]

Importing a data file to Igor:

Data>Load Waves>General Text

When importing current vs. time data, throw out the time column then change wave scaling (this can also be done with the SetScale command)

Data>Change wave scaling

Procedures for analysis of switching data

Some automated functions which are useful for speedy analysis of switching data are contained in the following procedure file (download and unzip the file. Then double-click it to open it in Igor). These functions partially automate and speed up tasks like autocorrelation, Fourier analysis, Fourier filtering, plotting, etc. You can find a list of the functions, as well as instructions for calling them, in the procedure file's header.

Power Spectral Density

PSD preparation
  • Select WindowsHelp WindowsWM Procedures Index.ihf
  • Press cntrl+f to open the search box in the help window. Search for 'PSD'.
  • Press the include icon (spiral bound notebook) next to the 'Power Spectral Density' section
  • A text will open, hide the text
  • From now on a 'PowerSpectralDensity' macro will be available in the Macros pull down menu.
Big PSD preparation

We have a copy of a macro that Asylum Research wrote for taking PSDs over long times (showing lower frequency information). The procedure file for this is located at: T:\Physics\Minot Group\Software\Igor Pro\BigPSD.ipf

Working with audio files

Preparation (only necessary on first use)
  • Navigate to /WaveMetrics/Igor Pro Folder/More Extensions/File Loaders/
  • Create shortcuts for 'SndLoadSaveWave.xop' and 'LoadWAVfile.xop'
  • Move the shortcut files to /Wavemetrics/Igor Pro Folder/Igor Extensions/
Making an audio file from ASCII data
  • Create a 16 bit audio wave in Igor
Make/W/O/N = NumberOfDatapoints WaveName
  • Set the sample rate (=1/tau) for the wave

SetScale/P x,0,0,tau, WaveName

  • Copy time domain data into the audio wave. You will need to choose a scaling factor to multiply your data by (otherwise the resulting sound wave will be too loud or quiet). For a 16 bit sound wave values between -32768 and 32767 are allowed. Pick a scaling value that puts your data comfortably in that range.
WaveName = DataWave*ScaleFactor

* Listen to your new audio file

PlaySound WaveName

QR Code
QR Code igor (generated for current page)