Skip to main content
Ctrl+K
SunPy
  • About
    • Our Mission
    • SunPy Project
    • Presentations
    • Meetings
    • Code of Conduct
  • Documentation
    • sunpy
    • ndcube
    • drms
    • sunraster
    • sunkit-image
    • aiapy
    • sunpy-soar
    • roentgen
    • sunkit-instruments
    • demcmc
    • dkist
    • solarmach
    • sunkit-magex
    • pyflct
    • radiospectra
  • Affiliated Packages
  • Get Help
  • Contribute
  • Blog
  • About
    • Our Mission
    • SunPy Project
    • Presentations
    • Meetings
    • Code of Conduct
  • Documentation
    • sunpy
    • ndcube
    • drms
    • sunraster
    • sunkit-image
    • aiapy
    • sunpy-soar
    • roentgen
    • sunkit-instruments
    • demcmc
    • dkist
    • solarmach
    • sunkit-magex
    • pyflct
    • radiospectra
  • Affiliated Packages
  • Get Help
  • Contribute
  • Blog
Logo image

ndcube 2.4.dev254 documentation

  • An introduction to ndcube
  • Installing ndcube
  • Explaining ndcube
    • ND objects
    • Handling Metadata
    • Slicing ND objects
    • Coordinate transformations
    • Tabular coordinates
    • Reprojecting ND objects
    • Visualizing ND objects
  • Acknowledging ndcube
  • API Reference
    • ndcube (ndcube)
      • ExtraCoords
      • ExtraCoordsABC
      • GlobalCoords
      • GlobalCoordsABC
      • NDCollection
      • NDCube
      • NDCubeBase
      • NDCubeSequence
      • NDCubeSequenceBase
      • NDMeta
      • NDCubeABC
      • NDCubeLinkedDescriptor
    • meta (ndcube.meta)
      • NDMeta
      • NDMetaABC
    • extra_coords (ndcube.extra_coords)
      • BaseTableCoordinate
      • MultipleTableCoordinate
      • QuantityTableCoordinate
      • SkyCoordTableCoordinate
      • TimeTableCoordinate
    • mixins (ndcube.mixins)
      • NDCubeSlicingMixin
    • visualization (ndcube.visualization)
      • BasePlotter
      • PlotterDescriptor
      • MatplotlibPlotter
      • MatplotlibSequencePlotter
      • SequenceAnimator
      • prep_plot_kwargs
      • set_wcsaxes_format_units
    • utils (ndcube.utils)
      • assert_aligned_axes_compatible
      • get_crop_item_from_points
      • propagate_rebin_uncertainties
      • sanitize_crop_inputs
      • sanitize_wcs
      • convert_quantities_to_units
      • unique_sorted
      • cube_like_index_to_sequence_and_common_axis_indices
      • cube_like_tuple_item_to_sequence_items
      • SequenceItem
      • array_indices_for_world_objects
      • array_indices_for_world_objects
      • calculate_world_indices_from_axes
      • convert_between_array_and_pixel_axes
      • get_dependent_array_axes
      • get_dependent_physical_types
      • get_dependent_pixel_axes
      • get_dependent_world_axes
      • physical_type_to_pixel_axes
      • physical_type_to_world_axis
      • pixel_axis_to_physical_types
      • pixel_axis_to_world_axes
      • validate_physical_types
      • world_axis_to_pixel_axes
    • wcs (ndcube.wcs)
      • CompoundLowLevelWCS
      • ReorderedLowLevelWCS
      • ResampledLowLevelWCS
      • unwrap_wcs_to_fitswcs
  • Example Gallery
    • Combining a celestial WCS with a wavelength axis
    • Examples of cropping an NDCube
    • How to create an GWCS from quantities and times
    • How to create an NDCube from data stored in a FITS file
  • Extending ndcube in Other Packages
  • Upgrading from 1.x to 2.x
  • Release History
    • Full Changelog
  • Example Gallery

Example Gallery#

This gallery contains examples of how to use ndcube. Most of these examples require the sunpy sample data, which you can download by running:

>>> import sunpy.data.sample

Once downloaded the data will be stored in your user directory and you will not need to download it again.

Combining a celestial WCS with a wavelength axis

Combining a celestial WCS with a wavelength axis

Examples of cropping an NDCube

Examples of cropping an NDCube

How to create an GWCS from quantities and times

How to create an GWCS from quantities and times

How to create an NDCube from data stored in a FITS file

How to create an NDCube from data stored in a FITS file

Download all examples in Python source code: gallery_python.zip

Download all examples in Jupyter notebooks: gallery_jupyter.zip

Gallery generated by Sphinx-Gallery

previous

unwrap_wcs_to_fitswcs

next

Combining a celestial WCS with a wavelength axis

© Copyright 2025, The SunPy Community.

Code • Forum • Chat

Built with Sphinx 8.2.3.