[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Dec 19 10:40:22 PST 2013
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/6f17be4aa6c9/
Changeset: 6f17be4aa6c9
Branch: yt
User: atmyers
Date: 2013-12-19 19:31:22
Summary: convert cell wall positions to cgs right before writing them out in the RadMC3D exporter
Affected #: 1 file
diff -r d85c1291287fa5e92510950868fb582e562b18a3 -r 6f17be4aa6c961f78a82f70398579761dd0460b8 yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
--- a/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
+++ b/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
@@ -182,10 +182,14 @@
LE = self.domain_left_edge
RE = self.domain_right_edge
+ # Radmc3D wants the cell wall positions in cgs. Convert here:
+ LE_cgs = LE * self.pf.units['cm']
+ RE_cgs = RE * self.pf.units['cm']
+
# calculate cell wall positions
- xs = [str(x) for x in np.linspace(LE[0], RE[0], dims[0]+1)]
- ys = [str(y) for y in np.linspace(LE[1], RE[1], dims[1]+1)]
- zs = [str(z) for z in np.linspace(LE[2], RE[2], dims[2]+1)]
+ xs = [str(x) for x in np.linspace(LE_cgs[0], RE_cgs[0], dims[0]+1)]
+ ys = [str(y) for y in np.linspace(LE_cgs[1], RE_cgs[1], dims[1]+1)]
+ zs = [str(z) for z in np.linspace(LE_cgs[2], RE_cgs[2], dims[2]+1)]
# writer file header
grid_file = open(self.grid_filename, 'w')
https://bitbucket.org/yt_analysis/yt/commits/a077c40cc79a/
Changeset: a077c40cc79a
Branch: yt
User: MatthewTurk
Date: 2013-12-19 19:40:16
Summary: Merged in atmyers/yt-fixes (pull request #680)
convert cell wall positions to cgs right before writing them out in the RadMC3D exporter
Affected #: 1 file
diff -r 0983e7e92b9997b670b290d2a959f8c1fede5d69 -r a077c40cc79a2ef7850116fd6e85287e3a93312f yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
--- a/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
+++ b/yt/analysis_modules/radmc3d_export/RadMC3DInterface.py
@@ -182,10 +182,14 @@
LE = self.domain_left_edge
RE = self.domain_right_edge
+ # Radmc3D wants the cell wall positions in cgs. Convert here:
+ LE_cgs = LE * self.pf.units['cm']
+ RE_cgs = RE * self.pf.units['cm']
+
# calculate cell wall positions
- xs = [str(x) for x in np.linspace(LE[0], RE[0], dims[0]+1)]
- ys = [str(y) for y in np.linspace(LE[1], RE[1], dims[1]+1)]
- zs = [str(z) for z in np.linspace(LE[2], RE[2], dims[2]+1)]
+ xs = [str(x) for x in np.linspace(LE_cgs[0], RE_cgs[0], dims[0]+1)]
+ ys = [str(y) for y in np.linspace(LE_cgs[1], RE_cgs[1], dims[1]+1)]
+ zs = [str(z) for z in np.linspace(LE_cgs[2], RE_cgs[2], dims[2]+1)]
# writer file header
grid_file = open(self.grid_filename, 'w')
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