[yt-svn] commit/yt: 5 new changesets
Bitbucket
commits-noreply at bitbucket.org
Tue Apr 3 10:06:12 PDT 2012
5 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/d39252678edf/
changeset: d39252678edf
branch: yt
user: ngoldbaum
date: 2012-04-03 00:22:16
summary: This fixes the broken --max and --min keywords of 'yt stats'
affected #: 1 file
diff -r a71d3a2b8a9e875f6b9c535233c3123d8e505360 -r d39252678edffafe3a574c55ba8e739c74acda7e yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1327,10 +1327,10 @@
class YTStatsCmd(YTCommand):
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."))
+ dict(long="--max", action='store', const='Density', nargs='?', default=False,
+ dest='maxfield', help="Display maximum of requested field."),
+ dict(long="--min", action='store', const='Density', nargs='?', default=False,
+ dest='minfield', help="Display minimum of requested field."))
name = "stats"
description = \
"""
@@ -1344,13 +1344,13 @@
def __call__(self, args):
pf = args.pf
pf.h.print_stats()
- 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.minfield in pf.h.field_list or args.maxfield in pf.h.field_list:
+ if args.maxfield != False:
+ v, c = pf.h.find_max(args.maxfield)
+ print "Maximum %s: %0.5e at %s" % (args.maxfield, v, c)
+ if args.minfield != False:
+ v, c = pf.h.find_min(args.minfield)
+ print "Minimum %s: %0.5e at %s" % (args.minfield, v, c)
if args.output is not None:
t = pf.current_time * pf['years']
open(args.output, "a").write(
https://bitbucket.org/yt_analysis/yt/changeset/7268d81964db/
changeset: 7268d81964db
branch: yt
user: ngoldbaum
date: 2012-04-03 00:29:58
summary: We now check against the full field list.
This was missing enzo fields for flash datasets when comparing
against only pf.h.field_list
affected #: 1 file
diff -r d39252678edffafe3a574c55ba8e739c74acda7e -r 7268d81964db95255a1d5f617243d9259a6e58b0 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1344,7 +1344,7 @@
def __call__(self, args):
pf = args.pf
pf.h.print_stats()
- if args.minfield in pf.h.field_list or args.maxfield in pf.h.field_list:
+ if args.minfield in pf.h.derived_field_list or args.maxfield in pf.h.derived_field_list:
if args.maxfield != False:
v, c = pf.h.find_max(args.maxfield)
print "Maximum %s: %0.5e at %s" % (args.maxfield, v, c)
https://bitbucket.org/yt_analysis/yt/changeset/34c2ff51526c/
changeset: 34c2ff51526c
branch: yt
user: ngoldbaum
date: 2012-04-03 00:35:17
summary: nargs = '?' doens't work the way I thought it did. Might as well just mandate
that a field needs to be specified.
affected #: 1 file
diff -r 7268d81964db95255a1d5f617243d9259a6e58b0 -r 34c2ff51526c8c5d5bde1ba67f18730c08b42a35 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1327,9 +1327,9 @@
class YTStatsCmd(YTCommand):
args = ('outputfn','bn','skip','pf', 'field',
- dict(long="--max", action='store', const='Density', nargs='?', default=False,
+ dict(long="--max", action='store', default=False,
dest='maxfield', help="Display maximum of requested field."),
- dict(long="--min", action='store', const='Density', nargs='?', default=False,
+ dict(long="--min", action='store', default=False,
dest='minfield', help="Display minimum of requested field."))
name = "stats"
description = \
@@ -1337,8 +1337,6 @@
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):
https://bitbucket.org/yt_analysis/yt/changeset/2b10b8ea6ca5/
changeset: 2b10b8ea6ca5
branch: yt
user: ngoldbaum
date: 2012-04-03 01:57:49
summary: Reversing the interface changes from the previous commits. It was just fine the way it was.
affected #: 1 file
diff -r 34c2ff51526c8c5d5bde1ba67f18730c08b42a35 -r 2b10b8ea6ca5b90a41dc78042077b32f511039fa yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1326,29 +1326,31 @@
port=int(args.port), repl=hr)
class YTStatsCmd(YTCommand):
- args = ('outputfn','bn','skip','pf', 'field',
- dict(long="--max", action='store', default=False,
- dest='maxfield', help="Display maximum of requested field."),
- dict(long="--min", action='store', default=False,
- dest='minfield', help="Display minimum of requested field."))
+ 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/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 args.minfield in pf.h.derived_field_list or args.maxfield in pf.h.derived_field_list:
- if args.maxfield != False:
- v, c = pf.h.find_max(args.maxfield)
- print "Maximum %s: %0.5e at %s" % (args.maxfield, v, c)
- if args.minfield != False:
- v, c = pf.h.find_min(args.minfield)
- print "Minimum %s: %0.5e at %s" % (args.minfield, v, c)
+ if args.field in pf.h.derived_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(
https://bitbucket.org/yt_analysis/yt/changeset/7a3111b831b6/
changeset: 7a3111b831b6
branch: yt
user: ngoldbaum
date: 2012-04-03 01:59:54
summary: More useful help message.
affected #: 1 file
diff -r 2b10b8ea6ca5b90a41dc78042077b32f511039fa -r 7a3111b831b6fe072519344c415a727443a03775 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1328,9 +1328,9 @@
class YTStatsCmd(YTCommand):
args = ('outputfn','bn','skip','pf','field',
dict(long="--max", action='store_true', default=False,
- dest='max', help="Display maximum of requested field."),
+ dest='max', help="Display maximum of field requested through -f option."),
dict(long="--min", action='store_true', default=False,
- dest='min', help="Display minimum of requested field."))
+ dest='min', help="Display minimum of field requested through -f option."))
name = "stats"
description = \
"""
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