Dimensions
The Dimensions class keeps track of the different dimensions in an ARTS atmosphere. The purpose of this class is to allow the inferral of dimensions from the provided data, but at the same time to be able to identify inconsistencies.
Attributes:
- p(Dimension): Dimension object representing the size of the
- ARTS pressure grid
- lat(Dimension) Dimension object representing the size of the
- latitude grid
- lon(Dimension) Dimension object representing the size of the
- longitude grid
- joker(Joker) Dimension object representing a dimensions that
- can take an arbitrary value.
-
class
parts.dimensions.
Dimension
(name)[source]¶ Bases:
object
Dimensions of data arrays in ARTS.
The required dimensions of most array data used in an ARTS simulation are fixed by the dimensions of the atmosphere. The Dimension class provides a symbolic representation of these dimensions in an ARTS simulation, so that these can be inferred and checked for consistency.
Dimension objects are used to define the dimensions of ARTS data and keep track of the different values inferred from user-provided data.
-
add_deduction
(ws, value, who)[source]¶ If a value of a dimension becomes apparent from data it should be signaled to the
Dimension
object. The dimension object keeps track of these “deductions” for each workspace separately.Parameters:
- ws(typhon.arts.workspace.Workspace): Workspace object
- for which the dimension was deduced.
value(Int): The deduced dimenions
- who(str): The name of the variable from which this
- value was deduced.
-
check
(ws, n, who)[source]¶ Check given value for consistency.
Parameters:
- ws(typhon.arts.workspace.Workspace): The workspace for which
- to check the deduction.
n(int): The value which to check against previous deduced values.
Returns:
True if this is the first deduction or is previous deuctions agree with the current value. False otherwise.
-
-
class
parts.dimensions.
Joker
(name)[source]¶ Bases:
parts.dimensions.Dimension
A dimension that can take an arbitrary value.