Monogenic Signal Python
Monogenic Signal Python
10.1190/GEO2016-0099.1
Downloaded 05/10/17 to 128.171.159.29. Redistribution subject to SEG license or copyright; see Terms of Use at http://library.seg.org/
F9
F10 Hidalgo-Gato and Barbosa
2 3
BUILDING THE POISSON’S SCALE-SPACE F
MONOGENIC VECTOR u ffi 7
6 i pffiffiffiffiffiffiffiffiffi F7
MNS ðu; vÞ ¼ 6
4 uv2 þv2 5: (7)
The Poisson’s scale-space monogenic signal of a potential-field p ffiffiffiffiffiffiffiffiffi
i 2 2F ffi
u þv
function fðx; yÞ, which is measured in a constant height (z ¼
constant), is a 3D vector given by
Downloaded 05/10/17 to 128.171.159.29. Redistribution subject to SEG license or copyright; see Terms of Use at http://library.seg.org/
where u and v are the wavenumbers in the x- and y-directions, re- We have implemented codes to calculate the local amplitude, the
spectively, F ≡ Fðu; vÞpisffiffiffiffiffiffithe Fourier transform of the potential-
local phase, and the local orientation of the nonscale monogenic sig-
field data fðx; yÞ, i ¼ −1 and p ≡ pðhc ; hf ; u; vÞ is a band-pass nal and the Poisson’s scale-space monogenic signal in version 1.0 of
filter that maps the original function into the Poisson’s scale-space the open-source program Monogenic. The code was implemented in
representation, being defined as Python 2.7/3.5 language and is executed using Anaconda2 64 bit.
pffiffiffiffiffiffiffiffiffiffi pffiffiffiffiffiffiffiffiffiffi
The Anaconda Python is a freely available package that includes the
NumPy library, which is necessary to run the code. However, you
p¼ e−2πhf u2 þv2 − e−2πhc u2 þv2 ; (6) may run the code in any other Python 2.7 interpreter as long as the
NumPy library is installed. Our code is freely available online (http://
where hc > hf > 0 are the parameters related to the Poisson’s software.seg.org/2017/0002) under the Berkeley Software Distribu-
scale-space representation (Felsberg and Sommer, 2001). tion three-clause open-source license. Alternatively, all accompany-
Alternatively, the nonscale monogenic signal can be constructed ing material is available in an online repository (Hidalgo-Gato and
from equation 5 by setting p ¼ 1. In this particular case, the three Barbosa, 2017).
components of the monogenic signal will be given by the original In the program Monogenic v 1.0, we present two functions:
data function, and its first-order Riesz transform; i.e., (1) nss_monogenic_signal (x, y, data, pad_pt, and pad_mode) and
Monogenic signal: A Python implementation F11
(2) pss_monogenic_signal (x, y, data, hc, hf, pad_pt, and pad_mode), The linear ramp mode (linear_ramp) pads the data with a linear
where x and y are the 2D arrays containing the north–south and east– ramp between zero and the edge values. This padding function will
west coordinates, the data are a 2D array with the potential-field data to always fill the edges of the padded array with zeros. The edge mode
be transformed, hc and hf are the scalars required by the Poisson’s (edge) fills all the padded area with the values of the closer edges,
scale-space monogenic signal (equation 6), and pad_pt and pad_mode whereas the mean values mode (mean) pads with the mean values of
Downloaded 05/10/17 to 128.171.159.29. Redistribution subject to SEG license or copyright; see Terms of Use at http://library.seg.org/
are the parameters used to set the data padding. The choice of padding each rows and columns.
parameters will be discussed later. If the Poisson’s scale-space param- The number of padding points (pad_pt) to be added to the origi-
eters are passed to the pss_monogenic_singal function as None nal data array in all directions is an integer number. For example, for
(hc ¼ hf ¼ None), then the monogenic code will automatically cal- an original data array of 2 × 2 points and a pad_pt = 2, the extended
culate default values following our recommendations. Both functions data array will have dimensions of 6 × 6 given by
return the local amplitude, the local phase, and the local orientation of
a 2D array. Equations 2–4 express these attributes in the case of the
Poisson’s scale-space monogenic vector. 4 9
¼> padding with line arramp
In our algorithm, we assume a regular grid at a constant height 7 6
observation level (z = constant). For a computational convenience, 2 3
0 0 0 0 0 0
our algorithm calculates the three components of the monogenic
6 7
signal vector in the wavenumber domain and then transforms it back 60 1 2 4 2 07
6 7
into the space domain. Finally, we calculate the local amplitude, 60 2 4 9 4 07
6 7
local phase, and the local orientation of the monogenic signal. ¼> 6 7: (8)
60 4 7 6 3 07
The algorithm of both functions (nss_monogenic_signal and 6 7
pss_monogenic_signal) inside the file “monogenic.py” is summa- 6 7
40 2 4 3 2 05
rized in the following pseudocode:
0 0 0 0 0 0
Function monogenic_signal
(
x ¼ north coordinates Note that, in this example, we padded the array with a linear ramp
Input← y ¼ east coordinates mode; thus, the values are decreasing to zero without changing the
data ¼ input data center of the original data array. Big data expansions will increase
− pad the data the computation time and may cause overflow. We performed some
− calculate the fast Fourier transform synthetic tests using the three padding modes with different pad_pt
− calculate the Fourier wavenumbers values. Our simulations show that a small number of padding points
− calculate the x- and y-components of the first-order is sufficient to avoid edge effects without affecting the computer
Riesz transform memory and processing time.
− transform the data and the Riesz components back into
the space domain
− remove the pad
− calculate the local amplitude, local phase, and local ori-
entation.8
< local amplitude
Output → local phase
:
local orientation
Data padding
To avoid edge effects using the fast Fourier transform, we extend
the 2D data array. We have included a padding function to expand Figure 1. Synthetic test. Noise-corrupted total-field anomaly pro-
the data using three different modes: linear ramp, edge, and mean duced by the geologic model of Figure 2. The horizontal dashed lines
are the projection in the horizontal plane of the hinge line (black),
values. The pad is included in both monogenic signal functions, and continental oceanic boundary (white), and the edges of the igneous
the user can specify the mode (mode) and the number of points intrusion and the dike (gray). The vertical dashed lines are the transfer
(pad_pt) to expand the 2D array. zones between displacements in the basement.
F12 Hidalgo-Gato and Barbosa
After padding the data, we transform it to the wavenumber do- bodies were magnetized with an inclination of −10° and a declina-
main and calculate the Riesz components. Each Riesz component tion of −20°. We assume that there is no magnetization above the
and the data in the Poisson’s scale-space are then transformed back basement. The edges of the geologic structures were extrapolated
into the space domain. Finally, we remove the pad restoring the data constantly to avoid strong magnetic anomalies near the edges.
array to its original size before calculating the monogenic signal By using the implementation of Uieda et al. (2013), we calculate
attributes.
Downloaded 05/10/17 to 128.171.159.29. Redistribution subject to SEG license or copyright; see Terms of Use at http://library.seg.org/
Figure 3. Enhancements of the total-field anomaly of Figure 1 using the (a) local amplitude, (b) the local phase, and (c) the local orientation of
the nonscale monogenic signal. The horizontal dashed lines are the projection in the horizontal plane of the hinge line (black), continental
oceanic boundary (white), and the edges of the igneous intrusion (red) and the dike (gray). The vertical dashed thin lines are the transfer zones
between displacements in the basement.
Monogenic signal: A Python implementation F13
Downloaded 05/10/17 to 128.171.159.29. Redistribution subject to SEG license or copyright; see Terms of Use at http://library.seg.org/
Figure 4. Enhancements of the total-field anomaly of Figure 1 using the (a) local amplitude, (b) the local phase, and (c) the local orientation in
the Poisson’s scale-space monogenic signal. The horizontal dashed lines are the projection in the horizontal plane of the hinge line (black),
continental oceanic boundary (white), and the edges of the igneous intrusion (red) and the dike (gray). The vertical dashed thin lines are the
transfer zones between displacements in the basement.
3D and 2D magnetic anomalies. On the other hand, the hinge line requires band-pass filtering the data, whereas the nonscale mono-
and the COB produce signals that can be locally approximated by genic signal requires only the original data set. However, the Pois-
2D magnetic anomalies. son’s scale-space monogenic signal yields a sharper image of
Note that neither the nonscale (Figure 3) nor the Poisson’s scale- boundaries of the geologic bodies than the nonscale monogenic sig-
space monogenic signal (Figure 4) is able to enhance the edges of the nal. We demonstrated the use of the monogenic signal by applying it
igneous intrusion because the magnetization vector is not vertical and to synthetic magnetic data. The Python script synthetic.py contains
the intrusion produces a 3D magnetic anomaly. On the other hand, the algorithm to run our synthetic example. This example was run
the 2D anomaly produced by the dike is very well-enhanced using the using specific Poisson’s scale-space parameters. However, users
monogenic signal attributes even in the case of a nonvertical mag- can try different Poisson’s scale-space parameters for the same syn-
netization vector. These results are expected because, as shown by thetic model. Finally, we stress that the application of the nonscale
Hidalgo-Gato and Barbosa (2015), the enhancement of 2D magnetic and the Poisson’s scale-space monogenic signals to enhance other
anomalies with the monogenic signal does not require a vertical mag- geophysical data (e.g., seismic, ground-penetrating radar, gravity,
netization vector. Rather, in case of 3D magnetic anomalies the mag- multiple-component gravity gradiometry, and magnetic gradient
netization vector must be vertical to enhance the true boundaries of data) has no methodological obstacles.
the source by using the monogenic signal.
Taking into account these results, one might think that the mono-
genic signal of a nonvertical magnetization source can only be used to ACKNOWLEDGMENTS
enhance 2D magnetic anomalies. However, we note that even locally
We thank associate editor J. Dellinger, reviewers L. Uieda, T. Irons,
2D magnetic anomalies such as the hinge line and the COB high-
and an anonymous reviewer for their criticisms and suggestions that
lighted in Figures 1 and 2 can be enhanced using the monogenic sig-
helped to improve the first version of the code. We acknowledge the
nal attributes in the presence of nonvertical magnetization.
open-source Python tool kit for geophysical modeling and inversion
The main difference between the nonscale and the Poisson’s
(Uieda et al., 2013) called Fatiando a Terra (Portuguese for Slicing the
scale-space monogenic signal is that the amplitude and phase of the
Earth). V. C. F. Barbosa was supported in this research by a fellowship
latter produces sharper contacts, as shown in Figures 3 and 4. The
(grant no. 307135/2014-4) from Conselho Nacional de Desenvolvi-
most striking feature of the local phase in the Poisson’s scale-space
mento Científico e Tecnológico (CNPq), Brazil. Additional support
monogenic signal (Figure 4b) is that it enhances the edges of the
for V. C. F. Barbosa is provided by Brazilian research agency FA-
dike, the hinge line, and the COB better than the local phase in the
PERJ (grant no. E-26/203.091/2016).
nonscale monogenic signal (Figure 3b).
As shown in Figures 3c and 4c, the local orientation of the mono-
genic signal of a potential field function has not produced a mean- REFERENCES
ingful enhancement of any features of the geologic sources. Cooper, G. R. J., 2014, Reducing the dependence of the analytic signal am-
plitude of aeromagnetic data on the source vector direction: Geophysics,
79, no. 4, J55–J60, doi: 10.1190/geo2013-0319.1.
CONCLUSION Felsberg, M., and G. Sommer, 2001, The monogenic signal: IEEE Trans-
actions on Signal Processing, 49, 3136–3144, doi: 10.1109/78.969520.
Hassan, H. H., and S. V. R. Yalamanchili, 2013, Monogenic signal decom-
We have presented the program Monogenic, a Python 2.7/3.5 position: A new approach to enhance magnetic data: 83rd Annual
package of two functions to calculate the nonscale and the Poisson’s International Meeting, SEG, Expanded Abstracts, 1206–1210.
scale-space monogenic signals of a 2D data. Both monogenic signal Hidalgo-Gato, M. C., and V. C. F. Barbosa, 2015, Edge detection of poten-
tial-field sources using scale-space monogenic signal: Fundamental prin-
functions return the local amplitude, the local phase, and the local ciples: Geophysics, 80, no. 5, J27–J36, doi: 10.1190/geo2015-0025.1.
orientation of a potential-field data or any kind of 2D array. Com- Hidalgo-Gato, M. C., and V. C. F. Barbosa, 2017, Source code repository for
“The monogenic signal of potential-field data: A Python Implementa-
pared with the Poisson’s scale-space monogenic signal, the non- tion”, https://github.com/pinga-lab/paper-monogenic-signal, accessed
scale monogenic signal is easier to use because the former 14 January 2017.
F14 Hidalgo-Gato and Barbosa
Miller, H. G., and V. Singh, 1994, Potential field tilt: A new concept for Roest, W. R., J. Verhoef, and M. Pilkington, 1992, Magnetic interpretation
location of potential field sources: Journal of Applied Geophysics, 32, using the 3-D analytic signal: Geophysics, 57, 116–125, doi: 10.1190/1
213–217, doi: 10.1016/0926-9851(94)90022-1. .1443174.
Nabighian, M. N., 1972, The analytical signal of 2D magnetic bodies with Uieda, L., V. C. Oliveira, Jr., and V. C. F. Barbosa, 2013, Modeling the earth
polygonal cross-section: Its properties and use for automated anomaly in- with Fatiando a Terra: Techniques: 12th Python in Science Conference,
terpretation: Geophysics, 37, 507–517, doi: 10.1190/1.1440276. SCIPY 2013, Proceedings, 90–96.
Nabighian, M. N., 1984, Toward a three-dimensional automatic interpreta-
tion of potential field data via generalized Hilbert transforms: Fundamen-
Downloaded 05/10/17 to 128.171.159.29. Redistribution subject to SEG license or copyright; see Terms of Use at http://library.seg.org/