lagrangian.Field

class lagrangian.Field

Bases: pybind11_builtins.pybind11_object

Abstract class defining a field where it is possible to calculate a speed

__init__(self: lagrangian.core.Field, unit_type: lagrangian.core.UnitType, coordinate_type: lagrangian.core.CoordinatesType = CoordinatesType.SPHERICAL_EQUATORIAL) → None

Default constructor

Parameters
  • unit_type (lagrangian.Field) – Unit field

  • coordinate_type (lagrangian.CoordinateType) – Type of the coordinate system

Raises

ValueError – if the type of unit or the coordinate system is unknown

Methods

Field.compute(self, t, x, y, cell)

Interpolates the velocity to the wanted spatio temporal position.

Field.fetch(self, first, last)

Loads the grids used to interpolate the velocities in the interval [first, last]

Field.unit(self)

Returns the unit used by this field :returns: unit used by this field :rtype: str

Attributes

Field.coordinate_type

Coordinate type used by this field.

Field.unit_type

Unit type used by this field.