ENH: Adding rank computing function and improving depth weighting

This function will allow users to easily get the rank of the inverses that have been made. It's printed out to the log at some point, but I figured it's more useful to have a function than making people (me) dig through logs.

Depth weighting works better, and diagonal noise covariance functionality is now implemented.