Skip to content

Use classes to represent geometric objects and meshes #599

@leouieda

Description

@leouieda

Pr #568 introduces forward modeling of ellipsoids and it requires the ellipsoids to be passed as classes since there are many different properties that would need to be passed for every one of them and things would become tedious to pass them all separately to the function.

This raises the question of adding classes like this that hold the geometry and physical properties of objects that can be passed to our forward modeling functions. Having used our current prism and point source code for a while, it’s easy to explain how to specify prisms and coordinates but when making complex synthetic models it can be a bit tedious.

The main problem would be having to create these objects for things like Jacobian matrix computations, where the overhead could be significant. However, these things are already done in numba and we’d end up using the inner computation kernels anyway which already work with arrays only and wouldn’t use the classes.

If we’re doing this for objects, I’d also add classes for meshes and layers, which would be easier to handle than our current prism layer which works with an xarray accessor.

I’ve talked about this with @santisoler but curious to know what others think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIdea or request for a new feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions