[yt-svn] commit/yt: 4 new changesets
Bitbucket
commits-noreply at bitbucket.org
Wed Feb 1 10:16:55 PST 2012
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/cd4e47b94264/
changeset: cd4e47b94264
branch: yt
user: devinsilvia
date: 2012-01-26 22:32:11
summary: Merging.
affected #: 1 file
diff -r b00b8a98ec643bf18d1147cf8f398fc715e39d95 -r cd4e47b94264a87a521ff0f6fd8dff6dcc48fca9 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -594,23 +594,6 @@
xf_copy = clump[xf].copy()
yf_copy = clump[yf].copy()
-
- #Shift zones that belong shifted, both directions in X and Y.
- shifted = na.logical_and( xf_copy + DomainWidth[px_index] >= DomainRight[px_index],
- xf_copy + DomainWidth[px_index]<= x1 )
- xf_copy[na.where(shifted)] += DomainWidth[px_index]
-
- shifted = na.logical_and( xf_copy - DomainWidth[px_index] <= DomainLeft[px_index],
- xf_copy - DomainWidth[px_index] >= x0 )
- xf_copy[na.where(shifted)] -= DomainWidth[px_index]
-
- shifted = na.logical_and( yf_copy + DomainWidth[py_index] >= DomainRight[py_index],
- yf_copy + DomainWidth[py_index] <= y1 )
- yf_copy[na.where(shifted)] += DomainWidth[py_index]
-
- shifted = na.logical_and( yf_copy - DomainWidth[py_index] <= DomainLeft[py_index],
- yf_copy - DomainWidth[py_index] >= y0 )
- yf_copy[na.where(shifted)] -= DomainWidth[py_index]
temp = _MPL.Pixelize(xf_copy, yf_copy,
clump['dx']/2.0,
https://bitbucket.org/yt_analysis/yt/changeset/9fc782668f9b/
changeset: 9fc782668f9b
branch: yt
user: devinsilvia
date: 2012-01-28 00:04:34
summary: merged.
affected #: 0 files
https://bitbucket.org/yt_analysis/yt/changeset/da8ad331e52e/
changeset: da8ad331e52e
branch: yt
user: devinsilvia
date: 2012-02-01 18:15:01
summary: Merged.
affected #: 0 files
https://bitbucket.org/yt_analysis/yt/changeset/b31de9e80571/
changeset: b31de9e80571
branch: yt
user: devinsilvia
date: 2012-02-01 19:11:24
summary: Modified 'yt stats' to allow the user to find the maximum or minimum of any field.
affected #: 1 file
diff -r da8ad331e52efc99e38aabbeb8bb71fe99d36170 -r b31de9e80571f9d401898c9dcfb69ada511d7b0e yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1383,20 +1383,31 @@
port=int(args.port), repl=hr)
class YTStatsCmd(YTCommand):
- args = ('outputfn','bn','skip','pf')
+ args = ('outputfn','bn','skip','pf', 'field',
+ dict(long="--max", action="store_true", default=False,
+ dest='max', help="Display maximum of requested field."),
+ dict(long="--min", action="store_true", default=False,
+ dest='min', help="Display minimum of requested field."))
name = "stats"
description = \
"""
- Print stats and max density for one or more datasets
+ Print stats and max/min value of a given field (if requested),
+ for one or more datasets
+
+ (default field is density)
"""
def __call__(self, args):
pf = args.pf
pf.h.print_stats()
- if "Density" in pf.h.field_list:
- v, c = pf.h.find_max("Density")
- print "Maximum density: %0.5e at %s" % (v, c)
+ if args.field in pf.h.field_list:
+ if args.max == True:
+ v, c = pf.h.find_max(args.field)
+ print "Maximum %s: %0.5e at %s" % (args.field, v, c)
+ if args.min == True:
+ v, c = pf.h.find_min(args.field)
+ print "Minimum %s: %0.5e at %s" % (args.field, v, c)
if args.output is not None:
t = pf.current_time * pf['years']
open(args.output, "a").write(
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