I've decided to make the script only work using a split thin lens model.
The reason being that using a thin lens assumption breaks down when you are at short distances, as we are when doing deep focus photography.
This follows from the fact that ML gives us the distance between the sensor plane and the object, but the depth of field equations we all use, including the hyperfocal distance, are all measured from the lens front principal plane, which we don't know.
What we do know from the manufacturer is the maximum magnification, which occurs at the minimum focus distance and, in the case of a zoom lens, at the maximum focal length. Even if we didn't knows this data, or wish to verify it, it is easy to do by taking a picture of a ruler at the minimum focus distance and measuring things in post, ie to derive the magnification at that focal length.
I intend to write more about the split lens model on my blog, and will post a link here when I do.
For now, here is the latest script, which, IMHO, gives us the best mapping between ML supplied distances and lens calculation distances. BTW, for consistance, this script is totally independent of the ML depth of field approximations, including the ML hyperfocal.
https://gist.github.com/pigeonhill/d02e5d5a88516c67e929397d74af0142