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

Don't warn repeatedly when l_mat and w_mat are inconsistent #277

Closed
gustavdelius opened this issue Dec 23, 2022 · 2 comments
Closed

Don't warn repeatedly when l_mat and w_mat are inconsistent #277

gustavdelius opened this issue Dec 23, 2022 · 2 comments
Labels
minor effort Resolving this issue will involve a minor effort setting parameters Issue relates to the part of mizer used for setting up MizerParams objects.

Comments

@gustavdelius
Copy link
Member

If a species parameter has both an l_mat and a w_mat column, then each time mizer checks the validity of the species parameters (which it does each time a species parameter is changed) it issues a warning if the l_mat and w_mat values are inconsistent with each other. This will be a nuisance when the user has made a conscious decision to change w_mat (for example while using tuneParams()) but does not want to have to change l_mat by hand at the same time.

There are two possible solutions:

  1. Delete the l_mat column once there is an w_mat column
  2. Recalculate the l_mat column each time w_mat is changed and similarly recalculate w_mat when l_mat is changed.

I am in favour of the first solution.

@gustavdelius gustavdelius added setting parameters Issue relates to the part of mizer used for setting up MizerParams objects. minor effort Resolving this issue will involve a minor effort labels Dec 23, 2022
@gustavdelius
Copy link
Member Author

The length-based parameters are now removed once they have been used to calculate any missing weight-based parameters

@gustavdelius
Copy link
Member Author

It was not a good idea to remove the length-based parameters. Users may really want to keep a record of what parameters they have provided. Also they may have added comments to the parameters that they want to preserve.

To avoid the frequent warning, I have converted it to a signal instead, so it will be issued when creating a new model but not each time the model is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor effort Resolving this issue will involve a minor effort setting parameters Issue relates to the part of mizer used for setting up MizerParams objects.
Projects
None yet
Development

No branches or pull requests

1 participant