The primary function of the eimsim package is to test procedures for detecting sources in images taken by the EPIC x-ray cameras on XMM-Newton. Simulated EPIC images are constructed; these images are subjected to a source-detection procedure; finally, the detection results are assayed.