Repository navigation
Volume shooting point selector - #1151
dwhswenson merged 3 commits into
Conversation
|
This is ready for review and comment. Without review, I will merge this after at least 24 hours, no sooner than Mon 22 Jul 20:00 GMT (15:00 my local). |
sroet
left a comment
There was a problem hiding this comment.
one question about your reasoning, looks good either way
| self.volume = volume | ||
|
|
||
| def f(self, frame, trajectory): | ||
| return float(self.volume(frame)) |
There was a problem hiding this comment.
any particular reason you went for float instead of int casting?
(I understand it makes sense from a probablility point of view, but not really from the point of view that the output of volume should be bool)
There was a problem hiding this comment.
I'm thinking of it as a special case of a shooting point biasing function, like BiasedSelector. In that case you bias toward certain shooting points using a CV, which returns floats. Really, the actual value that comes out here doesn't matter, as long as it is either 0 or some constant
FWIW, even UniformSelector technically returns 1.0 for its f. So this also keeps the typing consistent across different selectors.
This adds a volume-based shooting point selector. It will only select points from a given volume.
(I thought we already had this? I thought this was implemented as part of "Shooting Range" by @hejung in one of our ESDWs? Guess that code never made it into main. Not too hard to recreate this much of it, though.)