stingray icon indicating copy to clipboard operation
stingray copied to clipboard

Added `GeneralizedLorentz1D` and `SmoothBrokenPowerLaw` classes to `stingray.simulator.models`.

Open ankitkhushwaha opened this issue 10 months ago • 8 comments

TODO:

  • [x] added the GeneralizedLorentz1D and SmoothBrokenPowerLaw, to stingray.simulator.models.
  • [x] added test for new classes
  • [x] added changelog

i have confirmed that jacobian for function with respect to each parameter is correct using sympy

@matteobachetti

ankitkhushwaha avatar Feb 24 '25 07:02 ankitkhushwaha

I think changes are ready for review. @matteobachetti

ankitkhushwaha avatar Feb 25 '25 12:02 ankitkhushwaha

@ankitkhushwaha thanks for your PR. However, I haven't noticed any tests failing, there are no issues open about it as far as I can tell. Could you be clearer about what is failing, and what your changes do?

matteobachetti avatar Feb 25 '25 18:02 matteobachetti

@matteobachetti in the first commit. Function GeneralizedLorentz1D, SmoothBrokenPowerLaw was returning the jacobian and function output as tuple. that's why some test are falling.

these test are fixed now.

TODO: I have added the Jacobian functionality for GeneralizedLorentz1D, SmoothBrokenPowerLaw which will compute the derivative of their function with respective to each parameter.

ankitkhushwaha avatar Feb 25 '25 19:02 ankitkhushwaha

Codecov Report

Attention: Patch coverage is 92.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 82.70%. Comparing base (c432bd2) to head (a1715ea).

Files with missing lines Patch % Lines
stingray/simulator/models.py 92.22% 7 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (c432bd2) and HEAD (a1715ea). Click for more details.

HEAD has 10 uploads less than BASE
Flag BASE (c432bd2) HEAD (a1715ea)
16 6
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #889       +/-   ##
===========================================
- Coverage   96.04%   82.70%   -13.34%     
===========================================
  Files          48       48               
  Lines        9789     9871       +82     
===========================================
- Hits         9402     8164     -1238     
- Misses        387     1707     +1320     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Mar 04 '25 17:03 codecov[bot]

Hey @matteobachetti, mostly this pr is ready to be reviewed, could you review this. more tests needs to added that i will add in upcoming commits.

ankitkhushwaha avatar Mar 05 '25 18:03 ankitkhushwaha

Hey @matteobachetti , all TODO are completed. you can take a look at it. Thanks!

ankitkhushwaha avatar Apr 11 '25 17:04 ankitkhushwaha

@ankitkhushwaha just to clarify: have you suppressed the use of the derivative in all model fits? A lot of lines seem not to be covered by tests

matteobachetti avatar Jun 25 '25 09:06 matteobachetti

will surely check it if lines are being tested or not.

ankitkhushwaha avatar Jul 17 '25 11:07 ankitkhushwaha