The following script calculated differences of ROIs for a number of files.
#!/bin/env perl use Spectra; #use GQE; if( scalar( @ARGV) < 2) { print "\n Usage: \n\n"; print " ./roi.pl startNo stopNo \n\n"; goto finish; } Spectra::delete(); my $start = $ARGV[0]; my $stop = $ARGV[1]; my $res = SCAN->create( name => "result", start => $start, stop => $stop, delta => 1, xlabel => "Filenumber", ylabel => "delta-roi"); my $count = 0; foreach my $i ( $start .. $stop) { my $s1 = SCAN->read( file_name => "ll_00035_mythen_${i}.dat", format => "asc"); my $roi1 = $s1->roi( min => 350, max => 700); my $roi2 = $s1->roi( min => 750, max => 1050); my $temp = $roi1 - $roi2; $res->{x}[$count] = $i; $res->{y}[$count] = $temp; # print " i $i res $temp\n"; $count++; } $res->autoscale(); $res->display(); $res->write( file_name => "roi_${start}_${stop}.dat", format => "asc"); if( Spectra::yesno( "Enter Spectra")) { Spectra::gra_input(); } finish: ;