[yt-svn] commit/yt: 3 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Dec 5 09:38:15 PST 2011
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/37c91ffe3834/
changeset: 37c91ffe3834
branch: yt
user: sskory
date: 2011-12-01 23:52:02
summary: Minor improvement to LoadedHaloes.
affected #: 1 file
diff -r c2bfa4fdd6b31ce9128302eea45b677e78fddc41 -r 37c91ffe38343be1dab7e9c08c8e5530c8b99c85 yt/analysis_modules/halo_finding/halo_objects.py
--- a/yt/analysis_modules/halo_finding/halo_objects.py
+++ b/yt/analysis_modules/halo_finding/halo_objects.py
@@ -1365,7 +1365,10 @@
# Prepend the hdf5 file names with the full path.
temp = []
for item in line[1:]:
- temp.append(self.pf.fullpath + '/' + item)
+ if item[0] == "/":
+ temp.append(item)
+ else:
+ temp.append(self.pf.fullpath + '/' + item)
locations.append(temp)
lines.close()
return locations
https://bitbucket.org/yt_analysis/yt/changeset/2281bdb03f90/
changeset: 2281bdb03f90
branch: yt
user: sskory
date: 2011-12-02 17:18:20
summary: Merge.
affected #: 3 files
diff -r 37c91ffe38343be1dab7e9c08c8e5530c8b99c85 -r 2281bdb03f90fad30510d13ef18b6ce5e523266c yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -91,11 +91,10 @@
# Because we need an instantiated class to check the pf's existence in
# the cache, we move that check to here from __new__. This avoids
# double-instantiation.
- if ytcfg.getboolean('yt', 'serialize'):
- try:
- _pf_store.check_pf(self)
- except NoParameterShelf:
- pass
+ try:
+ _pf_store.check_pf(self)
+ except NoParameterShelf:
+ pass
self.print_key_parameters()
self.create_field_info()
diff -r 37c91ffe38343be1dab7e9c08c8e5530c8b99c85 -r 2281bdb03f90fad30510d13ef18b6ce5e523266c yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -136,14 +136,25 @@
offset = 7
ii = na.argsort(self.grid_levels.flat)
gid = self._handle["/gid"][:]
+ first_ind = -(self.parameter_file.refine_by**self.parameter_file.dimensionality)
for g in self.grids[ii].flat:
gi = g.id - g._id_offset
# FLASH uses 1-indexed group info
- g.Children = [self.grids[i - 1] for i in gid[gi,7:] if i > -1]
+ g.Children = [self.grids[i - 1] for i in gid[gi,first_ind:] if i > -1]
for g1 in g.Children:
g1.Parent = g
g._prepare_grid()
g._setup_dx()
+ if self.parameter_file.dimensionality < 3:
+ DD = (self.parameter_file.domain_right_edge[2] -
+ self.parameter_file.domain_left_edge[2])
+ for g in self.grids:
+ g.dds[2] = DD
+ if self.parameter_file.dimensionality < 2:
+ DD = (self.parameter_file.domain_right_edge[1] -
+ self.parameter_file.domain_left_edge[1])
+ for g in self.grids:
+ g.dds[1] = DD
self.max_level = self.grid_levels.max()
def _setup_derived_fields(self):
@@ -183,7 +194,6 @@
# These should be explicitly obtained from the file, but for now that
# will wait until a reorganization of the source tree and better
# generalization.
- self.dimensionality = 3
self.refine_by = 2
self.parameters["HydroMethod"] = 'flash' # always PPM DE
self.parameters["Time"] = 1. # default unit is 1...
@@ -275,6 +285,8 @@
[self._find_parameter("real", "%smin" % ax) for ax in 'xyz'])
self.domain_right_edge = na.array(
[self._find_parameter("real", "%smax" % ax) for ax in 'xyz'])
+ self.dimensionality = self._find_parameter("integer", "dimensionality",
+ scalar = True)
# Determine domain dimensions
try:
https://bitbucket.org/yt_analysis/yt/changeset/a37631cda71a/
changeset: a37631cda71a
branch: yt
user: sskory
date: 2011-12-05 18:35:57
summary: Merge.
affected #: 1 file
diff -r 2281bdb03f90fad30510d13ef18b6ce5e523266c -r a37631cda71afd84fba5b7ef36d127109c8fb356 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -325,10 +325,11 @@
req.add_header('Authorization', 'Basic %s' % base64.b64encode(upw).strip())
return urllib2.urlopen(req).read()
-def _get_yt_supp():
+def _get_yt_supp(uu):
supp_path = os.path.join(os.environ["YT_DEST"], "src",
"yt-supplemental")
# Now we check that the supplemental repository is checked out.
+ from mercurial import hg, ui, commands
if not os.path.isdir(supp_path):
print
print "*** The yt-supplemental repository is not checked ***"
@@ -904,7 +905,7 @@
print "*** to point to the installation location! ***"
print
sys.exit(1)
- supp_path = _get_yt_supp()
+ supp_path = _get_yt_supp(uu)
print
print "I have found the yt-supplemental repository at %s" % (supp_path)
print
@@ -1320,7 +1321,8 @@
import imp
from mercurial import hg, ui, commands, error, config
uri = "http://hub.yt-project.org/3rdparty/API/api.php"
- supp_path = _get_yt_supp()
+ uu = ui.ui()
+ supp_path = _get_yt_supp(uu)
try:
result = imp.find_module("cedit", [supp_path])
except ImportError:
@@ -1337,7 +1339,6 @@
print "Sorry, but I'm going to bail."
sys.exit(1)
hgbb = imp.load_module("hgbb", *result)
- uu = ui.ui()
try:
repo = hg.repository(uu, opts.repo)
conf = config.config()
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