Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identification and extraction of subcubes based on world axis types #489

Open
Cadair opened this issue Oct 28, 2021 · 4 comments
Open

Identification and extraction of subcubes based on world axis types #489

Cadair opened this issue Oct 28, 2021 · 4 comments

Comments

@Cadair
Copy link
Member

Cadair commented Oct 28, 2021

Various analysis routines or functions are going to be specific to cubes that contain certain world axes types, i.e. a cube with one or two celestial axes.

For example @wtbarnes and I are discussing a function which extracts pixels at certain coordinates along any celestial axes. This function could be written to work with any cube which has one or more celestial axes as long as it's possible to identify which array axes correspond to the celestial axes. (Which is possible now with the correlation matrix / world axis physical types but not exactly pretty).

In addition to this, I think it would be cool to provide a WCS.sub like function which could use the logic to identify axes of certain types to return sub cubes.

@DanRyanIrish
Copy link
Member

As an example, say we have a spectral, space, space cube. Would this feature slice the cube at an arbitrary point along the spectral axis and then drop the spectral value that slicing puts into global coords?

@Cadair
Copy link
Member Author

Cadair commented Oct 28, 2021

That's kinda what I was thinking yes. I think the identification logic will probably be more useful than then subcube function, but still potentially useful.

@Cadair
Copy link
Member Author

Cadair commented Oct 28, 2021

Alternatively the sub function could return N cubes of only the given axes, so instead of a time series you have N celestial-only cubes.

@DanRyanIrish
Copy link
Member

The second option is an elaboration on explode_along_axis.

@DanRyanIrish DanRyanIrish added this to To Do in NDCube Roadmap Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

No branches or pull requests

2 participants