Skip to content

Commit

Permalink
Removed extra code and replaced code lost during debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobrepucci committed Jul 17, 2024
1 parent 040b4bc commit 68cd2e7
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/multivelo/dynamical_chrom_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -1138,9 +1138,9 @@ def __init__(self, c, u, s,
u = u.A
if sparse.issparse(s):
s = s.A
self.c_all = np.ravel(np.array(c))
self.u_all = np.ravel(np.array(u))
self.s_all = np.ravel(np.array(s))
self.c_all = np.ravel(np.array(c, dtype=np.float64))
self.u_all = np.ravel(np.array(u, dtype=np.float64))
self.s_all = np.ravel(np.array(s, dtype=np.float64))

# adjust offset
self.offset_c, self.offset_u, self.offset_s = np.min(self.c_all), \
Expand Down Expand Up @@ -2605,10 +2605,6 @@ def _variables(self, x):
t3 = x
r4 = self.rates

elif len(x) == 4:
r4 = x
t3 = self.params[:3]

elif len(x) == 7:
t3 = x[:3]
r4 = x[3:]
Expand All @@ -2623,6 +2619,12 @@ def _variables(self, x):
else:
return

# clip to meaningful values
if self.fitting_flag_ and not self.adam:
scale_cc = np.clip(scale_cc,
np.max([0.5*self.scale_cc, 0.25]),
np.min([2*self.scale_cc, 4]))

if not self.known_pars:
if self.fit_decoupling:
t3 = np.clip(t3, 0.1, None)
Expand Down

0 comments on commit 68cd2e7

Please sign in to comment.