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

Simplified ColumnMapper names as properties of the ensemble #261

Open
nevencaplar opened this issue Oct 6, 2023 · 1 comment
Open

Simplified ColumnMapper names as properties of the ensemble #261

nevencaplar opened this issue Oct 6, 2023 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@nevencaplar
Copy link
Member

When working with the ensemble I often felt it would be natural to call columns which were explicitly defined in ColumnMapper. For instance, if I used

col_map = ColumnMapper(id_col="SDSS_NAME_dr16q_constant", time_col="mjd_ztf_source", flux_col="mag_ztf_source", err_col="magerr_ztf_source", band_col="band_ztf_source")

it seems natural to use something like ensemble.source[flux] instead of ensemble.source[mag_ztf_source]. Now, that is not possible, but I suggest to assign the simplified column names as property of the ensemble, e.g., ensemble.source.flux to get the same result as generated by ensemble.source[mag_ztf_source] now.

@nevencaplar nevencaplar added enhancement New feature or request good first issue Good for newcomers labels Oct 6, 2023
@dougbrn
Copy link
Collaborator

dougbrn commented Oct 6, 2023

If the desired usage pattern is ensemble.source.flux, this will be blocked by the refactor (#191 ), as it requires the ability to add properties to the underlying dataframe itself. Which is dask currently, but will be our own SourceFrame object after the refactor.

And just to be clear, these properties should be distinct from the current ensemble._flux_col, etc properties. Where ensemble.source.flux returns a series, and ensemble._flux_col returns the string column name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants