-
Notifications
You must be signed in to change notification settings - Fork 12
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-23781: Improve Sky Object Placement #312
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,12 @@ def setUp(self): | |
|
||
# Relative tolerance for tweak factor | ||
# Not sure why this isn't smaller; maybe due to use of Poisson instead of Gaussian noise? | ||
self.rtol = 0.1 | ||
# It seems as if some sky objects are being placed in the extra | ||
# background region, which is causing the offset between the expected | ||
# factor and the measured factor to be larger than otherwise expected. | ||
# This relative tolerance was increased from 0.1 to 0.15 on DM-23781 to | ||
# account for this. | ||
self.rtol = 0.15 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be worth a comment in the commit message about this change (not that we can really explain it at the moment...😞). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought about adding one, but the initial in-line that's already there seems to capture everything I would want to say anyway. In the spirit of adding something, I've added this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks good (I did just mean adding something to the commit message, but this works too!) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, the commit message! For some reason I didn't parse that the first time around. Commit message also updated with some background too. |
||
|
||
def tearDown(self): | ||
del self.exposure | ||
|
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.
RE:
does this algorithm guarantee no overlapping positions? If not, you might consider adding:
after the line:
at line 93 below in order to have a cumulative
avoid
mask. It worked nicely using the old trial 'n error algorithm (but may not be necessary now?)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.
There's nothing explicit in the SciPy Halton Sequence implementation that prevents overlapping positions as N tends to infinity, however, it is (by design)
exceptionallyunlikely.However, I do like your additional logic to prevent this and I don't think it adds too much overhead. As
SkyObjectsConfig
already has agrowMask
field, I'm tempted to recommend using this information rather than hard-coding a double-in-size condition?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.
Following testing, I think I convinced myself that I prefer your initial idea of growing the sky object footprints by their own radius. I experimented with growing the
growMask
parameter, and while it works, it occurred to me that that parameter was intended to mask the flux in the wings of astrophysical sources. We want to grow sky object footprints for a different reason altogether (to avoid clustering for stats purposes). To that end, I've adopted your initial recommendation above as-is.