Spark Tuning
Unfortunately for the backyard tuner, developing a good spark map isn't as straightforward as tuning the fuel with a wideband oxygen sensor. Ideally, a spark map should be developed on a chassis-loading dyno (Mustang). The car is run on the dyno and for every RPM and load bin (the spot on the spark map), the ignition timing is advanced until torque starts to drop off. The point right before the torque drops off is called MBT or mean best torque.
There are a couple of problems with this method. One is the cost of renting a dyno for hours on end. It could easily cost a fortune to get it nailed. But the biggest problem with this method is that many engines (especially high-compression and forced-induction) will encounter knock before reaching MBT. Most engines will ping before reaching MBT.
Because of this, we must keep an ear out for knock while tuning. While knock can be heard, it's much safer to rely on a knock sensor to serve this duty. It's safest to make only changes where needed to the spark map. Typically, the low-load ignition timing that the engine uses stock is best. It's really only under high load and with higher-compression pistons, etc. that other areas in the spark map might need to have some ignition advance removed.
When tuning ignition timing with a knock sensor, you simply reduce the timing advance under those conditions that you encounter knock. There are numerous to control ignition advance. We've listed a few ways and some other terms that will help you.