Closed matteobachetti closed 3 months ago
Attention: Patch coverage is 98.67550%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 94.52%. Comparing base (
de9400a
) to head (baa5060
).:exclamation: Current head baa5060 differs from pull request most recent head 370bd9c. Consider uploading reports for the commit 370bd9c to get more accurate results
Files | Patch % | Lines |
---|---|---|
stingray/deadtime/model.py | 98.40% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hello @matteobachetti! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
stingray/crossspectrum.py
:Line 1680:101: E501 line too long (103 > 100 characters) Line 1681:101: E501 line too long (103 > 100 characters)
The dead time model had a few issues:
the sum of many values below computer precision which produced large errors in the final result -> I set a limit for new additions so that numbers get only added when larger than
10**(-np.finfo(float).precision)
check_A
andcheck_B
had useless axes in some conditions due to the large dynamic range of values -> I changed them to "symlog" to allow for negative numbers with small powers of ten.Also in this PR:
Added the possibility of calculating
B
andA
for ranges of the parameterk
Added a new functions that calculates the deadtime-distorted PDS with more user-friendly parameters (e.g. providing the frequency array, starting from detected (not incident) count rate, using background to rescale, etc.)![new_deadtime_model](https://github.com/StingraySoftware/stingray/assets/7190189/4d5198df-ef91-49fa-85b9-ddcde227f7ff)
Added a method to Crossspectrum and derivatives to directly correct the powers, assuming a constant dead time![image](https://github.com/StingraySoftware/stingray/assets/7190189/3cd649fa-3bbb-46d4-9e63-8cfa4f8084b9)