sunpy / ndcube

A base package for multi-dimensional contiguous and non-contiguous coordinate-aware arrays. "Maintainers": @danryanirish & @Cadair
http://docs.sunpy.org/projects/ndcube/
BSD 2-Clause "Simplified" License
44 stars 47 forks source link

Make TableCoordinates support pixel edges and centers #713

Open DanRyanIrish opened 4 months ago

DanRyanIrish commented 4 months ago

PR Description

This PR enables support for custom pixel edges in QuantityTableCoordinate and TimeTableCoordinate objects by storing the underlying grids as including pixel edges and centers, not just centers as heretonow.

The motivation is that world coordinates at pixel edges are often wanted. When the pixel widths are uniform, the edges can be found from the centers. However, when this is not the case, explicit knowledge of the edges is required.

DanRyanIrish commented 4 months ago

@Cadair Can you advise on whether this is the best way to go about this?

DanRyanIrish commented 3 months ago

Make TableCoordinate require the input pixel grid to which the input world grid corresponds, and then keep that as the underlying storage. Enable shortcuts for "center" and "corners".