[yt-svn] commit/yt: 3 new changesets
Bitbucket
commits-noreply at bitbucket.org
Sun Jul 8 16:53:12 PDT 2012
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/8b37ec845034/
changeset: 8b37ec845034
branch: yt
user: ngoldbaum
date: 2012-07-08 19:23:31
summary: Fixing support for 2D FLASH4 data.
affected #: 1 file
diff -r 2cdcd4e6512919d48d3d1292864f26be791601c0 -r 8b37ec84503419c42de3fda7d762137584590478 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -107,9 +107,15 @@
self.grid_left_edge[:,i] = DLE[i]
self.grid_right_edge[:,i] = DRE[i]
# We only go up to ND for 2D datasets
- self.grid_left_edge[:,:ND] = f["/bounding box"][:,:,0]
- self.grid_right_edge[:,:ND] = f["/bounding box"][:,:,1]
-
+ if (ND == 2 and f["/bounding box"][:,:,0].shape[1] == 2) :
+ #FLASH 2/3 2D data
+ self.grid_left_edge[:,:ND] = f["/bounding box"][:,:,0]
+ self.grid_right_edge[:,:ND] = f["/bounding box"][:,:,1]
+ else:
+ self.grid_left_edge[:,:] = f["/bounding box"][:,:,0]
+ self.grid_right_edge[:,:] = f["/bounding box"][:,:,1]
+
+
# Move this to the parameter file
try:
nxb = pf.parameters['nxb']
https://bitbucket.org/yt_analysis/yt/changeset/218c82fc2047/
changeset: 218c82fc2047
branch: yt
user: ngoldbaum
date: 2012-07-08 19:28:19
summary: This will work for 1D data too.
affected #: 1 file
diff -r 8b37ec84503419c42de3fda7d762137584590478 -r 218c82fc20479eb127eb94edbce087918b1972bb yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -107,7 +107,7 @@
self.grid_left_edge[:,i] = DLE[i]
self.grid_right_edge[:,i] = DRE[i]
# We only go up to ND for 2D datasets
- if (ND == 2 and f["/bounding box"][:,:,0].shape[1] == 2) :
+ if (f["/bounding box"][:,:,0].shape[1] == ND) :
#FLASH 2/3 2D data
self.grid_left_edge[:,:ND] = f["/bounding box"][:,:,0]
self.grid_right_edge[:,:ND] = f["/bounding box"][:,:,1]
https://bitbucket.org/yt_analysis/yt/changeset/7ceac034c343/
changeset: 7ceac034c343
branch: yt
user: MatthewTurk
date: 2012-07-09 01:53:11
summary: Merged in ngoldbaum/yt-ngoldbaum (pull request #188)
affected #: 1 file
diff -r dab58ec7b5e2a3eacdc6fa78b8022ec89fb0cbab -r 7ceac034c343b9a889ceff425781219fb33f7ca7 yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py
+++ b/yt/frontends/flash/data_structures.py
@@ -107,9 +107,15 @@
self.grid_left_edge[:,i] = DLE[i]
self.grid_right_edge[:,i] = DRE[i]
# We only go up to ND for 2D datasets
- self.grid_left_edge[:,:ND] = f["/bounding box"][:,:,0]
- self.grid_right_edge[:,:ND] = f["/bounding box"][:,:,1]
-
+ if (f["/bounding box"][:,:,0].shape[1] == ND) :
+ #FLASH 2/3 2D data
+ self.grid_left_edge[:,:ND] = f["/bounding box"][:,:,0]
+ self.grid_right_edge[:,:ND] = f["/bounding box"][:,:,1]
+ else:
+ self.grid_left_edge[:,:] = f["/bounding box"][:,:,0]
+ self.grid_right_edge[:,:] = f["/bounding box"][:,:,1]
+
+
# Move this to the parameter file
try:
nxb = pf.parameters['nxb']
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