Skip to content

Commit

Permalink
error for symmetric case strong_castle fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhxszo committed Dec 19, 2024
1 parent 09a3a87 commit d2cfef2
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/cdsaxs/simulations/strong_castle.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,19 @@ def check_initial_guess(self, params):
initial_guess (dict): dictionary containing the initial guess for the parameters
"""
langles = None
rangles = None

if self.initial_guess is None:
langles = params["langles"]
rangles = params["rangles"]
if "langles" in params:
langles = params["langles"]
if "rangles" in params:
rangles = params["rangles"]
else:
langles = self.initial_guess["langles"]["value"]
rangles = self.initial_guess["rangles"]["value"]
if "langles" in self.initial_guess:
langles = self.initial_guess["langles"]["value"]
if "rangles" in self.initial_guess:
rangles = self.initial_guess["rangles"]["value"]

#from the initial_guess dictionary get the number of langles
# Check the number of angles provided
Expand Down

0 comments on commit d2cfef2

Please sign in to comment.