CoordinateSystemManager.assign_data(data, data_name, reference_system, target_system=None)#

Assign spatial data to a coordinate system.

If the assigned data is time-dependent and a target system is specified, the data will be transformed considering all time-dependencies on the transformation path. This is especially useful to reconstruct specimen geometries from scan data. If the raw scan data contains the timestamps of the scans and the movement of the scanner is described by a corresponding time-dependent coordinate system, the CoordinateSystemManager is able to calculate the specimen geometry on its own. Therefore, you need to provide the scanner coordinate system name as the reference_system parameter and the specimen coordinate system name as the target_system parameter.

  • data (Union[DataArray, SpatialData]) – Spatial data

  • data_name (str) – Name of the data.

  • reference_system (str) – Name of the coordinate system the data values are defined in.

  • target_system (Optional[str]) – Name of the target system the data will be transformed and assigned to. This is useful when adding time-dependent data (see function description). The provided name must match an existing system. If None is passed (the default), data will not be transformed and assigned to the ‘reference_system’.