Skip to content
This repository was archived by the owner on Feb 9, 2018. It is now read-only.
This repository was archived by the owner on Feb 9, 2018. It is now read-only.

NDCube.to_sunpy() #36

@DanRyanIrish

Description

@DanRyanIrish

This issue outlines the first version of a NDCube.to_sunpy() method.

Purpose: to convert NDCube with valid dimensions and WCS axes to the corresponding sunpy object.

Description: This method should check the data dimensions and wcs axes of the Cube. Based on that it should call the relevant hidden function which returns the relevant sunpy object. These hidden functions should have names like _cube_to_map() and should live in cube_utils.py.
NDCube.to_sunpy() should return a new object, not overwrite the existing NDCube.
If the data dimensions and wcs axes do correspond to a supported sunpy object, an error should be raised.
If the sunpy object does not support masks, masked values should be replaced with fill_value.
Where possible, uncertainty and unit information should be used. If not supported by sunpy object they should be dropped.
Metadata should transferred in the most sensible way depending on the sunpy object being produced.

Version 1 of NDCube.to_sunpy should support three sunpy objects from NDCubes with the following dimensions and wcs axes:

  • TimeSeries: 1D Cube with a single time wcs
  • Map: 2D Cube with two spatial wcs axes
  • MapCube: 3D Cube with two spatial axes
  • All other combinations of data shapes and wcs axes should produce an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions