# Finding the Coordinates or Indices of Regions of Different Density in a Recovered Model

**URL:** <https://simpeg.discourse.group/t/finding-the-coordinates-or-indices-of-regions-of-different-density-in-a-recovered-model/163>\
**Category:** Potential Fields\
**Created:** [December 3, 2020, 3:07pm UTC](https://simpeg.discourse.group/t/finding-the-coordinates-or-indices-of-regions-of-different-density-in-a-recovered-model/163 "2020-12-03T15:07:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RoryPhelan](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RoryPhelan](https://simpeg.discourse.group/u/RoryPhelan)\
**Post date:** [December 3, 2020, 3:07pm UTC](https://simpeg.discourse.group/t/finding-the-coordinates-or-indices-of-regions-of-different-density-in-a-recovered-model/163/1 "2020-12-03T15:07:19Z")

</div>

When computing a recovered model from gravity survey, I’m struggling to quantitatively analyse my results.

For example in the Sparse Norm Gravity Inversion example on the SimPEG documentation, the recovered model looks like a good fit to the true model but I am not sure how to quantitatively process the data

Is it possible to find the index or coordinates of the maximum density values on this recovered model, in the example above, and compare it to the true model to analyse the quality of the inversion?

Thanks

---

<div class="post-metadata">

**Author:** ![thibaut.astic](https://yyz2.discourse-cdn.com/free1/user_avatar/simpeg.discourse.group/thibaut.astic/32/109_2.png) [@thibaut.astic](https://simpeg.discourse.group/u/thibaut.astic)\
**Post date:** [December 3, 2020, 8:08pm UTC](https://simpeg.discourse.group/t/finding-the-coordinates-or-indices-of-regions-of-different-density-in-a-recovered-model/163/2 "2020-12-03T20:08:02Z")

</div>

Hi Rory,  
the model is a `numpy.ndarray` so yo have access to all the tools from `numpy` (max, min, logic operators, filters etc.).  
The `mesh.gridCC` property, which contains the locations of the cells center, is ordered as the model (or `mesh.gridCC[actv]` if you have an active cells mapping). So you can use the indexes you extracted from the model (like the index of the maximum) with `mesh.gridCC` to find its location.

---

<div class="post-metadata">

**Author:** ![RoryPhelan](https://avatars.discourse-cdn.com/v4/letter/r/97f17d/32.png) [@RoryPhelan](https://simpeg.discourse.group/u/RoryPhelan)\
**Post date:** [December 4, 2020, 1:30pm UTC](https://simpeg.discourse.group/t/finding-the-coordinates-or-indices-of-regions-of-different-density-in-a-recovered-model/163/3 "2020-12-04T13:30:09Z")

</div>

Brilliant!

Thanks for the help, it is much appreciated
