I do it manually the example picture also has a texture, but you can see the focus.
I will have to try that script.
I do it this way I duplicate the image Call it Main I then Gaussian blur the background image to my likeing Add layer mask (black in color, full transparency) set the foreground color is white set the background to black choose gradiant radius setting foreground to background click where you want no blur and drag to where you want full blur i will then add a layer on top, all black layer mask, all white radius setting foreground to background click where you want no dark and drag to where you want all black
Unfortunately, a realistic simulation of bokeh would need more information than what is usually available in an unblurred image. Out of focus regions of a picture have various amounts of "blurinness" as a function of distance to the camera. If that distance is known, I imagine adding blur at various levels can simulate quite well the real bokeh (if I understood well, Focus Blur, indicated by prokoudine, can do that). The problem is somewhat similar with correcting perspective on wide-angle images.