Remove 'thresh' option in fitwarp2d. #208
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Singular-value decomposition of the basis vectors can return
singular values that differ by 8--10 orders of magnitude. The
default value of thresh (1e-5) would discard several of these smaller
values. That's a problem because the inverses of the singular
values are actually used to produce the solution in _svd. Discarding
the largest singular values didn't seem to help either. Since it
wasn't entirely clear why some of the singular values were being
discarded, I commented out that line of code, and the associated
documentation, so now we keep all of the singular values.
I also added a detailed explanation of what fitwarp2d, _svd, and
_mkbasis actually do. And of course, some tests.
If somebody with a lot of linear algebra experience is convinced
of a a good reason to discard some of these singular values, we
can revisit this (hence why I haven't removed the code, just
commented it out for now).