astropy / astropy/reproject

Allow spectral-cube as an input type

Open
#565 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
127
Forks
74
Avg merge
1d 11h
Merged PRs (30d)
2

Description

I tried running `reproject_to_hips` with a `SpectralCube` input and that failed.

The next obvious thing, `reproject_to_hips(cube.hdu)` (which is a bit potentially-dangerous because of loading TB into memory...) also failed with
```
ValueError: The input (VRAD) and output (FREQ-LOG) spectral coordinate types are not equivalent.
```

`reproject_to_hips(cube.with_spectral_unit(u.GHz).hdu, ...)` worked.

It would be better if we supported direct operation on `spectral_cube`s (and nddata cubes), but we should at least document the above limitations (apparently velocity frame isn't allowed output? or I need to specify it but I didn't immediately see how)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported failures at the reproject_to_hips entry point with a SpectralCube and with cube.hdu, then compare them with cube.with_spectral_unit(u.GHz).hdu. The work is complete when direct SpectralCube and nddata cube inputs are supported, or the documented limitations clearly explain the required spectral-coordinate handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.