Reference/API

ndcube Package

ndcube.mixins Package

Classes

NDCubePlotMixin

Add plotting functionality to a NDCube class.

NDCubeSlicingMixin

Mixin to provide slicing on objects using the NDData interface.

Class Inheritance Diagram

Inheritance diagram of ndcube.mixins.plotting.NDCubePlotMixin, ndcube.mixins.ndslicing.NDCubeSlicingMixin

ndcube.utils Package

ndcube.utils.cube Module

Utilities for ndcube.

Functions

wcs_axis_to_data_axis(wcs_axis, missing_axes)

Converts a wcs axis number to the corresponding data axis number.

data_axis_to_wcs_axis(data_axis, missing_axes)

Converts a data axis number to the corresponding wcs axis number.

select_order(axtypes)

Returns indices of the correct data order axis priority given a list of WCS CTYPEs.

convert_extra_coords_dict_to_input_format(…)

Converts NDCube.extra_coords attribute to format required as input for new NDCube.

get_axis_number_from_axis_name(axis_name, …)

Returns axis number (numpy ordering) given a substring unique to a world axis type string.

ndcube.utils.sequence Module

Utilities for ndcube sequence.

Functions

slice_sequence(cubesequence, item)

Slice an NDCubeSequence given a slicing/index item.

convert_item_to_sequence_items(item[, …])

Converts NDCubeSequence __getitem__ item to list of SequenceSlice objects.

convert_cube_like_item_to_sequence_items(…)

Converts an input item to NDCubeSequence.index_as_cube to a list od SequenceSlice objects.

convert_slice_nones_to_ints(slice_item, …)

Converts None types within a slice to the appropriate ints based on object to be sliced.

Classes

SequenceSlice(sequence_index, common_axis_item)

Define SequenceSlice named tuple of length 2.

SequenceItem(sequence_index, cube_item)

Define SequenceItem named tuple of length 2.

Class Inheritance Diagram

Inheritance diagram of ndcube.utils.sequence.SequenceSlice, ndcube.utils.sequence.SequenceItem

ndcube.utils.wcs Module

Miscellaneous WCS utilities.

Functions

reindex_wcs(wcs, inds)

Re-index a WCS given indices.

get_dependent_data_axes(wcs_object, …)

Given a data axis index, return indices of dependent data axes.

get_dependent_data_axes(wcs_object, …)

Given a data axis index, return indices of dependent data axes.

axis_correlation_matrix(wcs_object)

Return True/False matrix indicating which WCS axes are dependent on others.

append_sequence_axis_to_wcs(wcs_object)

Appends a 1-to-1 dummy axis to a WCS object.

Classes

WCS([header, naxis])

Initiates a WCS object with additional functionality to add dummy axes.

Class Inheritance Diagram

Inheritance diagram of ndcube.utils.wcs.WCS

ndcube.tests.helpers Module

Helpers for testing ndcube.

Functions

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.