diff --git a/docs/guides/quantities.md b/docs/guides/quantities.md index 46f353b5..1f186058 100644 --- a/docs/guides/quantities.md +++ b/docs/guides/quantities.md @@ -1,4 +1,4 @@ -# Specialized Quantity Objects +# Specialized Quantities + - collections of vector objects like {class}`~coordinax.vecs.KinematicSpace` +- transformations of vector types ({func}`~coordinax.vecs.vconvert`) +- operations on vectors ({mod}`~coordinax.ops`) +- reference frames and coordinate systems ({mod}`~coordinax.frames`) +- coordinates that combine vectors and frames + ({class}`~coordinax.frames.Coordinate`) +- and more! This functionality is organized into submodules, which are imported into the top-level `coordinax` namespace. You can import them directly, or use the @@ -143,7 +147,7 @@ top-level `coordinax` namespace. You can import them directly, or use the >>> import coordinax as cx >>> from inspect import ismodule ->>> [x for x in cx.__all__ if ismodule(getattr(cx, x))] +>>> [name for name in cx.__all__ if ismodule(getattr(cx, name))] ['angle', 'distance', 'vecs', 'ops', 'frames'] ``` @@ -234,6 +238,17 @@ specifying values for all components: [1 2 3]> ``` +The most flexible way to create vectors is to use the +{meth}`~coordinax.vecs.vector` method, which infers the appropriate vector class +based on the provided inputs: + +```{code-block} python +>>> q = cxv.vector([1, 2, 3], "kpc") +>>> print(q) + +``` + #### Vector Conversion Vectors can be converted between different coordinate representations using the @@ -365,9 +380,9 @@ Coordinate( >>> coord.vconvert(cxv.SphericalPos) Coordinate( KinematicSpace({ 'length': SphericalPos( - r=Distance(weak_f32[], unit='kpc'), + r=Distance(f32[], unit='kpc'), theta=Angle(f32[], unit='rad'), - phi=Angle(weak_f32[], unit='rad') + phi=Angle(f32[], unit='rad') ) }), frame=Alice() )