Most of the time all you have to remember is that the current spectrum (the one that gets plotted with the n command) is in the x-register. This may (in the case of f-p-b) be a fitted baseline. If you load one spectrum and then another, the first is pushed down into the y-register, and the second goes into the x-register. The command ave averages the two, and places the result into the x-register. This is all carefully described in the SPECX manual. However, in case you need to understand more (that is, you happen to be a Luddite who likes the typical department-store calculator better than an HP), you can see the contents of the stack using the command
show-stack
For department-store calculator people it's important to know that the stack is upside-down. Position X is the bottom and T is the top. The spectrum in the bottom register is the current one.
There are four operations you can do to move the stack registers around and one command to clear the stack which is, of course, clear-stack. The four operations are; xy-interchange, roll-stack, push-stack-up, and pop-stack-down. xy, roll, push and pop will suffice.
Table
shows the results of these four commands.
| Stack posn | Scan no | Stack posn | Scan no | |
| X | 001 | X | 002 | |
| Y | 002 | Y | 001 | |
| Z | 003 | XY-INTERCHANGE | Z | 003 |
| T | 004 | T | 004 | |
| X | 001 | X | 002 | |
| Y | 002 | Y | 003 | |
| Z | 003 | ROLL-STACK | Z | 004 |
| T | 004 | T | 001 | |
| X | 001 | X | 001 | |
| Y | 002 | Y | 001 | |
| Z | 003 | PUSH-STACK-UP | Z | 002 |
| T | 004 | T | 003 | |
| X | 001 | X | 002 | |
| Y | 002 | Y | 003 | |
| Z | 003 | POP-STACK-DOWN | Z | 004 |
| T | 004 | T |
Specx Cookbook Reduction of millimetre wave data