#!/bin/sh # # s_varimap Script to run Ron's varimap program. Gets the title from # the header of the first map file it reads in. Takes its # output file name from the first name of the list file. # The list file is a list of maps all calculated at # the same phase origin, with the same extent in x,y & z, # and with the densities normalized. # # The output files are *.rsa (the real space average) and *. # var (the standard deviation of the density at each pixel) list=$1 filep=`prefix $list` filenum=`wc -l $list | awk '{print $1}'` first_file=`head -1 $list` title=`header < $first_file | tail -80c | awk '{print substr($0,1,25)}'` echo $title" ; "$filenum" data sets" echo $title" ; "$filenum" data sets" > title.zzz cat title.zzz $list > varimap.zzz varimap < varimap.zzz rm title.zzz varimap.zzz mv AVG $filep.rsa mv VAR $filep.var echo "Files created are "$filep".rsa and "$filep".var"