-
Notifications
You must be signed in to change notification settings - Fork 50
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
Getting surfaces of a box monitor #147
Conversation
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.
Needs a few minor changes, but overall looks good!
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.
Let's make one more change: I think it will be useful for the FieldTimeMonitor to also have this functionality. Can we move this method to AbstractFieldMonitor
and generalize the stuff on line 197? For example, for each of the new surfaces, we can make a copy of self
using self.copy(deep=True)
and assign the correct centers, sizes, and names to the copies. Let me know if this makes sense.
Looks good. Only two comments for things to fix and I'll merge:
Thanks a lot! |
…st both FieldMonitor and FieldTimeMonitor
…y so pytest doesn't try to run the helper function
…y so pytest doesn't try to run the helper function
Added
FieldMonitor.surfaces()
to monitor.py, and a corresponding test functiontest_monitor_surfaces_from_volume()
in test_components.py.For an object of class
FieldMonitor
associated with a box, the methodFieldMonitor.surfaces()
returns a list of 6 "surface" monitors, each one corresponding to the 6 sides of the box.Would be useful to review that the functions are written in an efficient "pythonic" way - feedback on style etc. would be great!