Skip to content

Commit

Permalink
--
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisrkckl committed Jan 22, 2025
1 parent 925b2ac commit 9438a7e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pint/fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2019,8 +2019,10 @@ def fit_toas(self, maxiter=1, threshold=None, debug=False):
fitp = self.model.get_params_dict("free", "quantity")
fitpv = self.model.get_params_dict("free", "num")
fitperrs = self.model.get_params_dict("free", "uncertainty")

# Define the linear system
M, params, units = self.get_designmatrix()
M, params, units = self.model.designmatrix(self.toas)

# Get residuals and TOA uncertainties in seconds
self.update_resids()
residuals = self.resids.time_resids.to(u.s).value
Expand Down Expand Up @@ -2186,7 +2188,7 @@ def fit_toas(self, maxiter=1, threshold=0, full_cov=False, debug=False):

# Define the linear system
# normalize the design matrix
M, params, units = self.get_designmatrix()
M, params, units = self.model.designmatrix(self.toas)
# M /= norm

ntmpar = len(fitp)
Expand Down Expand Up @@ -2544,7 +2546,7 @@ def fit_toas(
residuals = self.resids.calc_combined_resids()

# get any noise design matrices and weight vectors
M, params, units, units_d = self.get_designmatrix(full=(not full_cov))
M, params, units, units_d = self.model.full_designmatrix()

# normalize the design matrix
M, norm = normalize_designmatrix(M, params)
Expand All @@ -2561,7 +2563,7 @@ def fit_toas(
phi = self.model.full_basis_weight(self.toas)
phiinv_norm = 1 / phi / norm**2

Nvec = self.scaled_all_sigma() ** 2
Nvec = self.model.scaled_wideband_uncertainty(self.toas) ** 2
cinv = 1 / Nvec

mtcm = np.dot(M.T, cinv[:, None] * M)
Expand Down

0 comments on commit 9438a7e

Please sign in to comment.