From 321fd689f25ed40b1c1b55c8f1df62b789fa44b3 Mon Sep 17 00:00:00 2001 From: Zhi Date: Wed, 16 Oct 2024 12:06:40 -0400 Subject: [PATCH] update script --- Exec/science/xrb_spherical/analysis/slice.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Exec/science/xrb_spherical/analysis/slice.py b/Exec/science/xrb_spherical/analysis/slice.py index 9c7b3676c6..5ac7905f39 100755 --- a/Exec/science/xrb_spherical/analysis/slice.py +++ b/Exec/science/xrb_spherical/analysis/slice.py @@ -75,7 +75,7 @@ def slice(fname:str, field:str, if __name__ == "__main__": if len(sys.argv) < 3: - raise Exception("Please enter parameters in order of: fname field_name loc[optional]") + raise Exception("Please enter parameters in order of: fname field_name width_factor[optional] loc[optional]") fname = sys.argv[1] field = sys.argv[2] @@ -83,8 +83,8 @@ def slice(fname:str, field:str, width_factor = 3.0 if len(sys.argv) == 4: - loc = sys.argv[3] + width_factor = float(sys.argv[3]) elif len(sys.argv) > 4: - width_factor = float(sys.argv[4]) + loc = sys.argv[4] slice(fname, field, loc=loc, width_factor=width_factor)