-
-
Notifications
You must be signed in to change notification settings - Fork 49
NDCube Roadmap
DanRyanIrish edited this page Mar 2, 2023
·
13 revisions
-
Resample method: Create a method that resamples an
NDCube
to a new pixel or world grid.
-
Sliceable Metadata: Develop a metadata class that can live at
NDCube.meta
. This class allows metadata to be associated with data axes so long as they have the same shape as these axes. Then when theNDCube
is sliced, those metadata can be automatically sliced accordingly.
- Add Support of Functional Masks and Uncertainty: Instead of storing all uncertainty of mask information as dense arrays, enable a function to be defined that takes data as an input and generates the mask/uncertainty on the fly. This would save memory and may make some data manipulation methods faster as the mask and uncertainty would not have to be recalculated.
- MaskCollection class: A data set may want to flag pixels based on different criteria, e.g. exposed area of detector, signal-to-noise, cosmic ray hits, feature type, e.g. active region, flare etc. A MaskCollection class would store all these masks and all the user to mask the data with the one (or combination of masks) required at the time.
-
NDCube.coords: Create a wrapper that defines a common API for interacting with coordinates, irrespective of whether they are stored in the
WCS
,ExtraCoords
orGlobalCoords
. - Provide an API to get the bounding box of a cube
- Add SpectralCoord support to ExtraCoords
- Identification and Extraction of sub-cubes based on physical types of axes
- Provide a decorator that validates world axes of a given NDCube
- Upstream WCS wrappers to astropy:
-
NDCube.save/write: Add a method to write out an
NDCube
to one of a set of supported file types. - Enable creation of an
NDCube
from anxarray
instance and/or vice versa.
- Provide decorator to call other subclasses methods: Compliant subclasses would write a hook whose API is defined by ndcube. Then the decorator would convert one subclass to another, call the method, then reconvert back to the original subclass.
This page attempts to summarize the roadmap for the NDCube class post 2.0. It is based on issues and PRs open at time of writing (March 2022) but can be developed through subsequent discussions and new issues.
For context, there is currently a discussion about whether all or part of NDCube should be upstreamed to astropy NDData. This document might help to clarify what desired future features could also end up in astropy NDData.
-
Arithmetic Operations: Enable scalars, arrays and quantities to be added/subtracted and multiplied/divided with an
NDCube
. Also allow NDCubes to be combined via arithmetic operations if they have compatible coordinates. (Done in v2.1.0) -
Unit Conversion: Add a
NDCube.to()
method that converts the NDCube to a new unit. (Done in v2.1.0) -
Resample method: Create a method that resamples an
NDCube
to a new pixel grid. -
Superpixel method: Subtlely different to
ǸDCube.resample
. This method would degrade resolution by creating macropixels of a certain integer number of pixels in each dimension. The values would then be combined by sum function selected by the user, e.g. sum, mean, median, min, max, etc. This is simpler to use and to implement thanǸDCube.resample
, and crucially in the case of summing, flux can be conserved in very simple way. A use of this would be to increase the signal-to-noise ratio. In this case, the user will not want to reproject to a new pixel grid and risk not conserving flux. (Done in v2.1.0. Renamed NDCube.bin)
-
Sliceable Metadata: Develop a metadata class that can live at
NDCube.meta
. This class allows metadata to be associated with data axes so long as they have the same shape as these axes. Then when theNDCube
is sliced, those metadata can be automatically sliced accordingly.
- Add Support of Functional Masks and Uncertainty: Instead of storing all uncertainty of mask information as dense arrays, enable a function to be defined that takes data as an input and generates the mask/uncertainty on the fly. This would save memory and may make some data manipulation methods faster as the mask and uncertainty would not have to be recalculated.
- MaskCollection class: A data set may want to flag pixels based on different criteria, e.g. exposed area of detector, signal-to-noise, cosmic ray hits, feature type, e.g. active region, flare etc. A MaskCollection class would store all these masks and all the user to mask the data with the one (or combination of masks) required at the time.
-
NDCube.coords: Create a wrapper that defines a common API for interacting with coordinates, irrespective of whether they are stored in the
WCS
,ExtraCoords
orGlobalCoords
. - Provide an API to get the bounding box of a cube
- Add SpectralCoord support to ExtraCoords
- Identification and Extraction of sub-cubes based on physical types of axes
- Provide a decorator that validates world axes of a given NDCube
- Upstream WCS wrappers to astropy:
-
NDCube.save/write: Add a method to write out an
NDCube
to one of a set of supported file types. - Enable creation of an
NDCube
from anxarray
instance and/or vice versa.
e.g. dask (Done in v2.1.0) ...
- Provide decorator to call other subclasses methods: Compliant subclasses would write a hook whose API is defined by ndcube. Then the decorator would convert one subclass to another, call the method, then reconvert back to the original subclass.