[yt-svn] commit/yt: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Thu Oct 4 10:46:04 PDT 2012


2 new commits in yt:


https://bitbucket.org/yt_analysis/yt/changeset/7c7e9a68c234/
changeset:   7c7e9a68c234
branch:      yt
user:        MatthewTurk
date:        2012-10-04 15:59:16
summary:     Adding projected units for density fields in FLASH
affected #:  1 file

diff -r cc994a53e0f26352b3459657040bfb70b17d8130 -r 7c7e9a68c2347b9d6f53057d7ae3511e03727d1a yt/frontends/flash/fields.py
--- a/yt/frontends/flash/fields.py
+++ b/yt/frontends/flash/fields.py
@@ -98,7 +98,9 @@
     if fn1.endswith("_Fraction"):
         add_field(fn1.split("_")[0] + "_Density",
                   function=_get_density(fn1), take_log=True,
-                  display_name="%s\/Density" % fn1.split("_")[0])
+                  display_name="%s\/Density" % fn1.split("_")[0],
+                  projected_units = r"\rm{g}/\rm{cm}^2",
+                  )
 
 def _get_convert(fname):
     def _conv(data):
@@ -107,7 +109,8 @@
 
 add_flash_field("dens", function=NullFunc, take_log=True,
                 convert_function=_get_convert("dens"),
-                units=r"\rm{g}/\rm{cm}^3")
+                units=r"\rm{g}/\rm{cm}^3",
+                projected_units = r"\rm{g}/\rm{cm}^2"),
 add_flash_field("velx", function=NullFunc, take_log=False,
                 convert_function=_get_convert("velx"),
                 units=r"\rm{cm}/\rm{s}")
@@ -204,6 +207,7 @@
     add_field(f, TranslationFunc(v),
               take_log=KnownFLASHFields[v].take_log,
               units = ff._units, display_name=dname,
+              projected_units = ff._projected_units,
               particle_type = pfield)
 
 def _convertParticleMassMsun(data):



https://bitbucket.org/yt_analysis/yt/changeset/029908bc9f69/
changeset:   029908bc9f69
branch:      yt
user:        MatthewTurk
date:        2012-10-04 19:44:13
summary:     Adding units to _Density fields.
affected #:  1 file

diff -r 7c7e9a68c2347b9d6f53057d7ae3511e03727d1a -r 029908bc9f69bf71304b850a6abbfa97408f7a83 yt/frontends/flash/fields.py
--- a/yt/frontends/flash/fields.py
+++ b/yt/frontends/flash/fields.py
@@ -99,6 +99,7 @@
         add_field(fn1.split("_")[0] + "_Density",
                   function=_get_density(fn1), take_log=True,
                   display_name="%s\/Density" % fn1.split("_")[0],
+                  units = r"\rm{g}/\rm{cm}^3",
                   projected_units = r"\rm{g}/\rm{cm}^2",
                   )

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