Commits

Nathan Goldbaum  committed d77c88a Merge

Merging,

  • Participants
  • Parent commits 01f4618, b22a96f

Comments (0)

Files changed (4)

File yt/frontends/athena/data_structures.py

             dimensionality = 2
         if grid['dimensions'][1] == 1 :
             dimensionality = 1
+        if dimensionality <= 2 : self.domain_dimensions[2] = 1.
+        if dimensionality == 1 : self.domain_dimensions[1] = 1.
         self.dimensionality = dimensionality
         self.current_time = grid["time"]
         self.unique_identifier = self._handle.__hash__()

File yt/frontends/flash/data_structures.py

             nblockx = self.parameters["iprocs"]
             nblocky = self.parameters["jprocs"]
             nblockz = self.parameters["kprocs"]
-                        
+
+        # In case the user wasn't careful
+        if dimensionality <= 2 : nblockz = 1
+        if dimensionality == 1 : nblocky = 1
+
         self.dimensionality = dimensionality
         self.domain_dimensions = \
             np.array([nblockx*nxb,nblocky*nyb,nblockz*nzb])

File yt/frontends/flash/fields.py

 def GetMagRescalingFactor(pf):
     if pf['unitsystem'].lower() == "cgs":
          factor = 1
-    if pf['unitsystem'].lower() == "si":
+    elif pf['unitsystem'].lower() == "si":
          factor = np.sqrt(4*np.pi/1e7)
-    if pf['unitsystem'].lower() == "none":
+    elif pf['unitsystem'].lower() == "none":
          factor = np.sqrt(4*np.pi)
     else:
         raise RuntimeError("Runtime parameter unitsystem with "

File yt/utilities/answer_testing/framework.py

 
     def options(self, parser, env=os.environ):
         super(AnswerTesting, self).options(parser, env=env)
-        parser.add_option("--answer-compare", dest="compare_name",
+        parser.add_option("--answer-compare-name", dest="compare_name", metavar='str',
             default=_latest, help="The name against which we will compare")
         parser.add_option("--answer-big-data", dest="big_data",
             default=False, help="Should we run against big data, too?",
             action="store_true")
-        parser.add_option("--answer-name", dest="this_name",
+        parser.add_option("--answer-store-name", dest="this_name", metavar='str',
             default=None,
             help="The name we'll call this set of tests")
         parser.add_option("--answer-store", dest="store_results",
             options.compare_name = None
         elif options.compare_name == "latest":
             options.compare_name = _latest
-
+        if options.store_results:
+            options.compare_name = None
+            
         # Local/Cloud storage 
         if options.store_local_results:
             storage_class = AnswerTestLocalStorage
 
 def data_dir_load(pf_fn):
     path = ytcfg.get("yt", "test_data_dir")
+    if isinstance(pf_fn, StaticOutput): return pf_fn
     if not os.path.isdir(path):
         return False
-    if isinstance(pf_fn, StaticOutput): return pf_fn
     with temp_cwd(path):
         pf = load(pf_fn)
         pf.h