API Reference

ndcube Package

ndcube

A base package for multi-dimensional contiguous and non-contiguous coordinate-aware arrays.

Classes

NDCube(data[, wcs, uncertainty, mask, meta, ...])

Class representing N-D data described by a single array and set of WCS transformations.

NDCubeSequence(data_list[, meta, common_axis])

Class representing a sequence of NDCube-like objects.

NDCollection(key_data_pairs[, aligned_axes, ...])

Class for holding and manipulating an unordered collection of NDCubes or NDCubeSequences.

ExtraCoords([ndcube])

A representation of additional world coordinates associated with pixel axes.

GlobalCoords([ndcube])

A structured representation of coordinate information applicable to a whole NDCube.

Class Inheritance Diagram

Inheritance diagram of ndcube.ndcube.NDCube, ndcube.ndcube_sequence.NDCubeSequence, ndcube.ndcollection.NDCollection, ndcube.extra_coords.extra_coords.ExtraCoords, ndcube.global_coords.GlobalCoords

ndcube.extra_coords.table_coord Module

Classes

TimeTableCoordinate(*tables[, names, ...])

A lookup table based on a Time, will always be one dimensional.

SkyCoordTableCoordinate(*tables[, mesh, ...])

A lookup table created from a SkyCoord.

QuantityTableCoordinate(*tables[, mesh, ...])

A lookup table made up of N Quantity objects.

Class Inheritance Diagram

Inheritance diagram of ndcube.extra_coords.table_coord.TimeTableCoordinate, ndcube.extra_coords.table_coord.SkyCoordTableCoordinate, ndcube.extra_coords.table_coord.QuantityTableCoordinate

ndcube.mixins Package

Classes

NDCubeSlicingMixin()

Mixin to provide slicing on objects using the NDData interface.

Class Inheritance Diagram

Inheritance diagram of ndcube.mixins.ndslicing.NDCubeSlicingMixin

ndcube.visualization Package

Classes

BasePlotter([ndcube])

Base class for NDCube plotter objects.

Class Inheritance Diagram

Inheritance diagram of ndcube.visualization.base.BasePlotter

ndcube.visualization.mpl_plotter Module

Classes

MatplotlibPlotter([ndcube])

Provide visualization methods for NDCube which use matplotlib.

Class Inheritance Diagram

Inheritance diagram of ndcube.visualization.mpl_plotter.MatplotlibPlotter

ndcube.utils Package

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.

convert_between_array_and_pixel_axes(axis, naxes)

Reflects axis index about center of number of axes.

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.

pixel_axis_to_world_axes(pixel_axis, ...)

Retrieves the indices of the world axis physical types corresponding to a pixel axis.

world_axis_to_pixel_axes(world_axis, ...)

Gets the pixel axis indices corresponding to the index of a world axis.

pixel_axis_to_physical_types(pixel_axis, wcs)

Gets the world axis physical types corresponding to a pixel axis.

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.

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_array_axes(array_axis, ...)

Find indices of all array axes associated with the world axes linked to the input array axis.

get_dependent_world_axes(world_axis, ...)

Given a WCS world axis index, return indices of dependent WCS world axes.

get_dependent_physical_types(physical_type, wcs)

Given a world axis physical type, return the dependent physical types including the input type.

array_indices_for_world_objects(wcs[, axes])

Calculate the array indices corresponding to each high level world object.

validate_physical_types(physical_types)

Validate a list of physical types against the UCD1+ standard

ndcube.utils.misc Module

Functions

unique_sorted(iterable)

Return unique values in the order they are first encountered in the iterable.

ndcube.tests.helpers Module

Helpers for testing ndcube.

Functions

figure_test(test_function)

A decorator for a test that verifies the hash of the current figure or the returned figure, with the name of the test function as the hash identifier in the library.

get_hash_library_name()

Generate the hash library name for this env.

assert_extra_coords_equal(test_input, ...)

assert_metas_equal(test_input, expected_output)

assert_cubes_equal(test_input, expected_cube)

assert_cubesequences_equal(test_input, ...)

assert_wcs_are_equal(wcs1, wcs2)

Assert function for testing two wcs object.