Skip to content

Commit b675a9c

Browse files
authored
Merge pull request #1932 from abhisrkckl/fix-1931
`noise_resids` in `WidebandTOAResiduals`
2 parents 3ac3e23 + 1242d27 commit b675a9c

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CHANGELOG-unreleased.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ the released changes.
2020
- PLSWNoise: a Fourier basis stochastic solar wind model. See Hazboun et al. 2022 for details.
2121
- Explicitly specify the Tspan for power-law GP noise parameters (TN*TSPAN)
2222
- Parallel execution and work stealing in CI tests
23+
- Make `WidebandTOAResiduals.noise_resids` available as a `@property`
2324
### Fixed
2425
- `TimingModel.total_dm()` now returns zero when no DM component is present in the model.
2526
- Made `TimingModel.toa_covariance_matrix()` not explicitly dependent on `ScaleToaError`

src/pint/residuals.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,3 +1304,7 @@ def calc_wideband_resids(self) -> np.ndarray:
13041304
@property
13051305
def _combined_resids(self) -> np.ndarray:
13061306
return self.calc_wideband_resids()
1307+
1308+
@property
1309+
def noise_resids(self):
1310+
return self.toa.noise_resids

tests/test_wideband_dm_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,5 @@ def test_wideband_fit_dmjump_all(wb_model, wb_toas_all):
196196
fitter.fit_toas()
197197
print(fitter.print_summary())
198198
assert_allclose(fitter.model.DMJUMP1.value, -10, atol=1e-3)
199+
200+
assert fitter.resids.noise_resids is not None

0 commit comments

Comments
 (0)