#pragma rtGlobals=1 // Use modern global access method. function load_DLS_ALV_New() variable i=0 variable /G points string wnameIACF, fname, wnameTau, wnameEACF, wStr, wnameParam, mystring string Tau = "_Tau", EACF="_EACF", IACF="_IACF", Param="_Param" //wave names getfilefolderinfo/D newpath/O cgms S_path string filelist= indexedfile(cgms,-1,".asc") Display/W=(0,0,340,280); Display/W=(440,0,780,280); do fname = stringfromlist(i,filelist) wnameTau = fname[0,strlen(fname)-5]+Tau wnameIACF = fname[0,strlen(fname)-5]+IACF wnameParam = fname[0,strlen(fname)-5]+Param wnameEACF = fname[0,strlen(fname)-5]+EACF wave w0 = $wnameTau wave w1 = $wnameIACF wave w2 = $wnameParam wave w3 = $wnameEACF LoadWave/J/D/A=wave/P=cgms/K=0 /L={0,27,231,0,1} fname LoadWave/J/D/A=wave/P=cgms/K=0 /L={0,27,231,1,1} fname LoadWave/J/D/A=wave/P=cgms/K=0 /L={0,14,10,1,1} fname //Calculate EACFs Duplicate/O wave1 $wnameEACF Wave wave3 = $wnameEACF wave3/=mean(wave1,20,40) //Do calculation rename wave0 $wnameTau rename wave1 $wnameIACF rename wave2 $wnameParam AppendToGraph/W=Graph0 $wnameIACF vs $wnameTau AppendToGraph/W=Graph1 $wnameEACF vs $wnameTau i += 1 //move to next file while(i