[yt-svn] commit/yt: 5 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Mar 19 11:48:57 PDT 2012
5 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/b6db4d737f53/
changeset: b6db4d737f53
branch: yt
user: ngoldbaum
date: 2012-03-17 07:00:38
summary: Minimal representations expect an integer dimensionality, as in enzo
affected #: 1 file
diff -r 860a09f7021a854922cf9a546d30dc5aba708f90 -r b6db4d737f53b14762135611a5a9fa927359a828 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -325,12 +325,12 @@
nxb, nyb, nzb = [int(self._handle["/simulation parameters"]['n%sb' % ax])
for ax in 'xyz'] # FLASH2 only!
try:
- dimensionality = self._find_parameter("integer", "dimensionality",
- scalar = True)
+ dimensionality = float(self._find_parameter("integer", "dimensionality",
+ scalar = True))
except KeyError:
- dimensionality = 3
- if nzb == 1: dimensionality = 2
- if nyb == 1: dimensionality = 1
+ dimensionality = 3.
+ if nzb == 1: dimensionality = 2.
+ if nyb == 1: dimensionality = 1.
if dimensionality < 3:
mylog.warning("Guessing dimensionality as %s", dimensionality)
https://bitbucket.org/yt_analysis/yt/changeset/f908b2a297e2/
changeset: f908b2a297e2
branch: yt
user: ngoldbaum
date: 2012-03-19 19:31:45
summary: Added an explicit command line option to center plots on the density maximum
affected #: 1 file
diff -r 860a09f7021a854922cf9a546d30dc5aba708f90 -r f908b2a297e26b32887c2e9a999cf0ad8550e04b yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -152,6 +152,10 @@
dest="center", default=None,
nargs=3,
help="Center, space separated (-1 -1 -1 for max)"),
+ max = dict(short="-m", long="--max",
+ action="store_true",
+ dest="max",default=False,
+ help="Center the plot on the density maximum"),
bn = dict(short="-b", long="--basename",
action="store", type=str,
dest="basename", default=None,
@@ -1105,7 +1109,9 @@
class YTPlotCmd(YTCommand):
args = ("width", "unit", "bn", "proj", "center",
"zlim", "axis", "field", "weight", "skip",
- "cmap", "output", "grids", "time", "pf")
+ "cmap", "output", "grids", "time", "pf",
+ "max")
+
name = "plot"
description = \
@@ -1120,6 +1126,8 @@
if args.center == (-1,-1,-1):
mylog.info("No center fed in; seeking.")
v, center = pf.h.find_max("Density")
+ if args.max:
+ v, center = pf.h.find_max("Density")
elif args.center is None:
center = 0.5*(pf.domain_left_edge + pf.domain_right_edge)
center = na.array(center)
https://bitbucket.org/yt_analysis/yt/changeset/49981637545e/
changeset: 49981637545e
branch: yt
user: ngoldbaum
date: 2012-03-19 19:32:15
summary: Merging
affected #: 1 file
diff -r f908b2a297e26b32887c2e9a999cf0ad8550e04b -r 49981637545e2eef4f0340b96d3ca4b0f2619b12 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -325,12 +325,12 @@
nxb, nyb, nzb = [int(self._handle["/simulation parameters"]['n%sb' % ax])
for ax in 'xyz'] # FLASH2 only!
try:
- dimensionality = self._find_parameter("integer", "dimensionality",
- scalar = True)
+ dimensionality = float(self._find_parameter("integer", "dimensionality",
+ scalar = True))
except KeyError:
- dimensionality = 3
- if nzb == 1: dimensionality = 2
- if nyb == 1: dimensionality = 1
+ dimensionality = 3.
+ if nzb == 1: dimensionality = 2.
+ if nyb == 1: dimensionality = 1.
if dimensionality < 3:
mylog.warning("Guessing dimensionality as %s", dimensionality)
https://bitbucket.org/yt_analysis/yt/changeset/6b2cdb0da21a/
changeset: 6b2cdb0da21a
branch: yt
user: ngoldbaum
date: 2012-03-19 19:39:35
summary: Dimensionality should be an int,
the bug is in the minimal representation code
affected #: 1 file
diff -r 49981637545e2eef4f0340b96d3ca4b0f2619b12 -r 6b2cdb0da21ad4a2de281188ead5085c77f2dfa5 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -325,8 +325,8 @@
nxb, nyb, nzb = [int(self._handle["/simulation parameters"]['n%sb' % ax])
for ax in 'xyz'] # FLASH2 only!
try:
- dimensionality = float(self._find_parameter("integer", "dimensionality",
- scalar = True))
+ dimensionality = self._find_parameter("integer", "dimensionality",
+ scalar = True)
except KeyError:
dimensionality = 3.
if nzb == 1: dimensionality = 2.
https://bitbucket.org/yt_analysis/yt/changeset/d82e3fe88204/
changeset: d82e3fe88204
branch: yt
user: ngoldbaum
date: 2012-03-19 19:45:11
summary: Forgot to update these as well.
affected #: 1 file
diff -r 6b2cdb0da21ad4a2de281188ead5085c77f2dfa5 -r d82e3fe882046290ae7a21d1f2fb1272d500ddd5 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -328,9 +328,9 @@
dimensionality = self._find_parameter("integer", "dimensionality",
scalar = True)
except KeyError:
- dimensionality = 3.
- if nzb == 1: dimensionality = 2.
- if nyb == 1: dimensionality = 1.
+ dimensionality = 3
+ if nzb == 1: dimensionality = 2
+ if nyb == 1: dimensionality = 1
if dimensionality < 3:
mylog.warning("Guessing dimensionality as %s", dimensionality)
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