[Yt-svn] commit/yt: MatthewTurk: Fixing the center command line option to work with non-0, 1 domains.
Bitbucket
commits-noreply at bitbucket.org
Mon Jun 6 15:33:05 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/161fc8b3ce35/
changeset: 161fc8b3ce35
branches:
user: MatthewTurk
date: 2011-06-07 00:32:54
summary: Fixing the center command line option to work with non-0,1 domains.
affected #: 1 file (112 bytes)
--- a/yt/utilities/command_line.py Mon Jun 06 12:00:56 2011 -0700
+++ b/yt/utilities/command_line.py Mon Jun 06 15:32:54 2011 -0700
@@ -89,9 +89,9 @@
help="Desired units"),
center = dict(short="-c", long="--center",
action="store", type="float",
- dest="center", default=[0.5, 0.5, 0.5],
+ dest="center", default=None,
nargs=3,
- help="Center (-1,-1,-1 for max)"),
+ help="Center, command separated (-1 -1 -1 for max)"),
bn = dict(short="-b", long="--basename",
action="store", type="string",
dest="basename", default=None,
@@ -478,6 +478,8 @@
if opts.center == (-1,-1,-1):
mylog.info("No center fed in; seeking.")
v, center = pf.h.find_max("Density")
+ elif opts.center is None:
+ center = 0.5*(pf.domain_left_edge + pf.domain_right_edge)
center = na.array(center)
pc=PlotCollection(pf, center=center)
if opts.axis == 4:
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list