High-pass, Low-pass and Band-pass Filtering in 2D


Program objectives

The high-pass, low-pass and band-pass filterings (in 1D or 2D) are techniques used to remove spectral components for a frequency or wave-number given (Corchete et al., 2010). These classical filtering techniques are described in detail by Bath (1974) and Brigham (1988). You can compute these filtering techniques in 2D by means of the present program, as it will be described below.

Program description

The SPECTRUM2D program and its file, which is needed to run this application, are enclosed into a ZIP file named "spectrum2d.zip". When you have got the ZIP file and you have uncompressed this file, you have two files named spectrum2d.exe and spectrum2d.dat. The file spectrum2d.exe contains a program (in FORTRAN code for PC) for the computation of the above mentioned filtering techniques in 2D. The file spectrum2d.dat is an ASCII file in the free format and contains the parameters:

IFMT_INPUT, IFMT_OUTPUT, LAT, LONG, N, M, D

The description of these parameters is as follows:

IFMT_INPUT = With value 1 the input file with the data to be filtered is a matrix in the free format. With value 0 the input file with the data to be filtered is a row in the free format, in which the data matrix is listed by rows. This input file must be named matrix.dat and it must be an ASCII file written in the free format.
IFMT_OUTPUT = With value 1 the output file with the filtered data is written in (x,y,z) format. Where (x,y,z) are longitude, latitude and point value of the grid. With value 0 the output file with the filtered data is written as a row file in the free format, in which the data matrix is listed by rows. This output file will be named filtered.dat and it will be an ASCII file written in the free format.
LAT, LONG = Geographical coordinates for the origin point of the grid data.
N = Number of points data in the grid for x-axis (šE of longitude). This value must be an even number. The maximum value for this number is 1400.
M = Number of points data in the grid for y-axis (šN of latitude). This value must be an even number. The maximum value for this number is 1400.
D = Distance increment between the values in x-axis and y-axis (in degrees). Only equidistant points are taken into account.

Running the program

Firstly, we need obtain the input file matrix.dat to be filtered with the SPECTRUM2D program. For it, the data matrix named Iberia.dat can be downloaded from ../www/Bouguer_maps.htm. This file is the Bouguer anomaly map of Iberia. This ASCII file contains a matrix with 361 rows and 561 columns. This file is compressed into another file named Iberia.zip. The first row of this matrix corresponds to the latitude of 35 north, the last row corresponds to the latitude of 44 north. The first column of this matrix corresponds to the longitude of 10 west and the last column corresponds to the longitude of 4 east. The data file selected for input is shown in Figure 1. This file can be renamed to matrix.dat and then we can run the SPECTRUM2D program using this file and the file named spectrum2d.dat.

Fig. 1. Bouguer anomaly map of the Iberian area.

The parameters of the data file spectrum2d.dat will be defined according to the data matrix used for input. Thus, these values will be:

IFMT_INPUT = 1 (because the input file is a matrix in the free format).
IFMT_OUTPUT = 1 (because the output file will be written in (x,y,z) format).
LAT, LONG = 35, -10 (geographical coordinates for the origin point of the grid data).
N = 560 (number of points data in the grid for x-axis).
M = 360 (number of points data in the grid for y-axis).
D = 0.025D0 (distance increment between the values in x-axis and y-axis).

When we run this program the following menu is displayed:

2D Filtering menu:
=============

1. High-pass filtering.
2. Low-pass filtering.
3. Band-pass filtering.

... select the option (1,2,3):

Then, we can do each action shown in this menu entering the corresponding number, as it will be described below.

High-pass filtering (option 1)

When you enter the number 1, the program performs a high-pass filtering applying a cosine-rectangular window to the spectra (Bath, 1974; Brigham, 1988). For it, the program asks the wavelength in which the high-pass filter will be located, this question is asked by the text:

Maximum wavelength (in minutes):

In this example, the wavelength selected has been 90 min. When the SPECTRUM2D program has finished the output file filtered.dat is generated. This file contains the input data high-pass filtered to the wavelength of 90 min. Figure 2 shows the results of this filtering.

Fig. 2. Bouguer anomaly map high-pass filtered to 90 min of wavelength, contained in the file filtered.dat.

Low-pass filtering (option 2)

When you enter the number 2, the program performs a low-pass filtering applying a cosine-rectangular window to the spectra (Bath, 1974; Brigham, 1988). For it, the program asks the wavelength in which the low-pass filter will be located, this question is asked by the text:

Minimum wavelength (in minutes):

In this example, the wavelength selected has been 30 min. When the SPECTRUM2D program has finished the output file filtered.dat is generated. This file contains the low-pass filtered map to the wavelength of 30 min. Figure 3 shows the results of this filtering.

Fig. 3. Bouguer anomaly map low-pass filtered to 30 min of wavelength, contained in the file filtered.dat.

Band-pass filtering (option 3)

When you enter the number 3, the program performs a band-pass filtering applying a cosine-rectangular window to the spectra (Bath, 1974; Brigham, 1988). For it, the program asks the wavelengths in which the band-pass filter will be located, this question is asked by the text:

Minimum wavelength (in minutes):
Maximum wavelength (in minutes):

In this example, the period interval selected has been from 30 to 90 min. When the SPECTRUM2D program has finished the output file filtered.dat is generated. This file contains the band-pass filtered map into the wavelength interval (30, 90) min. Figure 4 shows the results of this filtering.

Fig. 4. (a) Bouguer anomaly map band-pass filtered into the wavelength interval of (30, 90) min, contained in the file filtered.dat.

References

Bath M., 1974. Spectral analysis in Geophysics. Elsevier, Amsterdam.

Brigham E. O., 1988. The Fast Fourier Transform and its applications. Prentice Hall, New Jersey.

Corchete V., Chourak M. and Khattach D. (2010). A Methodology for Filtering and Inversion of Gravity Data: an Example of Application to the Determination of the Moho Undulation in Morocco. Engineering, 2, 149-159.