WebbPSF provides a PSF simulation tool in a flexible and easy-to-use software package implemented in Python. Functionality includes support for spectroscopic modes of JWST NIRISS, MIRI, and NIRSpec, including modeling of slit losses and diffractive line spread functions.
https://ui.adsabs.harvard.edu/abs/2014SPIE.9143E..3XP , https://ui.adsabs.harvard.edu/abs/2012SPIE.8442E..3DP , https://webbpsf.readthedocs.io/en/latest/_downloads/95bc4fa586a2939e7e5d1d5407e71c3a/Improved_PSFs_for_Webb.pdf