290 likes | 668 Views
Introduction to Data analysis. IGOR Pro Version 6.1 01-24-2012. Features of Igor-What Igor can do. Igor Pro is an integrated program for visualizing, analyzing, transforming and presenting experimental data. Features of Igor Pro includes: Publication – quality graphics
E N D
Introduction to Data analysis IGOR Pro Version 6.1 01-24-2012
Features of Igor-What Igor can do • Igor Pro is an integrated program for visualizing, analyzing, transforming and presenting experimental data. • Features of Igor Pro includes: • Publication – quality graphics • High-speed data display • Ability to handle large data sets • Curve fitting, Fourier transforms, smoothing, statistics and other data analysis • Waveform arithmetic • Image display and processing • Combination graphical and command-line user interface • Automation and data processing via built in programming environment • Extensibility through modules written in C and C++ languages
Igor Pro Objects • The basic objects that all Igor users work with are: • Waves • Graphs • Tables • Page layouts
Igor Pro- Waves • The term “wave” is used to describe an Igor object that contains an array of numbers. Wave is short for waveform. • A waveform typically consists of hundreds to thousands of values measured at evenly spaced intervals of time. Such data is usually acquired from a digital oscilloscope, scientific instruments or analog -to-digital converter card. • Graphs are used to visualize waves and to generate high-quality printouts for presentation. The traces in a graph are representation of waves. • Tables are used to enter, inspect or modify wave data. • Page layouts permit you to arrange multiple graphs and tables as well as pictures and annotations for presentation. • Next, we learn how to download data from Twiki to your computer • Loading data from your computer to Igor • Histogram and curve fitting
Downloading data-From Twiki “Twiki page showing saved data files”
Downloading data-From Twiki “Right click on the data file you want to download to your computer”
Downloading data-From Twiki “Save the data file to Desktop or any other desired location”
Loading data-To Igor In the Igor menu, Go to “Data” then click “Load waves”
Loading data-To Igor Click “File button” to browse data file to load
Loading data-To Igor Clicking the “File button” lead to location where the data file is saved. Choose the data file and then click “open”
Loading data-To Igor “Click Do it”
Loading data-To Igor ”The text file was recorded using DDC8 with one input channel –the one from NaI (TI) detector. Keep the first column and skip wave1 through 8”
Loading data-To Igor-Summary • The process of loading 1D data is as follows: • Bring up the Load Waves dialog. • Choose Delimited Text from the File Type pop-up menu • Click the File button to select the file containing the data. • Click do it.
Loaded data “Go to Data and click Data Browser”
Loaded data The wave we just created
Histogram Go to Analysis and select Histogram
Histogram-menu Choose the wave you want to histogram under “Source Wave”.You can choose to set the bins manually or have Igor set them for you. If you click on Display output wave, Igor will display the histogram once you click “Do It”.
Histogram-menu Click Do it
Histogram-menu The Histogram we just created
Histogram-menu “Right click on the created Histogram and Display”
Display and Edit the Histogram • If you chose not to display the histogram from the histogram menu, you can right click the histogram name and click display. • Once displayed you can edit the figure. • Double clicking on one of the axis pops up the “Modify Axis” menu. • You can set the range of each axis, label them and do other fancy things. • Right clicking the middle of the figure pops a menu that lets you append traces to the graph, add an annotation and edit other features of the figure.
Analysis-Curve fitting • Press “Ctrl+I” to pop up the curser sub menu and place both cursers in the range of the peak you want to fit. • Go to “Analysis” – “Curve Fitting…”. • The Curve Fitting menu pops up. • Under function you can choose the fit function to apply. • Choose the source of X and Y data. • In this case we want the NaI histogram to be the Y data and the X data can take the calculated option • Press the Data Options tab and click the curses button. • Press Do It! A fit trace should appear in the range between the cursers. In the command box below you will have the values of each coefficient and its error.
User Defined Functions • A user‐defined procedure is a routine written in Igor’s built‐in programming language by entering text in a procedure window. It can call upon built‐in or external functions and operations as well as other user defined procedures to manipulate Igor objects. Sets of procedures are stored in procedure files. • Igor uses a combination of the familiar graphical user interface and a command‐line interface. This approach gives Igor both ease‐of‐use and programmability. The job of the user interface is to allow you to apply Igor’s operations and functions to objects that you create. You can do this in three ways: • Via menus and dialogs • By typing Igor commands directly into the command line • By writing Igor procedures
User Defined Functions – Example1 Type in the procedure window the following: FUNCTION FitGauss (wav, from,to)VARIABLE from,toWAVE wav CurveFit/Q gauss wav(from,to) /D VARIABLE PeakPos, sig, FWHM, PeakArea WAVE W_Coef = W_Coef PeakPos = W_Coef[2] FWHM = W_Coef[3]*2*sqrt(ln(2)) sig = W_Coef[3] / sqrt(2) PRINT " pos, sigma, fwhm =", PeakPos, sig, FWHM, " DC pedestal=", W_Woef[0] END
User Defined Gaussian Fit • After compiling the user defined function, you can again place the cursers in the peak range you want to fit. • Type "FitGauss (name of the fitted wave, xcsr(A), xcsr(B))" in the command bar in the command window. • After you press enter the command window will process the fit and give you the position of the peak (pos), the width of the peak (sigma) and the full width at half maximum (FWHM). • The user and create all sorts of function to assist his or her analysis such as multiple Gaussian fits, linear fits and more.