Skip to content

Commit

Permalink
Merge pull request nanograv#1730 from dlakaplan/fix1729
Browse files Browse the repository at this point in the history
  • Loading branch information
abhisrkckl authored Apr 2, 2024
2 parents 60d5fc0 + 6a39174 commit 080d65c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG-unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ the released changes.
- Emit warnings when `WaveX`/`DMWaveX` is used together with other representations of red/DM noise
- `get_observatory()` no longer overwrites `include_gps` and `include_bipm` of `Observatory` objects unless explicitly stated (BIPM and GPS clock corrections no longer incorrectly applied to BAT TOAs).
- Added back `spacecraft` as an alias for `stl_geo`
- Fix bug 1729 (missing f-string)
### Removed
15 changes: 8 additions & 7 deletions src/pint/models/timing_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"""


import abc
import copy
import inspect
Expand Down Expand Up @@ -1915,8 +1914,8 @@ def d_delay_d_param(self, toas, param, acc_delay=None):
delay_derivs = self.delay_deriv_funcs
if param not in list(delay_derivs.keys()):
raise AttributeError(
"Derivative function for '{param}' is not provided"
" or not registered; parameter '{param}' may not be fittable. "
f"Derivative function for '{param}' is not provided"
f" or not registered; parameter '{param}' may not be fittable. "
)
for df in delay_derivs[param]:
result += df(toas, param, acc_delay).to(
Expand Down Expand Up @@ -2898,7 +2897,7 @@ def __getitem__(self, name):
for cp in self.components.values():
if name in cp.params:
return getattr(cp, name)
raise KeyError("TimingModel does not have parameter {}".format(name))
raise KeyError(f"TimingModel does not have parameter {name}")

def __setitem__(self, name, value):
# FIXME: This could be the right way to add Parameters?
Expand Down Expand Up @@ -3121,9 +3120,11 @@ def get_derived_params(self, rms=None, ntoas=None, returndict=False):
tasc = ufloat(
# This is a time in MJD
self.TASC.quantity.mjd,
self.TASC.uncertainty.to(u.d).value
if self.TASC.uncertainty is not None
else 0,
(
self.TASC.uncertainty.to(u.d).value
if self.TASC.uncertainty is not None
else 0
),
)
s += "Conversion from ELL1 parameters:\n"
ecc = um.sqrt(eps1**2 + eps2**2)
Expand Down

0 comments on commit 080d65c

Please sign in to comment.