Skip to content

Commit

Permalink
Fixed numerical bug in mass/rho conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Nicodemus committed Jan 3, 2025
1 parent 8e6aa0a commit f43b68b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cajal/ugw/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def rho_of(gw_cost: float, mass_kept: float):
this formula is written for the case where the cells and the GW transport plan have
unit mass. This function is the inverse of mass_lower_bound.
"""
return -gw_cost / log(mass_kept)
return -gw_cost / (4*log(mass_kept))


_rho1_docstring = """:param rho1: The first marginal penalty coefficient, controls how much the
Expand Down

0 comments on commit f43b68b

Please sign in to comment.