## 2 Method
The observed data are the logarithms of the horizontal components of the electric field \((E_{x},E_{y})\), represented as the vector \(\mathbf{d}\); the parameter vector with the resistivities of the interpretive model is \(\mathbf{m}\), which is formed by the \(N_{p}\) values of the logarithms of the resistivities of each homogeneous layer in each CMP column (Figure 2), which are assumed to be isotropic; the 1D mathematical model describing the synthetic data as a function of the parameters is \(\mathbf{F}(\mathbf{m})\). This function represents the layered Earth responses, which are calculated as shown by [5]. Figure 2: Resistivity column associated with one CMP. In order to achieve stable solutions, we apply minimum gradient constraints [11] between adjacent parameters in both vertical and lateral directions. The vertical constraints are crucial for regularizing each CMP inversion, while the horizontal constraints enable the inversion of each CMP to impact the results of its neighboring columns. In this process, lateral smoothing is given more weight than vertical smoothing because, in reservoir environments, sharper variations are more common in the vertical direction than in the horizontal direction. Additionally, some parameters can be left unconstrained to allow for unexpected discontinuities, such as those at the borders of salt or igneous intrusions, when it is applied to complex geology regions. In this application of [PERSON]'s inversion [11], the use of vertical constraints results in a smooth model that is able to generate synthetic data that fit observations gathered from layered environments, whereas the horizontal constraints contribute by enforcing lateral variations in the resistivity columns to approximate the observations under the influence of three-dimensional structures. The smoothing constraints are introduced through the matrices \(\mathbf{S}_{x}\), \(\mathbf{S}_{y}\), and \(\mathbf{S}_{z}\). Each row of a smoothing matrix defines which pairs of parameters are to be constrained to each other simply by placing a \(-1\) and a \(1\) in the positions corresponding to those parameters and leaving zeroes in the remaining elements. When this matrix is applied to the parameter vector \(\mathbf{m}\) in the functional to be minimized, it has the effect of imposing that the difference between those two parameters is as small as possible, by enforcing that the equation  
\[\mathbf{Sm}=\mathbf{0} \tag{1}\]  
be satisfied in a least squares sense. There will be as many rows in the matrix \(\mathbf{S}\) as there are pairs of parameters to be constrained to each other. Another kind of _a priori_ information may be included through the use of absolute equality constraints [12], which are useful when reliable information exists about the resistivities in a given set of parameters, as when there are well logging data in the region under the survey. In this case, if there are \(N_{c}\) parameters to be constrained, the method defines a vector \(\mathbf{m}_{p}\), with only the \(N_{c}\) values that are to be assigned based on the _a priori_ information, and a matrix \(\mathbf{P}_{N_{c}\times N_{p}}\), each row of which has a value of \(1\) in the position corresponding to the parameter to be constrained and zeroes elsewhere, such that  
\[\mathbf{P}\mathbf{m}=\mathbf{m}_{p}. \tag{2}\]  
To reiterate: in the inversion process, the equalities imposed by the constraint matrix Equations (1) and (2) are enforced in a least squares sense. The functional to be minimized, then, includes a term for fitting the data, and one for each kind of constraint that enters the process. In its most general form, it is written as  
\[