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

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Dec 1 07:38:51 PST 2016


6 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/4e348588bd6d/
Changeset:   4e348588bd6d
Branch:      yt
User:        c... at pingouin-2.local
Date:        2016-11-29 16:32:38+00:00
Summary:     add field units to CLI
Affected #:  1 file

diff -r 0bfebdb21e22a03f91a11dff8d455ee17e885e92 -r 4e348588bd6d66c2aa018e743e826ff5a0496f0d yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -272,7 +272,7 @@
     unit    = dict(short="-u", longname="--unit",
                    action="store", type=str,
                    dest="unit", default='1',
-                   help="Desired units"),
+                   help="Desired axes units"),
     center  = dict(short="-c", longname="--center",
                    action="store", type=float,
                    dest="center", default=None,
@@ -908,7 +908,11 @@
 class YTPlotCmd(YTCommand):
     args = ("width", "unit", "bn", "proj", "center", "zlim", "axis", "field",
             "weight", "skip", "cmap", "output", "grids", "time", "ds", "max",
-            "log", "linear")
+            "log", "linear",
+            dict(short="-fu", longname="--field_unit",
+                   action="store", type=str,
+                   dest="field_unit", default='1',
+                   help="Desired field units"))
 
     name = "plot"
 
@@ -960,6 +964,9 @@
                 time = ds.current_time.in_units("yr")
                 plt.annotate_text((0.2,0.8), 't = %5.2e yr'%time)
 
+            if args.field_unit:
+                plt.set_units(args.field, args.field_unit)
+
             plt.set_cmap(args.field, args.cmap)
             plt.set_log(args.field, args.takelog)
             if args.zlim:


https://bitbucket.org/yt_analysis/yt/commits/e6e649f8c6cc/
Changeset:   e6e649f8c6cc
Branch:      yt
User:        c... at pingouin-2.local
Date:        2016-11-29 16:32:57+00:00
Summary:     update to annotate_timestamp
Affected #:  1 file

diff -r 4e348588bd6d66c2aa018e743e826ff5a0496f0d -r e6e649f8c6cc77927aad5e4200819770d92d453a yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -961,8 +961,7 @@
             if args.grids:
                 plt.annotate_grids()
             if args.time:
-                time = ds.current_time.in_units("yr")
-                plt.annotate_text((0.2,0.8), 't = %5.2e yr'%time)
+                plt.annotate_timestamp(0.2, 0.8)
 
             if args.field_unit:
                 plt.set_units(args.field, args.field_unit)


https://bitbucket.org/yt_analysis/yt/commits/8fcffa5665dc/
Changeset:   8fcffa5665dc
Branch:      yt
User:        c... at pingouin-2.local
Date:        2016-11-29 16:36:23+00:00
Summary:     use field-unit instead of field_unit for CLI
Affected #:  1 file

diff -r e6e649f8c6cc77927aad5e4200819770d92d453a -r 8fcffa5665dc67d79efb15f0822d8219b46324c8 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -909,10 +909,10 @@
     args = ("width", "unit", "bn", "proj", "center", "zlim", "axis", "field",
             "weight", "skip", "cmap", "output", "grids", "time", "ds", "max",
             "log", "linear",
-            dict(short="-fu", longname="--field_unit",
-                   action="store", type=str,
-                   dest="field_unit", default='1',
-                   help="Desired field units"))
+            dict(short="-fu", longname="--field-unit",
+                 action="store", type=str,
+                 dest="field_unit", default='1',
+                 help="Desired field units"))
 
     name = "plot"
 


https://bitbucket.org/yt_analysis/yt/commits/a101432b36c6/
Changeset:   a101432b36c6
Branch:      yt
User:        c... at pingouin-2.local
Date:        2016-11-29 16:38:36+00:00
Summary:     let yt decide where to put timestamp
Affected #:  1 file

diff -r 8fcffa5665dc67d79efb15f0822d8219b46324c8 -r a101432b36c621937edc5acbbde6771e4a314367 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -961,10 +961,10 @@
             if args.grids:
                 plt.annotate_grids()
             if args.time:
-                plt.annotate_timestamp(0.2, 0.8)
+                plt.annotate_timestamp()
 
             if args.field_unit:
-                plt.set_units(args.field, args.field_unit)
+                plt.set_unit(args.field, args.field_unit)
 
             plt.set_cmap(args.field, args.cmap)
             plt.set_log(args.field, args.takelog)


https://bitbucket.org/yt_analysis/yt/commits/f0e3737e931b/
Changeset:   f0e3737e931b
Branch:      yt
User:        c... at pingouin-2.local
Date:        2016-11-29 19:10:35+00:00
Summary:     default field unit to None

prevent field unit to be set to 1 if no value is given
Affected #:  1 file

diff -r a101432b36c621937edc5acbbde6771e4a314367 -r f0e3737e931b639bb75836a44ed42bb1477ab3e7 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -911,7 +911,7 @@
             "log", "linear",
             dict(short="-fu", longname="--field-unit",
                  action="store", type=str,
-                 dest="field_unit", default='1',
+                 dest="field_unit", default=None,
                  help="Desired field units"))
 
     name = "plot"


https://bitbucket.org/yt_analysis/yt/commits/bb7f23a27456/
Changeset:   bb7f23a27456
Branch:      yt
User:        ngoldbaum
Date:        2016-12-01 15:38:23+00:00
Summary:     Merged in cphyc/yt (pull request #2447)

add CLI option for field unit + update CLI time option
Affected #:  1 file

diff -r a2ecef680eba44be8240df896cb4b178046d9c58 -r bb7f23a27456bed189cbd20b0b5cdc968a2f31e0 yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -272,7 +272,7 @@
     unit    = dict(short="-u", longname="--unit",
                    action="store", type=str,
                    dest="unit", default='1',
-                   help="Desired units"),
+                   help="Desired axes units"),
     center  = dict(short="-c", longname="--center",
                    action="store", type=float,
                    dest="center", default=None,
@@ -908,7 +908,11 @@
 class YTPlotCmd(YTCommand):
     args = ("width", "unit", "bn", "proj", "center", "zlim", "axis", "field",
             "weight", "skip", "cmap", "output", "grids", "time", "ds", "max",
-            "log", "linear")
+            "log", "linear",
+            dict(short="-fu", longname="--field-unit",
+                 action="store", type=str,
+                 dest="field_unit", default=None,
+                 help="Desired field units"))
 
     name = "plot"
 
@@ -957,8 +961,10 @@
             if args.grids:
                 plt.annotate_grids()
             if args.time:
-                time = ds.current_time.in_units("yr")
-                plt.annotate_text((0.2,0.8), 't = %5.2e yr'%time)
+                plt.annotate_timestamp()
+
+            if args.field_unit:
+                plt.set_unit(args.field, args.field_unit)
 
             plt.set_cmap(args.field, args.cmap)
             plt.set_log(args.field, args.takelog)

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