SIMPA: an open-source toolkit for simulation and image processing for photonics and acoustics