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

add ability to map array and matrix columns #134

Open
esheldon opened this issue Jul 31, 2017 · 0 comments
Open

add ability to map array and matrix columns #134

esheldon opened this issue Jul 31, 2017 · 0 comments

Comments

@esheldon
Copy link

esheldon commented Jul 31, 2017

A good example is the ngmix photometry which has array and matrix columns. Some of these are covariance matrices, which are naturally represented in memory as a 9x9 matrix not 81 different columns.

A simple approach is for easyaccess to internally check that the user has requested an array or matrix column, such as cm_pars_cov, and then expand it in the query. E.g. the user could write

select
    cm_pars,
    cm_pars_cov,
from
    ....

and this would internally be expanded to

select
    cm_pars_1,
    cm_pars_2,
    ....
    cm_pars_cov_1_1,
    cm_pars_cov_1_2,
   ...
from

And then when writing out a fits file or returning a numpy array, the data gets packed into single columns cm_pars and cm_pars_cov.

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

No branches or pull requests

1 participant