A SAC macro is a script of SAC commands. SAC macros can take several forms depending on how you want to implement them. These include:
|
|
How it is used |
| r mlnt.z mlnt.r mlnt.t
xvport 0.1 0.6 qdp off xlim 58 70 title on "Rotated Data at MLNT" xlabel on "Time, sec" ylabel on "Digital Counts" bd sgf p1 ed sgf sgftops f001.sgf plot1 1 y |
SAC> macro mlntplot |
|
|
How it is used |
| r $1 $2 $3
xvport 0.1 0.6 qdp off xlim 58 70 title on "Rotated Data at MLNT" xlabel on "Time, sec" ylabel on "Digital Counts" bd sgf p1 ed sgf sgftops f001.sgf plot1 1 y |
SAC> macro mlntplot2 mlnt.z mlnt.r mlnt.t |
|
|
How it is used |
| $keys files values
r $files xvport 0.1 0.6 qdp off xlim $values title on "Rotated Data at MLNT" xlabel on "Time, sec" ylabel on "Digital Counts" bd sgf p1 ed sgf sgftops f001.sgf plot1 1 y |
SAC> macro mlntplot3 files mlnt.z mlnt.r mlnt.t values 58 70 |
Another useful trick, particularly when using SAC with CShells, is to use the UNIX directed input. For example, using the first macro above, we could produce the plot by typing the following at the UNIX system prompt:
sysprompt> sac2000 < mlntplot > sac.output
"sac.output" is a file that catches all the sac i/o that would normally be seen on the screen.