Add linearity tests for forward models #293
Labels
enhancement
Idea or request for a new feature
good first issue
Good for newcomers (doesn’t require deep knowledge of the project)
Description of the desired feature:
Our forward models for the different geometries (points, prisms, tesseroids) allow to take multiple bodies as inputs, returning a single array as the resulting field generated by every one of these bodies on the computation points.
One of the properties of these forward models is their linearity: the resulting field for all the bodies should be equal to the sum of the individual fields.
Although this property is easily readable from the code, it might be wise to add functions that actually test them.
We could add
test_linearity
functions for each geometry that compares the resulting field of passing a set of bodies to the resulting field of computing the fields of each one separately and then sum them up.Through
pytests.mark.parametrize
we could write a single function per geometry, adding thefield
as a parameter.For example:
Are you willing to help implement and maintain this feature? Yes, but I would love to help anyone motivated to tackle it. 💪🏼
The text was updated successfully, but these errors were encountered: