parts.jacobian¶
The jacobian module handles calculations of Jacobians in ARTS.
Functionality for computing Jacobians in ARTS is implemented through
three classes:
JacobianCalculationhandles the actual calculation of Jacobians and coordinates the interaction with the ARTS workspace.JacobianQuantitydefines 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.Jacobianhandles 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.Identity[source]¶ Bases:
parts.jacobian.TransformationThe identity transformation $f(x) = x$.
-
class
parts.jacobian.JacobianBase(quantity, index)[source]¶ Bases:
parts.arts_object.ArtsObjectAbstract 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_classof eachJacobianQuantityobject.
-
class
parts.jacobian.JacobianCalculation[source]¶ Bases:
objectThe
JacobianCalculationkeeps 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 quantityjqmust be an instance of theJacobianQuantityabstract base class.
-
setup(ws)[source]¶ Setup the Jacobian calculations on the given workspace.
Initializes the definition of the Jacobian on the given workspace
wsby calling thejacobianInitWSV 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 thejacobianCloseWSM.Arguments:
ws(typhon.arts.workspace.Workspace): Workspace object on which to setup the Jacobian calculation.
-
-
class
parts.jacobian.JacobianQuantity[source]¶ Bases:
objectAbstract interface for quantities for which a Jacobian can be computed.
Quantities for which a Jacobian can be computed must expose a
jacobian_classwhich 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_classobject representing the settings and results of the Jacobian calculation for this specific object can be accessed through itsjacobianproperty.-
jacobian¶ The
jacobian_classobject 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.TransformationThe natural logarithm transformation $f(x) = log_{10}(x)$.
-
class
parts.jacobian.Log10[source]¶ Bases:
parts.jacobian.TransformationThe decadal logarithm transformation $f(x) = log_{10}(x)$.
-
class
parts.jacobian.Transformation[source]¶ Bases:
objectAbstract 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
Transformationclass, which defines the general interface for transformations of Jacobian quantities.The interface consists of two functions:
setup: When thesetupfunction 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.