diff --git a/src/easyreflectometry/project.py b/src/easyreflectometry/project.py index d5df4133..65c9a433 100644 --- a/src/easyreflectometry/project.py +++ b/src/easyreflectometry/project.py @@ -453,9 +453,9 @@ def _timestamp_modification(self): def free_parameters_count(self) -> int: count = 0 - for parameter in self.parameters: - # if parameter: - count = count + 1 + for i in range(len(self.parameters)): + if self.parameters[i].free: + count = count + 1 return count # return sum(1 for parameter in self.parameters if parameter.free)