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
Tickets/DM-18742: speed up DcrModel convergence #120
Conversation
b65823e
to
a12b153
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some documentation issues, otherwise looks good.
@@ -319,6 +321,9 @@ def buildMatchedTemplate(self, exposure=None, order=3, | |||
splitSubfilters : `bool`, optional | |||
Calculate DCR for two evenly-spaced wavelengths in each subfilter, | |||
instead of at the midpoint. Default: False | |||
amplifyModel : `float`, optional | |||
Amplify the differences between model planes. | |||
Used to speed convergence of iterative forward modeling. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the float
some kind of multiplier (as I assume from the default)? If so, please say so.
python/lsst/ip/diffim/dcrModel.py
Outdated
@@ -319,6 +321,9 @@ def buildMatchedTemplate(self, exposure=None, order=3, | |||
splitSubfilters : `bool`, optional | |||
Calculate DCR for two evenly-spaced wavelengths in each subfilter, | |||
instead of at the midpoint. Default: False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default is now True
.
maskedImage.variance = self.variance | ||
maskedImage.image = templateImage[bbox] | ||
maskedImage.mask = self.mask[bbox] | ||
maskedImage.variance = self.variance[bbox] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these changes for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was an unrelated bug I fixed on this branch. I'll move these changes to their own commit.
* Use the correct mode for gaussian filtering. The default setting is 'reflect', which is not desirable. * Modify use of `regularizationFactor` to match documentation. * Image thresholds must be applied before smoothing, not after.
a12b153
to
acfe017
Compare
Add an option that amplifies the differences between DCR model planes to accelerate convergence. With default settings this is only applied within the footprints of detected sources, and only during the iterative forward modeling step of constructing the DcrModel.
Work on this ticket involved in-depth investigation of frequency regularization, and includes some changes to that implementation.