Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

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

Project description


|Latest Version| |Build Status| |Build status| |codecov| |Powered by NumFOCUS| |Powered by Sunpy|

.. |Powered by Sunpy| image::
.. |Latest Version| image::
.. |Build Status| image::
.. |Build status| image::
.. |codecov| image::
.. |Powered by NumFOCUS| image::

ndcube is an open-source SunPy affiliated package for manipulating,
inspecting and visualizing multi-dimensional contiguous and non-contiguous
coordinate-aware data arrays. It combines data, uncertainties, units, metadata,
masking, and coordinate transformations into classes with unified slicing and
generic coordinate transformations and plotting/animation capabilities. It is
designed to handle data of any number of dimensions and axis types (e.g.
spatial, temporal, spectral, etc.) whose relationship between the array elements
and the real world can be described by World Coordinate System (WCS)
translations. See the `ndcube docs`_ for more details.


ndcube requires Python 3.5+, SunPy 0.8+, astropy and matplotlib.

Stable Version
There are two options for installing the stable version of ndcube. The first is
via the anaconda distribution using the conda-forge channel:
$ conda install --channel conda-forge ndcube
For more information on installing the anaconda distribution, see the
`anaconda website`_.

To update ndcube do:
$ conda update ndcube

The second option for installing the stable verison of ndcube is via pip:
$ pip install ndcube
Then to update ndcube do:
$ pip install ndcube --upgrade

Development Version

The stable version of ndcube will be relatively reliable. However, if you value
getting the latest updates immediately over reliablility, or want to contribute
to the development of ndcube, you will need to install the bleeding edge version
via github. The recommended way to set up your system is to first fork the
`ndcube github repository`_ to your github account and then clone your forked
repo to your local machine. This setup has the advantage of being able to push
any changes you make in local version to your github account. From there you can
issue pull requests to have your changes merged into the main repo and thus
shared with other users. You can also set up a remote between your local version
and the main repo so that you can stay updated with the latest changes to
ndcube. Let's step through how to do this.

Once you've forked the main `ndcube github repository`_ to your github account,
create a conda environment on your local machine to hold the ndcube bleeding
edge version and activate that environment. Type the following into a terminal:
$ conda config --append channels conda-forge
$ conda create -n ndcube-dev python sunpy hypothesis pytest-mock
$ source activate ndcube-dev

Next clone the ndcube repo from your github account to a new
directory. Let's call it ``ndcude-git``:
$ git clone ndcube-git

To install, change into the new directory and run the install script:
$ cd ndcube-git
$ pip install -e .

Finally add a remote to the main repo so you can pull the latest
$ git remote add upstream

Then to ensure you stay up-to-date with the latest version of ndcube,
regularly do:
$ git pull upstream master

To push any changes you make to your github account by doing:
$ git push origin branch-name

where ``branch-name`` is the name of the branch you're working on. Then
from your github account you can request your changes to be merged to
the main repo. For more information on on git version control,
github, and issuing pull requests, see `SunPy's version control guide`_.

Getting Help

As a SunPy-affiliated package, ndcube relies on the SunPy support
infrastructure. To pose questions to ndcube and SunPy developers and
to get annoucements regarding ndcube and SunPy in general, sign up to

- `SunPy Mailing List`_

To get quicker feedback and chat directly to ndcube and SunPy
developers check out the

- `SunPy Matrix Channel`_.


If you would like to get involved, start by joining the `SunPy mailing
list`_ and check out the `Developer’s Guide`_ section of the SunPy
docs. Stop by our chat room ``_ if you have any
questions. Help is always welcome so let us know what you like to work
on, or check out the `issues page`_ for the list of known outstanding

For more information on contributing to ncdube or the SunPy
organization, please read the SunPy `contributing guide`_.

Code of Conduct

When you are interacting with the SunPy community you are asked to
follow our `Code of Conduct`_.


This project is Copyright (c) SunPy Developers and licensed under the
terms of the BSD 2-Clause license. See the licenses folder for more

.. _ndcube docs:
.. _installation guide:
.. _SunPy Matrix Channel:
.. _``:
.. _SunPy mailing list:!forum/sunpy
.. _Developer’s Guide:
.. _issues page:
.. _contributing guide:
.. _Code of Conduct:
.. _anaconda website:
.. _`ndcube github repository`:
.. _`SunPy's version control guide`:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
ndcube-1.1.2.tar.gz (212.9 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page