Data Transformation (utilipy.xfm)

Reference/API

utilipy.data_utils.xfm Package

Data Transformation.

The plan is to build an analog to astropy’s TransformGraph, which is only for coordinate frames, but for converting between arbitrary data types. The advantage of this kind of system is that many DataTransformGraphs can be created, each of which is intended for different use. For instance, the xmatch functions need to find the reference epoch in a data set and ensure that the information is converted in a particular way. This conversion is need-specific and would not be present in a very general converter, like PanDoc.

Notes

These are dev notes for my thoughts on building the TransformGraph.

  • What about subclasses? how can a subclass be recognized to use a particular conversion?

  • What about Any-to-something conversions, like trying Table(x) or array(y)? these should have lower priority than a registered conversion, but should work.

    • have a Any-to-this registry function to add these catch-all converters.

    • Maybe have an option for pre-populating these in the graph?

Classes

TransformGraph(seed_basic)

Graph representing the paths between data types.

DataTransform(func, fromtype, totype, priority)

A transformation defined by a function.

CompositeTransform(transforms, fromtype, …)

A transformation from a series of single-step transformations.

Class Inheritance Diagram

Inheritance diagram of utilipy.data_utils.xfm.graph.TransformGraph, utilipy.data_utils.xfm.transformations.DataTransform, utilipy.data_utils.xfm.transformations.CompositeTransform