sunpy/sunraster

RasterSequence.cube_like_world_axis_physical_types Rename 1st axis type with "time".

DanRyanIrish opened this issue · 0 comments

Currently, RasterSequence.cube_like_world_axis_physical_types returns the relevant axis types from the WCS, as it is inherited straight from NDCubeSequence. However, in the case of RasterSequence, the first cube-like axis is most appropriately described as time, regardless of whether time is stored in the WCS or extra coords.

Therefore, propose changing the first returned physical type to time.

However, the position along slit then has two real world coordinates (lon, lat). This means for three pixel dimensions, there are four real world ones. One solution could be to have the second returned value be a tuple of strings giving (lon, lat), e.g.

>>> RasterSequence.cube_like_world_axis_physical_types
('time', ('custom.pos.helioprojective.lon', 'custom.pos.helioprojective.lat'), 'em.wl')

However, currently NDCubeSequence.cube_like_world_axis_physical_types (and NDCubeSequence.cube_like_world_axis_physical_types) do not give a one-to-one correspondence between physics axis type and pixel dimension number, even though in many cases it may appear that it does. Therefore this issue motivations ndcube Issue #240.

The solution to ndcube Issue #240 has been punted to 2.0 (ndcube #243). Consider directly implementing this method in sunraster until ndcube 2.0 is released.