I have a data analysis program in Igor. I have repeate same steps for analyis. I want to automate thos steps. Is it possible??

Short answer is yes of course that is what Igor is all about.

The path will require some programming within Igor.

Can you elaborate a bit more about what steps you would like automated?


Following steps need during analysis

1. Start the programme in Igor pro

2. Load the data from the folder where raw data saved

After few minutes 30-40 minutes...

3. Loading completed,data processed and required graphs are plotted

4. saved the purticular waves as a text file with delimiter in a folder

Above steps I am doing manually in the software

I want to automate those steps.


Thank you


Here are my thoughts.

1) This is a step that you do by double-clicking on the experiment. You can create a template Igor Pro experiment that has just the analysis routines. Open it one time to complete the remaining steps.

For the next steps, you should start by writing functions that do each part.

2) I see three steps as below. Write and test each function one at a time.

Function LoadMyData(...)
Function ProcessMyData(...)
Function PlotTheGraphs(...)

3) Finally, write the function Function StoreTheResults(...)

Now that you have the four functions to do what you want, write a master function Function LoadProcessPlotandStoreMyData(...).

The names of the functions are your choice; I used longer descriptive names for illustration.

The questions back to you are as follows:

1) How skilled are you at writing code in Igor Pro? (e.g. not at all; beginner; ... advanced coder)

2) What platform and Igor Pro version are you using? (e.g. Windows, Igor Pro 8)

Thanks for your quick response

1) I am beginner in Igor pro.

2) I am using Igor Pro 6 windows

By your first response, I suggest that you have a long process ahead of you to automate your analysis. The tradeoff is that you will perhaps spend as much time writing automation routines as you will just analyzing your data manually.

Also, to support what Andy asked at the outset ... Are you doing Step 2 as one step, or is it a sequence of steps? What are the sequence of steps? Are you using a data analysis package that someone created for you, or are you using built-in routines in Igor Pro? We are missing these details that we need to understand the depth of the problem that you are trying to solve.

Using Igor Pro 6 may or may not be a limit. You have to tell us more about what you are trying to do.

Finally, when you decided that you want to start in programming in Igor Pro, I might suggest that you first try to write a function that will load your data. Look in the Igor Pro manual and on this site for examples that you can try to duplicate.

Yes, I am using a data analysis package which is made by someone.

I am running a instrument which is make the file daiy (raw data)

Next day I am use the data analysis package to analysis the data ( manually ) of previous day

I am trying that the package will start in midnight automatically when the instrument started to write a new file  and complete the all steps which is performed in the analysis package.

Thank you

As I noted, you have a long road ahead of you. Start with one step at a time. Or, contact the person who wrote the package to see whether they might automate it for you. Alternatively or in addition, post the name of the package and ask here whether someone else who is using it has or can write automations for you. In this latter case, you might start a new thread with the package name ...

"Seeking help to automate analysis using PACKAGE XYZ"

Hi Vishnu,

If you have a manual process that you are doing you can see the necessary commands and code in the history pane. The hybrid interface design of Igor Pro allows you to a great number of things with a point and click/GUI interface. The other part is that those clicks get translated to commands that you can see.  What I might suggest is to do one of your analysis and then post the commands that you used. We can then give you some insight into what would be needed to automate.


Hi Andy

commands are there

1) after double click the package, I got the following commands

•Edit :SP2toolkit:CalibData:'20190129':BandRatioHG_Coef
•Edit :SP2toolkit:CalibData:'20190129':SCHG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':BBHG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':NBHG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':SPHG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':SCLG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':BBLG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':NBLG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':SPLG_CalCoef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':BandRatioHG_Coef;DelayUpdate
•AppendToTable :SP2toolkit:CalibData:'20190129':BandRatioLG_Coef

2) After loading data (please find the attached image)

  Loading SP2 file: F:SP2:20190727:20190727x001.sp2b to folder root:'20190727x001_SP2'
  File Read (MT) = 1.4898s
  Elapsed time: 2.89 seconds.
  Analysing raw traces from folder: root:'20190727x001_SP2' 
  Elapsed time: 4.16 seconds.
  Loading SP2 file: F:SP2:20190727:20190727x002.sp2b to folder root:'20190727x002_SP2'
  File Read (MT) = 1.9401s
  Elapsed time: 3.37 seconds.
  Loading SP2 file: F:SP2:20190727:20190727000002.hk to folder root:'20190727000002_HK'
  Elapsed time: 1.75 seconds.
  Analysing raw traces from folder: root:'20190727x002_SP2' 
  Elapsed time: 3.91 seconds.
  Loading SP2 file: F:SP2:20190727:20190727x003.sp2b to folder root:'20190727x003_SP2'
  File Read (MT) = 1.4539s
  Elapsed time: 2.86 seconds.
  Analysing raw traces from folder: root:'20190727x003_SP2' 
  Elapsed time: 4.01 seconds.
  Loading SP2 file: F:SP2:20190727:20190727x004.sp2b to folder root:'20190727x004_SP2'
  File Read (MT) = 2.2608s
  Elapsed time: 3.60 seconds.
  Analysing raw traces from folder: root:'20190727x004_SP2' 
  Elapsed time: 4.06 seconds.
  Loading SP2 file: F:SP2:20190727:20190727x005.sp2b to folder root:'20190727x005_SP2'
  File Read (MT) = 0.095012s
  Elapsed time: 0.32 seconds.
  Analysing raw traces from folder: root:'20190727x005_SP2' 
  Elapsed time: 0.26 seconds.
  Postprocessing of PBP data in folder: root:'20190727x001_SP2_PBP' 

3) Save the file

•Save/J/W :'20190727x001_SP2_PBP':BHBL_BCmass,:'20190727x001_SP2_PBP':BHBL_BCdiam,:'20190727x001_SP2_PBP':DelayTimeScatt2Broad,:'20190727x001_SP2_PBP':DelayTimeScattMax2Broad,:'20190727x001_SP2_PBP':ConcTser:TimeCtr,:'20190727x001_SP2_PBP':ConcTser:BHBL_NumbConc,:'20190727x001_SP2_PBP':ConcTser:BHBL_MassConc,:'20190727x001_SP2_PBP':ConcTser:BHBL_NumbMeanDp,:'20190727x001_SP2_PBP':ConcTser:BHBL_MassMeanDp as "Saved Data.txt"


data loading.jpg