Skip to content

Transient background estimation#460

Open
Yong2Sheng wants to merge 4 commits intocositools:developfrom
Yong2Sheng:develop
Open

Transient background estimation#460
Yong2Sheng wants to merge 4 commits intocositools:developfrom
Yong2Sheng:develop

Conversation

@Yong2Sheng
Copy link
Contributor

This PR adds the functionality of estimating the background for transients. It averages the background windows on the two sides of the burst and scale it to the burst window.

Now it only supports scaling by burst duration. We can also fit the burst background level in a light curve using the background windows first. Then, use the fitted result to estimate the number of background counts in the burst interval. This scaling method can be supported after merging #239

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.81%. Comparing base (5fe8fd8) to head (30cec2d).

Files with missing lines Coverage Δ
cosipy/__init__.py 100.00% <100.00%> (ø)
...ground_estimation/TransientBackgroundEstimation.py 100.00% <100.00%> (ø)
cosipy/background_estimation/__init__.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Yong2Sheng
Copy link
Contributor Author

The new changes are:

  1. Move the scaling parameter from initializing TransientBackgroundEstimation to function make_background. So you do not need to define another class when you want to use a different scaling method.
  2. Add unit test for TransientBackgroundEstimation. It has 100% coverage now.

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.

1 participant