List of functions and classes (API)#
Attention
This package is still under initial development stage, so public APIs are not expected to be stable. Please stay updated and don’t hesitate to raise feedback or issues through GitHub issues or Slack workspace.
APIs for Basic Usage#
A typical inversion run in cofi
involves the following four objects:
- BaseProblem
base class of all forward problems that includes methods you can use to define a forward problem
- InversionOptions
a holder for you to define how you’d like the inversion problem to be solved
- Inversion
takes in both of above objects and can be thought of as a running engine
- InversionResult
an object returned by
Inversion.run()
(you won’t need to define this explicitly)
The “object” here is simply a variable, but more flexible and powerful than an integer or string, in the sense that they can have properties and methods attached to them. In the following pages we expand what are available for each of the class object we mention above, and how to use them.
Base class for an inversion problem setup. |
|
Class for specification on how an inversion will run, including which backend tool to use and solver-specific parameters. |
|
The class holder that take in both an inversion problem setup |
|
The result class of an inversion run. |
APIs for Advanced Usage#
BaseInferenceTool is the base class of all backend inversion tools. To plug in your own inversion
tools, simply create a subclass of BaseInferenceTool
and implements __init__()
and
__call__()
. Expand the details below for more concrete examples.
|
Base class for backend inference tool wrappers |
CoFI Utils#
Module cofi.utils
contains a set of helper classes and routines to enable
easier problem definitions.
Utility classes and functions (e.g. |