immport of data and loop


Hello I am new with igor please I would like to import data (with a procedure) from several files with a loop and put the command if end if so as not to import values ​​lower than 0 Can someone help me?


I would do this in two steps, first import and then delete points less than zero on imported data.

for more precise guidance on setting this up we would need more details on the data files. In general my process starts starts with:

string the list,the run

variable Index,max index

newpath/o datafolder //this sets the path to the data source

thelist=indexedfile(datafolder,-1,”.csv”) //this makes a list of the data files

maxindex=itemsinlist(the list)

for (index=0;index<max index;index+=1)

load …. //details of you file






ok thank you very much and I have another question I did not understand how to call a 2nd function

Below are two approaches to call functions. This is likely the point where folks will suggest that you read the manual and do the tutorials on programming.

Function do_sequential()

     return 0

Function do_first()

     print "In first"
     return 0

Function do_second()

     print "In second"
     return 0
Function do_withembedded()

     return 0

Function do_primary()

     print "In primary"
     return 0

Function do_secondary()

     print "In secondary"
     return 0