fatiando / harmonica

Forward modeling, inversion, and processing gravity and magnetic data
https://www.fatiando.org/harmonica
BSD 3-Clause "New" or "Revised" License
210 stars 69 forks source link

Change default value of depth in equivalent sources #491

Closed santisoler closed 3 months ago

santisoler commented 5 months ago

Change the default value of the depth argument in EquivalentSources to "default". If this value is passed, then the depth of the sources is set as 4.5 times the mean distance between first neighbouring sources. If a numerical value is passed, this is the one that will be used. Introduce a new depth_ attribute where the estimated/passed numeric value is stored. If points is passed, the depth_ attribute is set to None. Add a test checking that the depth value is properly set. Merge the tests functions that checked the accuracy of equivalent sources using different dtypes.

Relevant issues/PRs:

Fixes #424

santisoler commented 5 months ago

I should update some of the tutorials, so they make use of the default depth strategy. We can also include some information on why setting the depth to a numerical value and its consequences.

santisoler commented 5 months ago

@indiauppal would you like to check this PR out?