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

DM-15635: Approximate filter throughput for DcrCoadds #227

Merged
merged 5 commits into from Oct 26, 2018

Conversation

isullivan
Copy link
Contributor

No description provided.

modelWidth = pexConfig.Field(
dtype=int,
doc="Width of the region around detected sources to include in the DcrModel."
"Set to a negative number to disable, which will include all pixels.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless you care to convince me otherwise, I'd prefer an error to be raised if a nonsensical modelWidth < 0 is chosen. Later it uses a negative value to set all the weights to 1, which seems dangerous; wouldn't throwing an exception be safer? It's also not clear to me why 3 is a good default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point. I'll make it raise an exception on negative values, and will add a separate config parameter to turn it on or off.

"Set to a negative number to disable, which will include all pixels.",
default=3,
)
useSubfilterMidpoint = pexConfig.Field(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this be called useMidpoint like in ip_diffim? (Or, alternately, could the one in ip_diffim be called useSubfilterMidpoint? Mostly I'm seeking consistency!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've switched the name to splitSubfilters, and used it consistently throughout.

Or a placeholder value of 1.0 if ``self.config.modelWidth`` is set to a negative number.
"""
if self.config.modelWidth < 0:
return 1.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I don't like this sneaky behavior. If you want a fallback option to have all the weights be 1, that should be an explicit option, not something that happens if the width is set negative.

@isullivan isullivan force-pushed the tickets/DM-15635 branch 2 times, most recently from 0dac5d9 to 9a95dfd Compare October 23, 2018 20:05
@@ -470,6 +492,9 @@ def dcrAssembleSubregion(self, dcrModels, bbox, tempExpRefList, imageScalerList,
The variance of each coadded subfilter image.
gain : `float`, optional
Relative weight to give the new solution when updating the model.
modelWeights : `numpy.ndarray` or `float`
A 2D array of weight values that tapers smoothly to zero away from detected sources.
Set to a placeholder value of 1.0 if ``self.config.modelWeightsWidth`` is False.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Set to a placeholder value of 1.0 if ``self.config.modelWeightsWidth`` is False.
Set to a placeholder value of 1.0 if ``self.config.useModelWeights`` is False.

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