watex.methods.em.ZC.remove_static_shift#
- ZC.remove_static_shift(ss_fx=None, ss_fy=None, out=False, rotate=0.0, **kws)[source]#
Remove the static shift from correction factor from x and y.
The correction factors ss_fx and ss_fy are used for the resistivity in the x and y components for static shift removal.
Factors can be determined by using the
get_ss_correction_factors()IfNone, factors are found using the spatial median filter. Assume the original observed tensor Z is built by a static shift \(S\) and an unperturbated “correct” :math:`Z_{0} :\[Z = S * Z_{0}\]therefore the correct Z will be:
\[Z_{0} = S^{(-1)} * Z\]- Parameters:
ss_fx (float, Optional) – static shift factor to be applied to x components (ie z[:, 0, :]). This is assumed to be in resistivity scale. If None should be automatically computed using the spatial median filter.
ss_fy (float, optional) – static shift factor to be applied to y components (ie z[:, 1, :]). This is assumed to be in resistivity scale. If
None, should be computed using the spatial filter median.rotate (float, default=0.) – Rotate Z array by angle alpha in degrees. All angles are referenced to geographic North, positive in clockwise direction. (Mathematically negative!). In non-rotated state, X refs to North and Y to East direction.
out (bool , default =False,) – Output new filtered EDI. Otherwise return Z collections objects of corrected Tensors.
ss (dict,) – Additional kweyword arguments passed to
get_ss_correction_factors()
- Returns:
( static shift matrix,coorected_z) – If
exportisTrueexport to new edis and returns nothing.- Return type:
np.ndarray ((2, 2)) or watex.externals.z.Z
Note
The factors are in resistivity scale, so the entries of the matrix “S” need to be given by their square-roots. Furhermore, ss_fx and ss_fy must be supplied for a manual correction. If one argument of the aforementionned parameters are missing, the auto factor computation could be triggered and reset the given previous given factor.
Examples
>>> import watex >>> from watex.methods import ZC >>> edi_sample = watex.fetch_data ('edis', samples =17 , return_data =True ) >>> zo = ZC ().fit(edi_sample) >>> zo.ediObjs_[0].Z.z[:, 0, 1][:7] array([10002.46 +9747.34j , 11679.44 +8714.329j, 15896.45 +3186.737j, 21763.01 -4539.405j, 28209.36 -8494.808j, 19538.68 -2400.844j, 8908.448+5251.157j]) >>> zc = zo.remove_static_shift () >>> zc[0].z[:, 0, 1] [:7] array([ 8028.46578676+7823.69394148j, 9374.49231974+6994.54856416j, 12759.27171475+2557.831671j , 17468.06097719-3643.54946031j, 22642.21817697-6818.35022516j, 15682.70444455-1927.03534064j, 7150.35801004+4214.83658174j])