parts.jacobian

The jacobian module handles calculations of Jacobians in ARTS. Functionality for computing Jacobians in ARTS is implemented through three classes:

  1. JacobianCalculation handles the actual calculation of Jacobians and coordinates the interaction with the ARTS workspace.
  2. JacobianQuantity defines the general interface for quantities for which a Jacobian can be calculated and how to toggle the calculation of the Jacobian for a given quantity.
  3. Jacobian handles quantity-specific settings and results. This class must be defined for each Jacobian quantity separately.

Calculating Jacobians

To calculate the Jacobian of a quantity q it suffices to add it to the jacobian of the ArtsSimulation:

simulation.jacobian.add(q)

This will add the quantity q to the quantities for which a Jacobian should be computed. Moreover it will instantiate the Jacobian class of the quantity q and set the q.jacobian property of q.

It is important to note that simulation.jacobian and q.jacobian are of different types: simulation.jacobian is of type JacobianCalculation and handles the calculation of the Jacobian for multiple quantities whereas q.jacobian holds the settings and results of the Jacobian calculation for q.

Reference

class parts.jacobian.Atanh[source]

Bases: parts.jacobian.Transformation

class parts.jacobian.Identity[source]

Bases: parts.jacobian.Transformation

The identity transformation $f(x) = x$.

class parts.jacobian.JacobianBase(quantity, index)[source]

Bases: parts.arts_object.ArtsObject

Abstract base class for the Jacobian classes that encapsulate the quantity-specific calls and settings of the Jacobian. This class muss be inherited by the jacobian_class of each JacobianQuantity object.

setup(ws)[source]

This method should call the jacobianAdd... method corresponding to the quantity on the given workspace ws.

class parts.jacobian.JacobianCalculation[source]

Bases: object

The JacobianCalculation keeps track of the quantities for which to compute a Jacobian and coordinates their setup.

add(jq)[source]

Add a quantity to list of quantities for which the Jacobian should be computed.

Arguments:

jq(JacobianQuantity): Add Jacobian calculation for the given quantity. The quantity jq must be an instance of the JacobianQuantity abstract base class.
setup(ws)[source]

Setup the Jacobian calculations on the given workspace.

Initializes the definition of the Jacobian on the given workspace ws by calling the jacobianInit WSV on the given workspace. Calls the setup method for all quantities for which a Jacobian should be computed and finalizes the definition of the Jacobian by calling the jacobianClose WSM.

Arguments:

ws(typhon.arts.workspace.Workspace): Workspace object on which to setup the Jacobian calculation.
class parts.jacobian.JacobianQuantity[source]

Bases: object

Abstract interface for quantities for which a Jacobian can be computed.

Quantities for which a Jacobian can be computed must expose a jacobian_class which holds all quantity-specific WSM calls and settings required to compute its Jacobian.

After a quantity has been added to the Jacobian quantities of a simulation, the jacobian_class object representing the settings and results of the Jacobian calculation for this specific object can be accessed through its jacobian property.

jacobian

The jacobian_class object holding the quantity-specific settings and actual results of the Jacobian calculations for this quantity.

jacobian_class

Return the class object that holds the actual implementation of the Jacobian calculation.

class parts.jacobian.Log[source]

Bases: parts.jacobian.Transformation

The natural logarithm transformation $f(x) = log_{10}(x)$.

class parts.jacobian.Log10[source]

Bases: parts.jacobian.Transformation

The decadal logarithm transformation $f(x) = log_{10}(x)$.

class parts.jacobian.Transformation[source]

Bases: object

Abstract base class for transformations of Jacobian quantities.

ARTS allows the calculation of certain transformations of Jacobian quantities. In parts, these transformations are represented by subclasses of the Transformation class, which defines the general interface for transformations of Jacobian quantities.

The interface consists of two functions:

  • setup: When the setup function is called the transformation object is expected to call the appropriate workspace function so that the transformation is added to the most recently added JacobianQuantity.
  • __call__: Transformation objects should be callable and calling them should apply the transformation to a given numeric argument.