-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Clean up factor range and add factor method #14037
Conversation
@mattpap suddenly seeing this locally (and I guess in CI) after merging latest
any ideas? Edit: I guess it's the last commit for the internal properties but the error message does not give much to go on Edit2: missed the |
@mattpap next issue.. I am not seeing any
Edit: dunno why the local/CI diff but it's better as a switch in any case |
OK I embarked on a (slightly) more ambitious refactoring. It bothered me that we had to switch on the levels in multiple various places, so I encapsulated everything for each level in a subclass of a generic Edit: went through examples report in rather fine detail and everything looks correct there as well. |
This is preparation for working on #601. In order to implement that we need and inverse method for
synthetic
that returns factors, given a synthetic coordinate as input. Looking at adding that, it became clear thatfactor_range.ts
was long overdue for serious cleanup.This PR breaks up the parts of
factor_range.ts
in to much smaller functions and methods, adds more tests for these where possible, and also adds afactor
method to do the inverse synthetic calculation.All of the original unit tests were maintained, modulo trivial cosmetic changes for some renames, etc.
I expect
map_one_level
, etc could also be cleaned up. But since they aren't too terrible I decided to avoid more change risk than necessary.Edit: examples report checked, everything looks correct at a glance.