diff --git a/plotter.py b/plotter.py index ef28f74..7f27afc 100644 --- a/plotter.py +++ b/plotter.py @@ -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]