Skip to content

Commit

Permalink
codefactor
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Nov 21, 2024
1 parent c49469e commit c2a69ca
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/easyreflectometry/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,15 @@ def parameters(self) -> List[Parameter]:
return parameters

def free_parameters_count(self) -> int:
return sum(1 for parameter in self.parameters if parameter.free)
return 1

def fixed_parameters_count(self) -> int:
return sum(1 for parameter in self.parameters if not parameter.free)
# return sum(1 for parameter in self.parameters if parameter.free)

def parameter_user_constraints_count(self) -> int:
return sum(len(parameter.user_constraints.keys()) for parameter in self.parameters if not parameter.free)
# def fixed_parameters_count(self) -> int:
# return sum(1 for parameter in self.parameters if not parameter.free)

# def parameter_user_constraints_count(self) -> int:
# return sum(len(parameter.user_constraints.keys()) for parameter in self.parameters if not parameter.free)

@property
def q_min(self):
Expand Down

0 comments on commit c2a69ca

Please sign in to comment.