Forward Modelling and Joint Inversion of gravity and magnetic geophysical data

I want to do forward modelling and joint inversion of gravity and magnetic data to know the subsurface lithology of the rocks. Using Surfer 15 golden software I have created the contour maps of the respective data. Now I want to perform forward modelling on the same and then joint inversion of the gravity and magnetic data. I want to perform this in Image J.

Original tif image: download

The forward modelling with be identical as the contour map images that I have attached below,just that I dont want contours in them. The model generated must be colour coded with warm colour showing high gravity or magnetic value while cold colours showing comparitively less gravity or magnetic values. I am also attaching the reference paper as well because I want coding of the forward modelling and inversion with the respective output.
The sample gravity data is in excel that needs to be added in above is:


Reference Paper link :

Kindly revert as soon as possible.

Good day,

please try to explain your desire in a way that can be understood by non-experts. I don’t think that we can expect many geo-physicists on this Forum.

At least I don’t understand what you like to obtain and I don’t have time to read papers for this purpose.

Furthermore, please tell us where the data you are showing comes from. Is it your proper data or data from the literature?



If what you’d like to do is generate an image (with optionally a false-color look-up table) from sparse data (i.e. data points not necessarily aligned to a grid), I’d recommend having a look at this ImgLib2 example:

1 Like


Thank you for your reply. Firstly it’s an acquired field data.

And I want to do modelling and inversion to know the rocks lithology beneath the surface from where the data is acquired.

Thank-you for the suggestion I will definitely consider this.

And I want to do modelling and inversion

What does that mean?

What is a model in your field?
What does inversion mean; inversion of what?



Modelling will be a 2D map that will contain latitude value on X axis and longitude value on Y axis and the gravity value on Z axis. I have attached a picture of the contour map so the model that I need would be similar to that. Now inversion is the post step of modelling where we will analyse the model depth wise instead of latitude and longitude values.


I understand that you have a list of coordinates (Lat, Long) and values (Gravity) and these can be represented as an image with the gray values indicating the “Gravity”.

The problem is, that your coordinates are decimal numbers and images need integer coordinates. Consequently, your first step would be to convert the decimal numbers to reasonable integers starting with zero for the smallest decimals. You can do this either in Excel or by an ImageJ-macro.

The next step would be to import the data to ImageJ as an image, or, if you’ve done the coordinate conversion in ImageJ, to write the Gravity values to the image matrix. A LUT can then be applied to the image.

Now inversion is the post step of modelling where we will analyse the model depth wise instead of latitude and longitude values.

I’m unclear about what

analyse the model depth wise


Does it mean that you are looking for the coordinates with a given Gravity, i.e. you want to highlite the points or areas that have a certain Gravity?



OK thank-you for your valuable inputs. Will definitely follow them.

Welcome Sanaa,
This should not be difficult at all. Basically all you need is access to the full x,y and z data acquired in the field. If it is not proprietary will you please allow us access to it?


how do you suggest to create the desired image from the excel data in a different or more easy way as the one I’ve pointed out?

Just curious.


Hey Herb,
Just a way of explaining it that is slightly easier to understand.


Perhaps I didn’t get the point of what is the processing goal.


The forward modelling is method where you know the source geometric distribution and in our case density and mag. susceptibility information. Then we are talking about forward modelling. I think you would like to use only inversion (from measured field you want to know subsurface image) since you don’t have some additional information about geology. To do so, first thing first you need to create 3D model or 2D if you want XZ/XY/YZ slice only. Then calculate kernel (Last and Kubik, Blakely etc…) after that you can try to use Tikhonov regularization which is very easy to implement in python also in java or c or use preconditioned conjugate gradient or more difficult techniques. And i see the most significant anomaly lies very close to the edge it might won’t produce good result. And also i am not sure if you substract linear trend from this field.