# Gridding Geophysical Aeromagnetic Data from XYZ data in order to obtain a Grid with Magnetic Field, Elevation and other columns using Python or Simpeg

**URL:** <https://simpeg.discourse.group/t/gridding-geophysical-aeromagnetic-data-from-xyz-data-in-order-to-obtain-a-grid-with-magnetic-field-elevation-and-other-columns-using-python-or-simpeg/411>\
**Category:** Potential Fields\
**Created:** [February 4, 2023, 9:06am UTC](https://simpeg.discourse.group/t/gridding-geophysical-aeromagnetic-data-from-xyz-data-in-order-to-obtain-a-grid-with-magnetic-field-elevation-and-other-columns-using-python-or-simpeg/411 "2023-02-04T09:06:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mandalfred](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mandalfred](https://simpeg.discourse.group/u/mandalfred)\
**Post date:** [February 4, 2023, 9:06am UTC](https://simpeg.discourse.group/t/gridding-geophysical-aeromagnetic-data-from-xyz-data-in-order-to-obtain-a-grid-with-magnetic-field-elevation-and-other-columns-using-python-or-simpeg/411/1 "2023-02-04T09:06:30Z")

</div>

Hello

I have Geophysical aeromagnetic data that was collected in 2014 via the Helicopter. The raw data consist of XYZ whereby the X and Y is the location and the Z is the depth. I use Ubuntu Linux and I wanted to use the SIMPEG in order to grid the data but this tool gives me options for analyzing the already gridded data.

I was wondering if you can assist me with any Python library or how can I use SIMPEG in order to grid my data to obtain the Magnetic field in nanotesla, Elevation(m) from the raw XYZ data

---

<div class="post-metadata">

**Author:** ![mandalfred](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mandalfred](https://simpeg.discourse.group/u/mandalfred)\
**Post date:** [April 2, 2023, 2:10pm UTC](https://simpeg.discourse.group/t/gridding-geophysical-aeromagnetic-data-from-xyz-data-in-order-to-obtain-a-grid-with-magnetic-field-elevation-and-other-columns-using-python-or-simpeg/411/3 "2023-04-02T14:10:27Z")

</div>

Hi Santisoler,

This was very helpful and I did my gridding. However, I wanted to work with Simpeg more. In this regard, I have my data consisting of Lat/Long and the Magnetic value in csv format. Going through SIMPEG documentation, I could not use csv format when it comes to simulation and inversion. The data formats that work with SIMPEG are .obs, .msh, .sus and Simpeg PF input file .inp format. I would like to know if from the Mag data that I have, I can produce these formats or else how can I use my data (csv format) with SIMPEG to achieve inversion and simulation.

Thank you for reading through and your response is highly appreciated.

Alfred
