ConicCoordinateSystem#

class coordinates.coordinate_systems.ConicCoordinateSystem(**kwargs)[source]#

3 Dimensional Conic coordinate system.

The conic coordinate system is a 3D orthogonal coordinate system derived from intersecting conical surfaces. It is defined by coordinates \((\mu, \nu, \phi)\), where:

  • \(\mu \in (0, \pi)\) is the angle between a point and a reference axis

  • \(\nu \in (0, \pi)\) is the angle from a second family of intersecting cones

  • \(\phi \in [0, 2\pi)\) is the azimuthal angle (rotation around the z-axis)

The Cartesian coordinates are given by:

\[ \begin{align}\begin{aligned}x = a \frac{\sin(\mu) \sin(\nu)}{\cos(\mu) - \cos(\nu)} \cos(\phi)\\y = a \frac{\sin(\mu) \sin(\nu)}{\cos(\mu) - \cos(\nu)} \sin(\phi)\\z = a \frac{\sin(\mu + \nu)}{\cos(\mu) - \cos(\nu)}\end{aligned}\end{align} \]
Parameters:

a (float) – Focal distance parameter, must be nonzero.

Methods

__init__(**kwargs)

Initialize a coordinate system instance with specific parameter values.

adjust_dense_tensor_signature(tensor_field, ...)

Raise and/or lower multiple tensor slots in one call.

axes_complement(axes)

Return all axes in the coordinate system that are not present in axes.

build_axes_mask(axes)

Construct a boolean mask array indicating which axes are in axes.

compute_expression(expression, coordinates)

Evaluate a named symbolic expression over mixed coordinate inputs.

compute_expression_from_coordinates(...[, ...])

Evaluate a named expression over 1D coordinate arrays with optional fixed axes.

compute_function_from_coordinates(func, ...)

Evaluate a function over 1D coordinate arrays with optional fixed axes.

convert_axes_to_indices(axes)

Convert axis name(s) to their corresponding index or indices.

convert_indices_to_axes(axes_indices)

Convert axis index or indices to their corresponding axis name(s).

convert_to(target_system, *native_coords)

Convert coordinates from this system to another coordinate system via Cartesian intermediate.

coordinate_meshgrid(*coordinate_arrays[, ...])

Construct a coordinate-aligned meshgrid from 1D coordinate arrays.

create_coordinate_list(coordinate_arrays, /)

Assemble a list of coordinate components (arrays or scalars) in canonical axis order.

from_cartesian(*coords)

Convert Cartesian coordinates to native coordinates in this system.

from_hdf5(filename[, group_name, registry])

Save this coordinate system to HDF5.

get_axes_from_mask(mask)

Convert a boolean axis mask into a list of axis names.

get_axes_latex(axes)

Return the LaTeX representation(s) of one or more axis names.

get_axes_order(src_axes, dst_axes)

Compute the reordering indices that will reorder src_axes into the order of dst_axes.

get_axes_permutation(src_axes, dst_axes)

Compute the permutation needed to reorder src_axes into dst_axes.

get_axes_units(unit_system)

Resolve the physical units for each axis in a given unit system.

get_canonical_axes_order(src_axes)

Compute the permutation indices to reorder src_axes into sorted alphabetical order.

get_canonical_axes_permutation(axes)

Compute the permutation needed to reorder axes into the canonical order defined by the coordinate system.

get_class_expression(expression_name)

Retrieve a derived expression for this coordinate system by name.

get_conversion_transform(other)

Construct a coordinate transformation function that maps native coordinates from this coordinate system to the target coordinate system.

get_expression(expression_name)

Retrieve an instance-specific symbolic expression.

get_free_fixed([axes, fixed_axes])

Split a list of coordinate axes into fixed and free components.

get_indices_from_mask(mask)

Convert a boolean mask of length ndim back to numeric indices.

get_mask_from_axes(axes)

Return a boolean mask of shape (ndim,) with True on the positions corresponding to axes.

get_mask_from_indices(indices)

Boolean mask that is True at the supplied numeric indices.

get_numeric_expression(expression_name)

Retrieve a numerically evaluable version of a coordinate system expression given the expression name.

has_class_expression(expression_name)

Check if the coordinate system has a specific expression registered to it.

has_expression(expression_name)

Check if a symbolic expression is registered at the instance level.

in_axes_order(iterable, src_axes, dst_axes)

Reorder a sequence of values from src_axes order to dst_axes order.

in_canonical_order(iterable, src_axes)

Reorder a sequence of values from src_axes order to canonical axis order.

insert_fixed_axes(iterable, src_axes[, ...])

Insert fixed axis values into an iterable of values according to canonical axis order.

is_axes_subset(axes_a, axes_b)

Check if axes_a is a subset of axes_b.

is_axes_superset(axes_a, axes_b)

Check if axes_a is a superset of axes_b.

is_axis(axis)

Check whether the given axis name(s) exist in this coordinate system.

lambdify_expression(expression)

Convert a symbolic expression into a callable function.

list_class_expressions()

List the available coordinate system expressions.

list_expressions()

List the available instance-level expressions.

lower_index_dense(tensor_field, index, rank, ...)

Lower a single tensor index using \(g_{ab}\).

order_axes(src_axes, dst_axes)

Reorder src_axes into the order defined by dst_axes.

order_axes_canonical(src_axes)

Reorder a list of axis names into the canonical order of this coordinate system.

pprint()

Print a detailed description of the coordinate system, including its axes, parameters, and expressions.

raise_index_dense(tensor_field, index, rank, ...)

Raise a single tensor index using \(g^{ab}\).

requires_expression(value, expression, ...)

Return value if not None; otherwise evaluate compute_expression.

requires_expression_from_coordinates(value, ...)

Return value if not None; otherwise evaluate compute_expression_from_coordinates.

resolve_axes([axes, require_subset, ...])

Normalize and validate a user-supplied list of axis names.

set_expression(expression_name, expression)

Set a symbolic expression at the instance level.

substitute_expression(expression)

Replace symbolic parameters with numerical values in an expression.

to_cartesian(*coords)

Convert native coordinates to Cartesian coordinates.

to_hdf5(filename[, group_name, overwrite])

Save this coordinate system to HDF5.

Attributes

axes

The axes names present in this coordinate system.

axes_dimensions

Return the symbolic physical dimensions associated with each axis.

axes_symbols

The symbols representing each of the coordinate axes in this coordinate system.

inverse_metric_tensor

Returns the callable function for the inverse metric tensor of the coordinate system.

inverse_metric_tensor_symbol

The symbolic inverse metric tensor for this coordinate system instance.

metric_tensor

Returns the callable function for the metric tensor of the coordinate system.

metric_tensor_symbol

The symbolic array representing the metric tensor.

ndim

The number of dimensions spanned by this coordinate system.

parameter_symbols

Get the symbolic representations of the coordinate system parameters.

parameters

The parameters of this coordinate system.