Skip to content

Commit

Permalink
fix params typo
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler-a-cox committed Feb 1, 2024
1 parent 08e791a commit b0e71db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hera_cal/nucal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ def _nucal_post_redcal(
Returns:
-------
params : dictionary
model_parameters : dictionary
Optimized parameters
metadata : dictionary
Dictionary containing metadata from the optimization. Contains the number of iterations ("niter") and the loss history
Expand All @@ -1209,7 +1209,7 @@ def _nucal_post_redcal(
)
# Update optimizer state and parameters
updates, opt_state = optimizer.update(gradient, opt_state, model_parameters)
params = optax.apply_updates(model_parameters, updates)
model_parameters = optax.apply_updates(model_parameters, updates)

if minor_cycle_maxiter > 0:
minor_cycle_losses = []
Expand Down Expand Up @@ -1243,7 +1243,7 @@ def _nucal_post_redcal(
# Save the metadata in dictionary
metadata = {"niter": step + 1, "loss_history": np.array(losses)}

return params, metadata
return model_parameters, metadata

class SpectrallyRedundantCalibrator:
"""
Expand Down

0 comments on commit b0e71db

Please sign in to comment.