watex.externals.zutils.old_z_error2r_phi_error#

watex.externals.zutils.old_z_error2r_phi_error(x, x_error, y, y_error)[source]#

Error estimation from rect to polar, but with small variation needed for MT: the so called ‘relative phase error’ is NOT the relative phase error, but the ABSOLUTE uncertainty in the angle that corresponds to the relative error in the amplitude.

So, here we calculate the transformation from rect to polar coordinates, esp. the absolute/length of the value. Then we find the uncertainty in this length and calculate the relative error of this. The relative error of the resistivity will be double this value, because it’s calculated by taking the square of this length.

The relative uncertainty in length defines a circle around (x,y) (APPROXIMATION!). The uncertainty in phi is now the absolute of the angle beween the vector to (x,y) and the origin-vector tangential to the circle. BUT….since the phase angle uncertainty is interpreted with regard to the resistivity and not the Z-amplitude, we have to look at the square of the length, i.e. the relative error in question has to be halfed to get the correct relationship between resistivity and phase errors!!.