From 8f315836b087969005541b307195d54e5c59e68b Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sun, 20 Oct 2019 10:42:45 +0200 Subject: [PATCH] easier to use if end time is included: --- python/damask/dadf5.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/damask/dadf5.py b/python/damask/dadf5.py index 0d62c9f8e..426b83ebb 100644 --- a/python/damask/dadf5.py +++ b/python/damask/dadf5.py @@ -103,7 +103,7 @@ class DADF5(): def __time_to_inc(self,start,end): selected = [] for i,time in enumerate(self.times): - if start <= time < end: + if start <= time <= end: selected.append(self.increments[i]) return selected @@ -117,7 +117,7 @@ class DADF5(): start : float start time (included) end : float - end time (exclcuded) + end time (included) """ self.__manage_visible(self.__time_to_inc(start,end),'increments','set') @@ -132,7 +132,7 @@ class DADF5(): start : float start time (included) end : float - end time (exclcuded) + end time (included) """ self.__manage_visible(self.__time_to_inc(start,end),'increments','add') @@ -147,7 +147,7 @@ class DADF5(): start : float start time (included) end : float - end time (exclcuded) + end time (included) """ self.__manage_visible(self.__time_to_inc(start,end),'increments','del')