[plotter] correct a small bug in overlay sink
This commit is contained in:
+3
-5
@@ -945,12 +945,11 @@ class Plotter(Aggregator, BaseProcessor):
|
|||||||
if sinks:
|
if sinks:
|
||||||
try:
|
try:
|
||||||
self.current_processor.sinks()
|
self.current_processor.sinks()
|
||||||
sinks = pd.DataFrame(
|
data = pd.DataFrame(
|
||||||
self.current_processor.get_value("/datasets/sinks")
|
self.current_processor.get_value("/datasets/sinks")
|
||||||
)
|
)
|
||||||
part_pos = sinks[["x", "y", "z"]].values
|
part_pos = data[["x", "y", "z"]].values
|
||||||
unit_length /= self.current_processor.lbox
|
unit_length /= self.current_processor.lbox
|
||||||
data = sinks
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
self.current_processor._log("No sinks particles", "WARNING")
|
self.current_processor._log("No sinks particles", "WARNING")
|
||||||
return
|
return
|
||||||
@@ -1000,8 +999,7 @@ class Plotter(Aggregator, BaseProcessor):
|
|||||||
# Size and color
|
# Size and color
|
||||||
if s is None and sinks:
|
if s is None and sinks:
|
||||||
s = data.msink[mask] / 5e3
|
s = data.msink[mask] / 5e3
|
||||||
|
elif s in data.keys():
|
||||||
if s in data.keys():
|
|
||||||
s = data[s][mask]
|
s = data[s][mask]
|
||||||
elif callable(s):
|
elif callable(s):
|
||||||
s = s(data)[mask]
|
s = s(data)[mask]
|
||||||
|
|||||||
Reference in New Issue
Block a user