[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:
|
||||
try:
|
||||
self.current_processor.sinks()
|
||||
sinks = pd.DataFrame(
|
||||
data = pd.DataFrame(
|
||||
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
|
||||
data = sinks
|
||||
except KeyError:
|
||||
self.current_processor._log("No sinks particles", "WARNING")
|
||||
return
|
||||
@@ -1000,8 +999,7 @@ class Plotter(Aggregator, BaseProcessor):
|
||||
# Size and color
|
||||
if s is None and sinks:
|
||||
s = data.msink[mask] / 5e3
|
||||
|
||||
if s in data.keys():
|
||||
elif s in data.keys():
|
||||
s = data[s][mask]
|
||||
elif callable(s):
|
||||
s = s(data)[mask]
|
||||
|
||||
Reference in New Issue
Block a user