You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the field as a parameter.
For example:
@pytest.mark.parametrize("field", ("potential", "g_z", ...))deftest_linearity(field):
""" Test linearity of the forward model """
...
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:
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: