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

Tickets/DM-18742: speed up DcrModel convergence #120

Merged
merged 4 commits into from May 1, 2019
Merged

Conversation

isullivan
Copy link
Contributor

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.

Copy link
Member

@kfindeisen kfindeisen left a 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.
Copy link
Member

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.

@@ -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
Copy link
Member

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]
Copy link
Member

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?

Copy link
Contributor Author

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.
@isullivan isullivan merged commit 09759e8 into master May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants