Skip to content

Add linearity tests for forward models#698

Open
manduinca wants to merge 1 commit into
fatiando:mainfrom
manduinca:add-linearity-tests
Open

Add linearity tests for forward models#698
manduinca wants to merge 1 commit into
fatiando:mainfrom
manduinca:add-linearity-tests

Conversation

@manduinca

Copy link
Copy Markdown

Fixes #293

Adds test/test_linearity.py with linearity tests for each geometry (points, prisms, tesseroids), parametrized by field, following the discussion in the issue: the field of a set of sources is compared against the sum of the fields of each source computed separately.

Includes both gravity and magnetic forward models: point_gravity (Cartesian and spherical coordinates), dipole_magnetic, prism_gravity, prism_magnetic and tesseroid_gravity, using mixed-sign masses/densities/magnetizations.

The newer ellipsoid_gravity/ellipsoid_magnetic forwards could get the same treatment in a follow-up if you'd like.

Test that the field generated by a set of sources equals the sum of the
fields of each source computed separately. Covers point_gravity (Cartesian
and spherical), dipole_magnetic, prism_gravity, prism_magnetic and
tesseroid_gravity, parametrized by field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add linearity tests for forward models

1 participant