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

How to signal to user that features were not fit? #255

Open
drvdputt opened this issue Feb 20, 2023 · 2 comments
Open

How to signal to user that features were not fit? #255

drvdputt opened this issue Feb 20, 2023 · 2 comments

Comments

@drvdputt
Copy link
Contributor

Currently, the rows corresponding to unused features are masked out, so that they are displayed as a row of "--" when model.features is shown in a notebook. (reminder: unused means that the feature was not fit, because is it outside of the appropriate wavelength range, as determined by the data range and the redshift). Note that this is different from a user not wanting a certain feature. In that case they should just delete it from the Features table, or comment out a line in the YAML file.

Masking was chosen as opposed to setting the parameters to nan, because the features need be able to be "reactivated", e.g. when another fit with a different redshift is passed. The mask doesn't do anything to the stored values. It is purely cosmetic.

Obvious alternative: add an "enabled" column to the Features table.

Solution by changing the design: see new issue

@jdtsmith
Copy link
Contributor

jdtsmith commented Mar 4, 2023

One additional idea: sub-class astropy.table.Row and use the row.meta field to set row.meta['excluded_by_fit']=True (maybe with a helper method). Then further tweak table repr BoundedParTableFormatter to indicate this somehow.

@jdtsmith
Copy link
Contributor

Do we still mask out features that don't pass Model's culling cut? If the user wants to mask some out (e.g. all lines) and then "open them back up", is our current setup expressive enough for that?

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

No branches or pull requests

2 participants