Skip to content

Commit

Permalink
Add classes for coordinate spaces and transforms (#218)
Browse files Browse the repository at this point in the history
New classes:

* Axis: simple data class storing a name, optional units, and optional scale
* CoordinateSpace: used to define coordinate spaces for spatial data
* CoordinateTransform: abstract base class for coordinate transforms
* AffineTransform: implementation for a generic affine coordinate transform
* ScaleTransform: implementation for a coordinate transform that scales axes (may be isotropic/uniform)
* IdentityTransform: implementation for an identity transform that only applies a name change to axes

---------

Co-authored-by: paul fisher <[email protected]>
  • Loading branch information
jp-dark and thetorpedodog authored Sep 18, 2024
1 parent 4b2ccca commit 9cb6f80
Show file tree
Hide file tree
Showing 4 changed files with 730 additions and 1 deletion.
14 changes: 14 additions & 0 deletions python-spec/src/somacore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@

from .base import SOMAObject
from .collection import Collection
from .coordinates import AffineTransform
from .coordinates import Axis
from .coordinates import CoordinateSpace
from .coordinates import CoordinateTransform
from .coordinates import IdentityTransform
from .coordinates import ScaleTransform
from .coordinates import UniformScaleTransform
from .data import DataFrame
from .data import DenseNDArray
from .data import NDArray
Expand Down Expand Up @@ -61,4 +68,11 @@
"AxisQuery",
"ExperimentAxisQuery",
"ContextBase",
"Axis",
"CoordinateSpace",
"CoordinateTransform",
"AffineTransform",
"ScaleTransform",
"UniformScaleTransform",
"IdentityTransform",
)
Loading

0 comments on commit 9cb6f80

Please sign in to comment.