Could we have it recorded in this docstring more clearly which direction this transformation matrix corresponds to?  I'm guessing that `u` and `v` are angular coordinates corresponding to the tangent plane projection of RA and DEC, but this should be made explicit.  As should which of the directions along RA and DEC `u` corresponds to, likewise for `v`.  This isn't clear to me without looking further into the code, and it ought to be transparent on reading the docstring.

If this is all explained somewhere else I've not got to yet then apologies, but in which case I'd ask that this be referenced from here instead...