-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change default value of depth in equivalent sources #491
Conversation
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 median 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.
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. |
Add admonition explaining the default behaviour of the ``depth`` argument.
@indiauppal would you like to check this PR out? |
Use the mean to compute the average distance of neighboring data points.
Try to make tests on Python 3.8 pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed a small typo. But otherwise, this is great!
Co-authored-by: Leonardo Uieda <leo@uieda.com>
Change the default value of the
depth
argument inEquivalentSources
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 newdepth_
attribute where the estimated/passed numeric value is stored. Ifpoints
is passed, thedepth_
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