Skip to content

Commit

Permalink
Only average over trains dimension in Scan.bin_by_steps()
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Dec 9, 2024
1 parent 65ca7c8 commit b1deb77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/extra/components/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def bin_by_steps(self, data, uncertainty_method="std"):
chunks = self.split_by_steps(data)

counts = np.array([len(c.coords['trainId']) for c in chunks])
signal = np.array([c.mean().item() for c in chunks])
signal = np.array([c.mean(dim='trainId').item() for c in chunks])
uncertainty = np.array([c.std().item() for c in chunks])
if uncertainty_method == "stderr":
uncertainty /= np.sqrt(counts)
Expand Down

0 comments on commit b1deb77

Please sign in to comment.