Skip to content

Commit

Permalink
fixed bug in derived quantities
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkaplantest committed Dec 8, 2023
1 parent 4d07835 commit 7896a55
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ the released changes.
- Documentation: Added `convert_parfile` to list of command-line tools in RTD
### Fixed
- Fixed runtime data README
- Fixed `derived_params` when OMDOT has 0 uncertainty
### Removed
13 changes: 11 additions & 2 deletions src/pint/fitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@
import pint
import pint.utils
import pint.derived_quantities
from pint.models.parameter import AngleParameter, boolParameter, strParameter
from pint.models.parameter import (
AngleParameter,
boolParameter,
strParameter,
funcParameter,
)
from pint.pint_matrix import (
CorrelationMatrix,
CovarianceMatrix,
Expand Down Expand Up @@ -624,7 +629,11 @@ def get_derived_params(self):
and self.model.OMDOT.value != 0.0
):
omdot = self.model.OMDOT.quantity
omdot_err = self.model.OMDOT.uncertainty
omdot_err = (

Check warning on line 632 in src/pint/fitter.py

View check run for this annotation

Codecov / codecov/patch

src/pint/fitter.py#L632

Added line #L632 was not covered by tests
self.model.OMDOT.uncertainty
if self.model.OMDOT.uncertainty is not None
else 0 * self.model.OMDOT.quantity.unit
)
ecc = (
ecc.n * u.dimensionless_unscaled
if ell1
Expand Down

0 comments on commit 7896a55

Please sign in to comment.