diff --git a/Inst_eddies/Analysis/distribution_function.py b/Inst_eddies/Analysis/distribution_function.py index 3908e1c074260a11b9b45e6a9ca1dafa476279d6..e571fd4bb5893d743df5409005a0bac7239e6106 100755 --- a/Inst_eddies/Analysis/distribution_function.py +++ b/Inst_eddies/Analysis/distribution_function.py @@ -56,8 +56,9 @@ def read(dirname): amp_speed.append(rec_extr.ssh - rec_max.ssh) return {"speed": np.array(speed), "rad_outer": np.array(rad_outer), - "rad_speed": np.array(rad_speed), "amp_outer": np.array(amp_outer), - "amp_speed": np.array(amp_speed)} + "rad_speed": np.array(rad_speed), + "amp_outer": np.abs(np.array(amp_outer)), + "amp_speed": np.abs(np.array(amp_speed))} def fig_hist(xlabel, x, label): """Complete figure with histogram. x and label can also be sequences.""" @@ -111,21 +112,13 @@ def plot_all(dict_list, label = None): fig_hist("amplitude of outermost contour, in m", [d["amp_outer"] for d in dict_list], label) - fig_distr_funct("amplitude of outermost contour, anticyclones, in m", - [d["amp_outer"][d["amp_outer"] >= 0] for d in dict_list], - label) - fig_distr_funct("amplitude of outermost contour, cyclones, in m", - [- d["amp_outer"][d["amp_outer"] < 0] for d in dict_list], - label) + fig_distr_funct("amplitude of outermost contour, in m", + [d["amp_outer"] for d in dict_list], label) fig_hist("amplitude of max-speed contour, in m", [d["amp_speed"] for d in dict_list], label) - fig_distr_funct("amplitude of max-speed contour, anticyclones, in m", - [d["amp_speed"][d["amp_speed"] >= 0] for d in dict_list], - label) - fig_distr_funct("amplitude of max-speed contour, cyclones, in m", - [- d["amp_speed"][d["amp_speed"] < 0] for d in dict_list], - label) + fig_distr_funct("amplitude of max-speed contour, in m", + [d["amp_speed"] for d in dict_list], label) if __name__ == "__main__": import sys