scans := [1,2,3]; #my vector of scans to average, set this however you want d.sclear() # clear the accumulator for (scan in scans) { d.getc(scan, nif=2); d.accum(); } d.ave(); d.show(); myavg := d.gsget();