rigid_body_motion.ReferenceFrame.from_dataset¶
- classmethod ReferenceFrame.from_dataset(ds, translation, rotation, timestamps, parent, name=None, inverse=False, discrete=False)[source]¶
Construct a reference frame from a Dataset.
- Parameters
- ds: xarray Dataset
The dataset from which to construct the reference frame.
- translation: str
The name of the variable representing the translation wrt the parent frame.
- rotation: str
The name of the variable representing the rotation wrt the parent frame.
- timestamps: str
The name of the variable or coordinate representing the timestamps.
- parent: str or ReferenceFrame
The parent reference frame. If str, the frame will be looked up in the registry under that name.
- name: str, default None
The name of the reference frame.
- inverse: bool, default False
If True, invert the transform wrt the parent frame, i.e. the translation and rotation are specified for the parent frame wrt this frame.
- discrete: bool, default False
If True, transformations with timestamps are assumed to be events. Instead of interpolating between timestamps, transformations are fixed between their timestamp and the next one.
- Returns
- rf: ReferenceFrame
The constructed reference frame.