Skip to content

Commit 908a51c

Browse files
committed
update
1 parent 68472ef commit 908a51c

File tree

1 file changed

+3
-5
lines changed
  • Exec/science/xrb_spherical/analysis

1 file changed

+3
-5
lines changed

Exec/science/xrb_spherical/analysis/slice.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
def slice(fnames:List[str], fields:List[str],
1616
loc: str = "top", widthScale: float = 3.0,
17-
dr: Optional[float] = None,
17+
dr: Optional: float = 0.15,
1818
theta: Optional[float] = None) -> None:
1919
"""
2020
A slice plot of the datasets for different field parameters for Spherical2D geometry.
@@ -34,7 +34,7 @@ def slice(fnames:List[str], fields:List[str],
3434
widthScale: scaling for the domain width of the slice plot
3535
3636
dr: user defined distance between lower r to upper r boundary. Assumed in unit km.
37-
This is used to change the center of the SlicePlot
37+
This is used to change the center and width of the SlicePlot.
3838
3939
theta: user defined theta center of the slice plot
4040
"""
@@ -60,9 +60,7 @@ def slice(fnames:List[str], fields:List[str],
6060
# Some geometry properties
6161
rr = ds.domain_right_edge[0].in_units("km")
6262
rl = ds.domain_left_edge[0].in_units("km")
63-
dr = dr*km
64-
if dr is None:
65-
dr = rr - rl
63+
dr = dr * rr.units
6664
r_center = 0.5 * dr + rl
6765

6866
thetar = ds.domain_right_edge[1]

0 commit comments

Comments
 (0)