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

Allow data_factories to return hdulist objects #532

Closed
ChrisBeaumont opened this issue Dec 12, 2014 · 4 comments · Fixed by #598
Closed

Allow data_factories to return hdulist objects #532

ChrisBeaumont opened this issue Dec 12, 2014 · 4 comments · Fixed by #598

Comments

@ChrisBeaumont
Copy link
Member

This would make it easier to set up glue coordinates

@astrofrog
Copy link
Member

@ChrisBeaumont - could you explain a bit more what you were thinking here?

@ChrisBeaumont
Copy link
Member Author

Right now, functions decorated with @data_factory can return a bunch of objects besides Glue Data instances, and Glue tries to package these appropriately (for example, it can accept astropy tables or pandas dataframes). That logic is handled by qglue.parse_data https://github.com/glue-viz/glue/blob/master/glue/core/data_factories.py#L249

It would be nice if parse_data knew what to do with HDUList objects, including packing the wcs into a Glue coordinate object and adding it to the dataset. Such logic is implemented in https://github.com/glue-viz/glue/blob/master/glue/core/data_factories.py#L347, but a user can't easily take advantage of it in a custom data loader

@astrofrog
Copy link
Member

@ChrisBeaumont - ok, thanks for the clarification, I can look into it soon.

@ChrisBeaumont
Copy link
Member Author

@astrofrog I can implement this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants