Hi all, If I have a region of a box, and I can see the edges like this:
region AMRRegion (RedshiftOutput0000): center=[0.5, 0.5, 0.5], left_edge=[0.20000000000000001, 0.20000000000000001, 0.20000000000000001], right_edge=[0.69999999999999996, 0.69999999999999996, 0.69999999999999996]
How do I access them so I can use them? Thanks! _______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________
Hi Stephen, You can access them as: region.left_edge region.right_edge The output string is auto-generated and the parameter name is output verbatim. You can see the source code here: http://yt.enzotools.org/browser/trunk/yt/lagos/BaseDataTypes.py#L262 What happens is that whenever the object needs to be turned into a string, it outputs the contents of "self._con_args" where _con_args is defined to contain all the material necessary to replicate the object. (This is actually not true for ExtractedRegions, to avoid unmanageably long output for that particular object type.) -Matt On Mon, Jul 27, 2009 at 5:00 PM, Stephen Skory<stephenskory@yahoo.com> wrote:
Hi all,
If I have a region of a box, and I can see the edges like this:
region AMRRegion (RedshiftOutput0000): center=[0.5, 0.5, 0.5], left_edge=[0.20000000000000001, 0.20000000000000001, 0.20000000000000001], right_edge=[0.69999999999999996, 0.69999999999999996, 0.69999999999999996]
How do I access them so I can use them?
Thanks!
_______________________________________________________ sskory@physics.ucsd.edu o__ Stephen Skory http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student ________________________________(_)_\(_)_______________
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
participants (2)
-
Matthew Turk -
Stephen Skory