utils (ndcube.utils)#
ndcube.utils.collection Module#
Functions#
assert_aligned_axes_compatible(...)
Checks whether two sets of aligned axes are compatible.
ndcube.utils.cube Module#
Functions#
get_crop_item_from_points(points, wcs, ...)
Find slice item that crops to minimum cube in array-space containing specified world points.
propagate_rebin_uncertainties(uncertainty, ...)
Default algorithm for uncertainty propagation in rebin().
sanitize_crop_inputs(points, wcs)
Sanitize inputs to NDCube crop methods.
sanitize_wcs(func)
A wrapper for NDCube methods to sanitise the wcs argument.
ndcube.utils.misc Module#
Functions#
convert_quantities_to_units(coords, units)
Converts a sequence of Quantities to units used in the WCS.
unique_sorted(iterable)
Return unique values in the order they are first encountered in the iterable.
ndcube.utils.sequence Module#
Utilities for ndcube sequence.
Functions#
cube_like_index_to_sequence_and_common_axis_indices(...)
Converts a cube-like index for an NDCubeSequence to a sequence index and a common axis index.
cube_like_tuple_item_to_sequence_items(item, ...)
Convert a tuple for slicing an NDCubeSequence in the cube-like API to a list of SequenceItems.
Classes#
SequenceItem(sequence_index, cube_item)
Define SequenceItem named tuple of length 2.
Class Inheritance Diagram#
Inheritance diagram of ndcube.utils.sequence.SequenceItem
ndcube.utils.wcs Module#
Miscellaneous WCS utilities.
Functions#
array_indices_for_world_objects(wcs[, axes])
Calculate the array indices corresponding to each high level world object.
calculate_world_indices_from_axes(wcs, axes)
Given a string representation of a world axis or a numerical array index, convert it to a numerical world index aligning to the position in wcs.world_axis_object_components.
convert_between_array_and_pixel_axes(axis, naxes)
Reflects axis index about center of number of axes.
get_dependent_array_axes(array_axis, ...)
Find indices of all array axes associated with the world axes linked to the input array axis.
get_dependent_physical_types(physical_type, wcs)
Given a world axis physical type, return the dependent physical types including the input type.
get_dependent_pixel_axes(pixel_axis, ...)
Find indices of all pixel axes associated with the world axes linked to the input pixel axis.
get_dependent_world_axes(world_axis, ...)
Given a WCS world axis index, return indices of dependent WCS world axes.
physical_type_to_pixel_axes(physical_type, wcs)
Gets the pixel axis indices corresponding to a world axis physical type.
physical_type_to_world_axis(physical_type, ...)
Returns world axis index of a physical type based on WCS world_axis_physical_types.
pixel_axis_to_physical_types(pixel_axis, wcs)
Gets the world axis physical types corresponding to a pixel axis.
pixel_axis_to_world_axes(pixel_axis, ...)
Retrieves the indices of the world axis physical types corresponding to a pixel axis.
pixel_indices_for_world_objects(wcs[, axes])
Calculate the pixel indices corresponding to each high level world object.
validate_physical_types(physical_types)
Validate a list of physical types against the UCD1+ standard
world_axis_to_pixel_axes(world_axis, ...)
Gets the pixel axis indices corresponding to the index of a world axis.