Finite difference computer simulation of two diverging electrostatic analyzers: The soft particle spectrometer and the spectrographic particle imager