MATLAB Code

These are some MATLAB codes I’ve written, mainly focusing on the problem of evaluating the measurement capabilities of irregular gravity survey grids. If you use these codes in your work, please credit me appropriately.

CNGridSensitivity.m (download)

This code calculates whether or not a spherical source at a given location will be detectable for a given measurement grid over a range of parameters.

How it works:

A parameter combination is considered detectable when a source with those parameters causes a gravity signal over the noise level at a number of stations at or above the tolerance level. The noise level and tolerance lever are specified by the user. The source parameters varied include depth, volume, and density contrast. The ranges of these parameters (e.g., 100 to 500 kg m-3 for density contrast) are supplied in the variable “Param” as described in the help section of the function. The primary output is a set of three plots that indicate whether or not the source is detectable for certain parameter combinations. In each plot, one parameter is plotted against another, and detectable combinations of parameters are indicated with blue stars and non-detectable combinations are indicated by red circles. If in a plot a parameter combination is plotted with a blue star, this means that that parameter combination will always be detectable by the measurement grid independent of the third parameter. If the parameter combination is plotted with a red circle, that parameter combination will never be detectable by the measurement grid, also independent of the third parameter. If a parameter combination is plotted with both a blue star and a red circle, whether or not that parameter combination will be detectable is dependent on the third parameter that is not displayed in that plot.

CNDikeGridSensitivity.m (download)

This code calculates whether or not a dike at a given location will be detected with the user supplied measurement grid over a range of parameter combinations.

How it works:

The parameters varied are depth to top of dike, dike depth extent, dike width, and density contrast. Ranges of these parameters are defined in the variable “Param” as described in the help section of this function. The output is a set of six plots that show which combinations of parameters are detectable or not. In each plot, one parameter is plotted against another, and detectable combinations of parameters are indicated with blue stars and non-detectable combinations are indicated by red circles. If in a plot a parameter combination is plotted with a blue star, this means that that parameter combination will always be detectable by the measurement grid independent of the third parameter. If the parameter combination is plotted with a red circle, that parameter combination will never be detectable by the measurement grid, also independent of the third parameter. If a parameter combination is plotted with both a blue star and a red circle, whether or not that parameter combination will be detectable is dependent on the third parameter that is not displayed in that plot.

SensitivityMap.m (download)

The SensitivityMap.m code provides a visual determination of what resolution capabilities would be lost by choosing points for a gravity measurement grid only in accessible areas versus measuring on a regularly spaced grid with smaller station intervals.

How it works:

The code performs the same calculations as in the GridSensitivity codes, but at a network of source locations specified by the user rather than one source location. The user provides the coordinates for the proposed survey grid, a regular ideal grid (a high density grid with regularly spaced stations), and a regular grid of source locations, and as for the GridSensitivity codes, a specified tolerance and noise level. The user also provides a matrix containing combinations of the parameters of density contrast, depth, and volume for the forward modeling sources. These parameters should encompass the dimensions of source you might hope to image in the survey area.

With these inputs, the code calculates at each source location and for each set of the three modeling parameters whether a source at that location with those parameters is detectable using the survey grid and the ideal grid. For each source location point, the number of parameter sets determined detectable by the survey grid and the number of parameters sets determined detectable by the ideal grid detected is counted. A score is then determined for that source location point by dividing the number of parameter sets detected by the survey grid by the number of parameter sets detected by the ideal grid. At the completion of the code, each source location coordinate has an assigned score indicating how well the survey grid fared relative to the ideal grid. These results can then be gridded and mapped using programs like Surfer or the capabilities within MATLAB to generate a map of areas of good and poor coverage.

Flowchart of the SensitivityMap algorithm The process begins at the top step, and repeats for each source location.