Skip to content

Conversation

@ericymiao
Copy link
Contributor

Relevant Issue(s)/PR(s)

Fixes a bug in rebin_data where input standard errors are combined linearly and square-rooted, treating them like variances rather than standard errors. Rebinned errors were affected by a factor of $1/\sqrt(\sigma)$

Provide an overview of the implemented solution or the fix and elaborate on the modifications.

Squared input standard errors before summing and propagating.
Added new test in test_utils.py
Changed docstring example to nontrivial example (where $\sigma \neq 1$). With the trivial example, the error cannot be detected as $\sigma = \sigma^{2} = 1$

ericymiao and others added 4 commits January 22, 2026 10:12
…ed by Lightcurve.rebin(). Changed docstring to use non-trivial example (where error != 1).

Added test and changelog file.
Updated test_binning_works_correctly to include biny, binyerr, and nsamples. Removed redundant tests for bin edges, bin values, and nsamples.
Updated y_err to have a value of 2 for testing purposes.
@matteobachetti matteobachetti added this pull request to the merge queue Feb 11, 2026
Merged via the queue into StingraySoftware:main with commit f5fde45 Feb 11, 2026
15 checks passed
@matteobachetti
Copy link
Member

Thanks @ericymiao !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants