jiangyi15 / tf-pwa

Partial Wave Analysis using TensorFlow.
MIT License
27 stars 14 forks source link

Force legend #135

Closed jiangyi15 closed 11 months ago

jiangyi15 commented 11 months ago

Allow plot user defined partial waves

amp = config.get_amplitude()

def pwf(data, **kwargs):
    with amp.temp_used_res(["R1"]):
        w1 = amp(data)  
    with amp.temp_used_res(["R2"]):
        w2 = amp(data)
    with amp.temp_used_res(["R1", "R2"]):
        w12 = amp(data)
    return [w12, w1, w2, w12 - w1 - w2]

config.plot_partial_wave(partial_waves_function=pwf, labels=["data", "background", "total fit", "R1 + R2",  "R1", "R2", "R1 R2 interference"])
codecov[bot] commented 11 months ago

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (2b4f0f3) 77.55% compared to head (64760cd) 77.57%.

Files Patch % Lines
tf_pwa/config_loader/plot.py 85.71% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #135 +/- ## ========================================== + Coverage 77.55% 77.57% +0.01% ========================================== Files 114 114 Lines 16993 17005 +12 Branches 3183 3189 +6 ========================================== + Hits 13179 13191 +12 Misses 3102 3102 Partials 712 712 ``` | [Flag](https://app.codecov.io/gh/jiangyi15/tf-pwa/pull/135/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jiang+Yi+%28%E8%92%8B%E8%89%BA%29) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/jiangyi15/tf-pwa/pull/135/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jiang+Yi+%28%E8%92%8B%E8%89%BA%29) | `77.57% <88.88%> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jiang+Yi+%28%E8%92%8B%E8%89%BA%29#carryforward-flags-in-the-pull-request-comment) to find out more.

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