My typical IMD workflow.
Test configuration
Two tone test source feeding stepped attenuator, feeding DUT, feeding fixed value power attenuator, feeding switched notch filter, feeding SA.
Set stepped attenuator to give output of DUT at approx 10 to 20dB below saturated output level
Measure output level with SA via fixed attenuator, with notch filter off.
Setup SA to track test tone peak levels, and add level offset for value of external fixed power attenuator.
Switch in notch filter and note level reduction of test tones, compensate for notch attenuation as additional offset in calculations and displayed values.
As the SA should track the test tones in frequency and level, any drift in test sources should be continuously compensated for.
The test tone frequencies and compensated levels can then be used to accurately and automatically set and track the IMD component measurement markers in a narrow bandwidth, in order to maximise the dynamic range.
The IMD traces will be at a lower level than the test tone level, even though these are notched for measurement purposes, so the SA noise floor with the DUT running may have to be used to determine the optimum reference level for these measurements.
The marker information can then be used to directly calculate the IP2 & IP3 values and display them.
As a confidence check an extra 3dB can be switched in to the SA input and the calculated values should not vary by more than approx +/-1dB from the previous measurement without the extra 3dB.
The stepped attenuator on the DUT input can also be varied to determine the effect on IMD values at different power levels up to the DUT saturation point.
I hope this makes sense.
Regards,
Martin