You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently found myself in a position where I calculated some Streamlines but then realized I wanted a different streamline length and had to re-calculate. Currently the only way to do this is to instantiate a new Streamlines object, which is pretty slow if you don't know to supply a volume argument (which I didn't at first). To avoid waiting for the AMRKDTree to re-build between instances, you can do:
But I think it'd be nice to be able reset some of the Streamlines attributes so that you can re-use the default volume. So the above code might condense to something like:
I think it'd make sense to implement for the following attributes: starting_positions, length, get_magnitude, direction, dx. And while you could directly set these attributes now, there's a bit of sanitizing that happens in Streamlines.__init__ so it'd be safer to have these as getter/setter attributes.
I recently found myself in a position where I calculated some
Streamlines
but then realized I wanted a different streamline length and had to re-calculate. Currently the only way to do this is to instantiate a newStreamlines
object, which is pretty slow if you don't know to supply avolume
argument (which I didn't at first). To avoid waiting for theAMRKDTree
to re-build between instances, you can do:But I think it'd be nice to be able reset some of the
Streamlines
attributes so that you can re-use the default volume. So the above code might condense to something like:I think it'd make sense to implement for the following attributes:
starting_positions
,length
,get_magnitude
,direction
,dx
. And while you could directly set these attributes now, there's a bit of sanitizing that happens inStreamlines.__init__
so it'd be safer to have these as getter/setter attributes.Good idea? Bad idea?
Link to streamlines.py
The text was updated successfully, but these errors were encountered: