List of functions and classes (API)#


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#

%%{init: {'theme':'neutral'}}%% flowchart TB base_problem(BaseProblem object)-->inversion(Inversion object) inversion_options(InversionOptions object)-->inversion(Inversion object) inversion--".run()"-->inversion_result(InversionResult object)

A typical inversion run in cofi involves the following four objects:


base class of all forward problems that includes methods you can use to define a forward problem


a holder for you to define how you’d like the inversion problem to be solved


takes in both of above objects and can be thought of as a running engine


an object returned by (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 BaseProblem and inversion solver options InversionOptions, and handles the running of an inversion.


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.