Package pygeodesy :: Module trf :: Class TransformXform |
[frames] | no frames]

# Class TransformXform

      object --+
               |
    named._Named --+
                   |
    named._NamedBase --+
                       |
    named._NamedEnumItem --+
                           |
            datums.Transform --+
                               |
                              TransformXform

Helmert transformation, extended with an `Xform` TRF converter.

See Also: Transform and Xform.

Instance Methods
__init__(self, name='', **tx_ty_tz_s_sx_sy_sz) New TransformXform. |
__eq__(self, other) Compare this and an other transform. |
__hash__(self) hash(x) |
inverse(self, **name) Return the inverse of this transform. |
rename(self, name='') Change this transform's name. |
toRefFrame(self, point, **name) Convert an ellipsoidal point using this transform and Xform. |
toTransform(self, epoch1, **epoch2_inverse) Return this transform observed at `epoch1` as a Helmert TransformXform, optionally at `epoch2 or epoch1`. |
transform2(self, x, y, z, vx=0, vy=0, vz=0, inverse=False, factor=0.001, **Vector_and_kwds) Transform a (cartesian) position with velocities, forward or inverse. |
velocities(self, factor=0.001, **Vector_and_kwds) Compute the X, Y and Z velocities of this transform. |
Inherited from `datums.Transform`: `__iter__`, `__matmul__`, `__neg__`, `items`, `toStr`, `transform` Inherited from `named._NamedEnumItem`: `unregister` Inherited from `named._NamedBase`: `__repr__`, `__str__`, `others`, `toRepr` Inherited from `named._Named`: `__format__`, `__imatmul__`, `__rmatmul__`, `attrs`, `classof`, `copy`, `dup`, `methodname`, `renamed`, `toStr2` Inherited from `object`: `__delattr__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
Inherited from `datums.Transform`: `rx`, `ry`, `rz`, `s`, `s1`, `sx`, `sy`, `sz`, `tx`, `ty`, `tz`

Properties
| Xform Class `property` with a `.name` attribute.
Inherited from `datums.Transform`: `isunity` Inherited from `named._NamedEnumItem`: `name` Inherited from `named._Named`: `classname`, `classnaming`, `iteration`, `named`, `named2`, `named3`, `named4`, `sizeof`, `typename` Inherited from `object`: `__class__`

Method Details

### __init__ (self, name='', **tx_ty_tz_s_sx_sy_sz) (Constructor) |
New TransformXform. Arguments: `name` - Optional name (`str`), not registered. Raises: `NameError` - Transform with that `name` already exists. Overrides: object.__init__ See Also: Transform for details. Note: This TransformXform's name starts with `"-"` iff inversed.

### __eq__ (self, other) (Equality operator) |
Compare this and an other transform. Arguments: `other` - The other transform (Transform). Returns: `True` if equal, `False` otherwise. Overrides: datums.Transform.__eq__ (inherited documentation)

### __hash__ (self) (Hashing function) |
hash(x) Overrides: object.__hash__ (inherited documentation)

### inverse (self, **name) |
Return the inverse of this transform. Arguments: `name` - Optional, unique `name=NN` (`str`). Returns: Inverse (TransformXform), unregistered. Overrides: datums.Transform.inverse

### rename (self, name='') |
Change this transform's name. Arguments: `name` - New name (`str`), overriding this transform's Xform's name. Returns: The previous name (`str`). Overrides: named._Named.rename

### toRefFrame (self, point, **name) |
Convert an ellipsoidal point using this transform and Xform. Arguments: `point` - The point to convert (`Cartesian` or `LatLon`). `name` - Optional `name=NN` (`str`). Returns: A copy of the `point`, converted directly to this transform's Xform's `refName2` and `epoch`. Note: The `point`'s original `reframe` and `epoch` are ignored, its `datum` and `height` are preserved but not taken into account.

### toTransform (self, epoch1, **epoch2_inverse) |
Return this transform observed at `epoch1` as a Helmert TransformXform, optionally at `epoch2 or epoch1`. Arguments: `epoch1` - Epoch to observe from (`scalar`). `epoch2_inverse` - Optional `epoch2=None` to observe to and `inverse=False`, see method toTransform from TRFXform. Returns: The Helmert transform (TransformXform). Raises: `TRFError` - Invalid `epoch1`, `epoch2` or missing Xform.

### transform2 (self, x, y, z, vx=0, vy=0, vz=0, inverse=False, factor=0.001, **Vector_and_kwds) |
Transform a (cartesian) position with velocities, forward or inverse. Arguments: `x` - X coordinate (`meter`). `y` - Y coordinate (`meter`). `z` - Z coordinate (`meter`). `vx` - X velocity (`meter-per-year`). `vy` - Y velocity (`meter-per-year`). `vz` - Z velocity (`meter-per-year`). `inverse` - If `True`, apply the inverse transform (`bool`). `factor` - Factor to scale this Xform's `rates` (`scalar`), default from `milli-meter-` to `meter-per-year`, from `milli-arc-` to `arc-seconds-per-year` and from `ppB-` to `ppM-per-year`. `Vector_and_kwds` - An optional, (3-D) `Vector=None` or cartesian class and additional `Vector` keyword arguments to return the transformed position and the velocities. Returns: 2-Tuple `(position, velocities)`, the tranformed `position` and `velocities`, each a Vector3Tuple`(x, y, z)` unless some `Vector_and_kwds` are specified. Raises: `TypeError` - Non-scalar `factor`. Note: If this transform's Xform is missing, the returned `velocities` are the given ones, un-transformed. See Also: Soler, T. & Snay, R.A. "Transforming Positions and Velocities ...", equations (4) and (5) and HTDP functions `VTRANF` and `VTRANF_IERS` in file HTDP/hdtp.f.

### velocities (self, factor=0.001, **Vector_and_kwds) |
Compute the X, Y and Z velocities of this transform. Arguments: `factor` - Factor to scale this Xform's `rates` (`scalar`), default from `milli-meter-` to `meter-per-year`, from `milli-arc-` to `arc-seconds-per-year` and from `ppB-` to `ppM-per-year`. `Vector_and_kwds` - An optional, (3-D) `Vector=None` or cartesian class and additional `Vector` keyword arguments to return the velocities. Returns: A Vector3Tuple`(x, y, z)` unless some `Vector_and_kwds` are specified or `None` if this transform's Xform is missing. Raises: `TypeError` - Non-scalar `factor`. See Also: Altamimi, Z. "EUREF-TN-1-Jan-31-2024", Appendix A, equation (3) and method transform2.

Property Details

### Xform Class `property` with a `.name` attribute. Get method: Xform(self) - Get this Helmert transform's Xform (TRFXform or `None`). Set method: Xform(self, Xform) - Set this Helmert transform's Xform (TRFXform).