Recibido: 25 de marzo de 2022; Revision Received: 16 de mayo de 2022; Aceptado: 31 de mayo de 2022
Open-source learning as a skill for geoelectrical data processing: the case of pyGIMLi
Aprendizaje de código abierto como habilidad para el procesamiento de datos geoeléctricos: caso pyGIMLi
Abstract
It is important that new strategies are developed for the management of geoelectrical data produced from engineering and geoscience processing techniques. For this reason, the article demonstrates how pyGIMLi can be used for this purpose. pyGIMLi is an open-source library for the inversion of apparent resistivity array that are often obtained with different geoelectrical survey equipment. The aim is to be able to use this library unaided for various projects and/or to perform various data operations in which the results obtained are more specific and differentiated than those derived from other processing techniques, taking advantage of the fact that this tool is open-source.
Keywords:
learning in engineering, geosciences, open-source, pyGIMLi, geoelectrical data.Resumen
Debido a la importancia de utilizar nuevas estrategias para el manejo de datos geoeléctricos a partir de las técnicas de procesamiento de la ingeniería y ciencias de la tierra, este artículo se centra en mostrar la estructura para el uso de pyGIMLi, una librería de código abierto para realizar la inversión de la matriz de resistividad aparente que se obtienen a menudo con diferentes equipos de prospección geoeléctrica, con la finalidad de adquirir la habilidad de usar esta librería de forma independiente en diversos proyectos y/o realizar varias operaciones con los datos en las se puedan obtener resultados más específicos y diferenciados de otras técnicas de procesamiento; gracias a las ventajas de usar código abierto.
Palabras clave:
aprendizaje en ingeniería, ciencias de la tierra, código abierto, pyGIMLi, datos geoeléctricos.1. Introduction
The dependence on commercial software to process electrical data 1-3, including geoelectrical data, has certain consequences. The first is that the analysis of the results is affected by the very direct way in which these programs process them. The second is that it is not cognitively beneficial for the engineer processing the data because, in research, there should not be a gap between knowledge and application 4. This is often the case when working with closed-source software, as it is difficult to understand the software's behavior and the information it has produced.
A promising alternative that addresses this situation is open-source software or environment, in which the same geoelectric data processing tools have been developed, but with code that can be seen, modified, and distributed freely 4, or simply as part of environments provided by open-source platforms. This has stimulated new training strategies for working on the exploration and logistics stages of research on energy, minerals, and resources 5. It has also strengthened engineering education in the undertaking of multiple tasks at the same time, such as the collection, processing, and analysis of data 6.
This is in clear contrast to the black box model, which is a fairly common type of closed-source software where no prior knowledge is required for its use and which often requires exploration to achieve new data analysis techniques. However, this exploration is not possible precisely due to its information-only input-output philosophy 7-10.
The purpose of this article is therefore to give a demonstration of geoelectrical signal processing for the exploration of mineral resources, and to illustrate the data structure and parameters by applying the useful features of the open-source environment pyGIMLi, with the aim of replicating the results and acquiring the ability to perform all of these processes correctly.
2. Data description
2.1 Localization
The geoelectrical data samples correspond to line-3 of an electrical resistivity tomography (ERT) profile taken in an area adjacent to drill hole 171 (PM-171 as seen in Fig. 1) on the open pit mining license of Inversiones WGM S.A.S. (Fig. 2) located in the hamlet of Maigento, Caucasia, Antioquia, Colombia (Fig. 3).
Figure 1: Field polygon of the 3 Electrical Resistivity Tomography profiles near borehole PM-171.
Figure 2: Description of the mining license where the samples were taken.
Figure 3: Geographic coordinates for the hamlet of Margento.
2.2 Acquisition and characteristics
The ABEM Terrameter LS was used to take the samples, with electrodes fixed at a 5-meter initial center spacing and a standard lateral spacing (Fig. 4). A horizontal 5-meter offset was applied by ABEM on the surface to acquire the sample profile of each depth extension as seen in Figs. 5-7.
Figure 4: Inverted Dipole-Dipole Electrode Configuration, in which the power electrodes N-M and the current electrodes A-B can be observed in the order N-M-A-B, although they are also commonly ordered A-B-M-N.
Figure 5: Sampling at the first depth of investigation or depth l D with a center spacing of 5 meters and taken approximately 67.5 meters from the point at which data collection commenced.
Figure 6: Sampling at the second depth of investigation or depth l D with a center spacing of 15 meters and taken almost 125 meters from the point at which data collection commenced.
Figure 7: Sampling at the end of the third depth of investigation or depth l D with a center spacing of 25 meters and taken approximately 182.5 meters from point at which data collection commenced.
A total of 12 extensions of depth of investigation I D were measured, hereafter referred to simply as depth. The maximum depth was approximately 33.8 meters. Fig. 8 shows the resistivity triangles (£2m) that represent the entire distribution of samples acquired from each data line profile of the subsurface.
Figure 8: Resistivity triangles of all the samples taken, showing a decrease in resistivity values as depth increases.
3. Processing
The pyGIMLi environment is an open-source, structured library that provides tools for modelling and inversion of electrical geophysical data 11. It is structured because it depends on other libraries and a specific version of the programming language Python to function. It is supported by R programming languages for scientific computing 12.
This library is particularly useful for manipulating RVector type variables, which are used to work with the system of linear equations on which pyGIMLi inversion is based (eq. 1-3) 13:
where:
-
Φ represents the model solution of the Tikhonov regularization for data inversion 14,15.
-
Φ𝑑 is the residual norm.
-
λ is the regularization parameter lambda.
-
Φ𝑚 is the solution norm.
-
𝐃 is the diagonal matrix of the inverse of the
-
relative measurement error vector 𝑒rr.
-
𝐝 is the apparent logarithmic resistivity vector 𝑙og (𝑟ℎ𝑜a).
-
𝐦 is the logarithmic resistance vector 𝑙og (𝑟).
-
f(m) is an m-response model.
-
m° can be a model containing a-priori information, and C is the identity or diagonal weighting matrix.
-
m° can be a constant vector and use C to control the characteristics of the investment model.
3.1 Data import
pyGIMLi uses a structure called unified data format (UDF) that organizes the information contained in the geoelectrical data entered and ensures that all information is more transparent and transportable 16. In other words, UDF makes it much easier to understand the information contained in the data delivered by the program and allows fully customized variability to be performed in functions like assignments, variable type transformation, copying, and rewriting.
Geoelectrical data taken with measurement equipment such as the ABEM Terrameter LS, AGI SuperSting, GeoSys, GeoTom, IRIS Instrument Syscal Pro, Lippmann 17-22 have different output formats, and other formats, such as res2dinv 23, also exist. The pyBERT library available in the Anaconda distribution 24) uses the lines of code in Algorithm 1 to convert these different data formats and line-3 into UDF.
Algorithm 1: Command for importing samples and other geoelectrical data output formats into the unified data format.
3.2 Calculation of essential variables
For the basic inversion of geoelectric data in pyGIMLi, the following must be calculated:
-
Relative measurement error err.
-
Geometric factor k.
-
Resistivity rhoa.
These must satisfy the required variables of the inversion model in eq. (1), since the samples give us the resistance r. This is achieved by using the lines of code from Algorithm 2 using the data already imported into the UDF.
Algorithm 2: Commands to calculate the essential variables of the pyGIMLi investment model.
3.3 Inversion process and parameters
With the essential variables now calculated, the ERT manager shown in Algorithm 3 performs the following set operations on the samples and parameters:
Algorithm 3: Commands for the inversion of ERT data with parameters defined for a between 1 and 5, and output of the resistivity map (ERT image).
-
sr is defined as True to calculate the primary potentials that can be used in the secondary investment grid.
-
verbose is defined as True to see the data processing flow (iterations) and the quality score of the inversion (chi-square x2). The latter is of vital importance since it is essential to obtain an x2 of between 1 and 5 13 or if possible, of 1, to achieve a perfect fit.
Next, in the inversion, the following was defined:
-
Regularization parameter λ = 5, corresponding to the λ of eq. (1).
-
Maximum cell size paraMaxCellSize = 1.
-
Maximum depth paraDepth = 33.8.
-
Data boundary interpolation paraBoundary = 0.
-
Robust data robustData = True, and the ERT output was limited to the minimum and maximum apparent resistivity values shown in Fig. 8:
-
cMin = 5.82.
-
cMax = 3120.
4. Results
The application of Algorithm 4 returned the output parameters of the inversion shown in Table 1. Here, it is important to note that the value of x 2 is very close to 1, and this lends reliability and validity to the processed image and to the results for study. Additionally, the number of iterations is relatively low, and this indicates that the same machines and will easily obtain almost the same results. However, it is important not to disregard the fact that here,
Algorithm 4: Open-source code in pyGIMLi for ERT processing of collected samples and applicable to other input data.
Table 1: Sample inversion output parameters.
Iterations | dPhi | Chi-square |
---|---|---|
7 | -3.13 | 1.1 |
Source: Authors and pyGIMLi.
The convergence criterion dPhi, while still a negative value, is close to 2%, and this is not desirable.
Fig. 9 shows the ERT that resulted from applying the whole processing scheme at once to the apparent resistivitydata of the Inverted Dipolo-Dipolo Array. Long zones of division between low and high resistivities can be observed, as well as a lateral interpolation very much in accordance with the distribution of the samples shown in Fig. 8.
Figure 9: ERT from the geoelectric data and the inversion process described in this paper.
This exercise determines that the structural construction produced the inversion of the pyGIMLi model provides results that enable the analysis and interpretation of the study zones.
It should be noted that the depth label is not automatically generated in the pyGIMLi image, so this must be done manually with reference to the plot commands of the matplotlib library.
5. Conclusions
The simultaneous sample processing technique gives an outstanding result in terms of educational benefit, since the process line can be applied constantly and repeatedly to the various samples to be taken. In this way, it bridges the gulf between knowledge and application, resulting in learning. The consolidation of these tools renders them exceptionally useful for problem solving, a skill of utmost importance in the 21st century and in the context of the fourth industrial revolution.
Literature review
Geoelectric processing techniques exist because of ill-posed problems (inverse problems) that can be applied to the field of geophysics through computerized tomography 25. For many years now, mathematical models or numerical solutions have provided the main solution to these problems.
Tikhonov regularization is a model that was established by Andréi Nikoláievich Tíkhonov in his pioneering work of the 1960s, as mentioned by Benning and Burger [26]. It was adapted for the Gauss-Newton model scheme implemented by pyGIMLi 27. However, Inman, Ryu, and Ward's resistivity inversion 28 was fundamental to the development of the quasi-Newton inversion system developed by Loke and Barker [29] which today has become the basis for a large amount of geoelectrical processing software used for many applications and research in mining and other fields.
Furthermore, artificial intelligence methods, such as deep learning, convolutional neuronal networks, and the fuzzy deep wavelet neural network 30-32, have been accruing importance as processing techniques in geoelectrics in recent years.
Acknowledgements
Acknowledgments
We would like to express our gratitude with Instituto Tecnologico Metropolitano and Universidad Nacional de Colombia for supporting this work as a part of the research projects P20224 and P20248. In addition, we thank Inversiones WGM for information and traceability for data collection.
References
- [1] Ledo, A., Lourenço C.A., Laranjinha, J., Gerhardt, G.A. and Barbosa, R.M., Concurrent measurements of neurochemical and electrophysiological activity with microelectrode arrays: new perspectives for constant potential amperometry. Current Opinion in Electrochemistry, 12, pp. 129-140, 2018. DOI: https://doi.org/10.1016/j.coelec.2018.05.018 [URL] 🠔
- [2] Seo, G., Lee, G., Kim, M.J., Baek, S.-H., Choi, M., Ku, K.B., Lee, C.-S., Jun, S., Park, D., Kim, H.G., Kim, S.-J., Lee, J.-O., Kim, B.T., Park, E.C. and Kim, S.I., Rapid detection of Covid-19 causative virus (SARS-CoV-2) in human nasopharyngeal swab specimens using field-effect transistor-based biosensor. ACS Nano, 14(4), pp. 5135-5142, 2020. DOI: https://doi.org/10.1021/acsnano.0c02823 [URL] 🠔
- [3] Trillo-Montero, D., Santiago, I., Luna-Rodriguez, J.J. and Real-Calvo, R., Development of a software application to evaluate the performance and energy losses of grid-connected photovoltaic systems. Energy Conversion and Management, 81, pp. 144-159, 2014. DOI: https://doi.org/10.1016/j.enconman.2014.02.026 [URL] 🠔
- [4] Guerrero-Alarcón, C.A. y Recaman-Chaux, H., Frameworks para el desarrollo de aplicaciones Web que utilizan código abierto. Unidades Tecnológicas de Santander, Bucaramanga, Colombia, 2009. 🠔
- [13] Rücker, M., Advanced electrical resistivity modelling and inversion using unstructured discretization, PhD Dissertation, Fakultãt für Physik und Geowissenschaften, University of Leipzig, Leipzig, Sachsen, Deutschland, 2011. 🠔
- [19] Lee, Y., Deusner, C., Kossel, E., Choi, W., Seo, Y. and Haeckel, M., Influence of CH4 hydrate exploitation using depressurization and replacement methods on mechanical strength of hydrate-bearing sediment. Applied Energy, 277, art. 115569, 2020. DOI: https://doi.org/10.1016/j.apenergy.2020.115569 [URL] 🠔
- [22] Müller, K., Polom, U., Winsemann, J., Steffen, H., Tsukamoto, S., Günther, T., Igel, J., Spies, T., Lege, T., Frechen, M., Franzke, H.J. and Brandes, C., Structural style and neotectonic activity along the Harz Boundary Fault, northern Germany: a multimethod approach integrating geophysics, outcrop data and numerical simulations. International Journal of Earth Sciences, 109(5), pp. 1811-1835, 2020. DOI: https://doi.org/10.1007/s00531-020-01874-0 [URL] 🠔
- [25] Lenzen, F. and Scherzer, O., Tikhonov type regularization methods: history and recent progress, European Congress on Computational Methods in Applied Sciences and Engineering (ECCOMAS), pp. 1-21, 2004. 🠔