Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add access to chi2 #7

Merged
merged 5 commits into from
Apr 10, 2024
Merged

Add access to chi2 #7

merged 5 commits into from
Apr 10, 2024

Conversation

afedynitch
Copy link
Collaborator

@afedynitch afedynitch commented Apr 10, 2024

This update exposes the chi2 function to the public interface.

from daemonflux import Flux

flu = Flux()
print(flu.chi2())
> 0.0
print(flu.chi2({'GSF_1': 1.0, 'GSF_5': -1.0}))
> 16.788997480515302

There are a few more minor modification when use_calibration = False. First, the case does not represent the error estimate from DDM + GSF because the gradients in daemonflux have more subdivisions in energy and because gradients are derived using an effective scheme and not the full error propagation (see Sec. II.D.2). The updated (uncalibrated) covariance matrix now resembles DDM+GSF estimate a bit better but they remain different. To disable this behavior and use uncorreleated parameters (for example in a fit), pass Flux(... , uncorrelated_hadr_errors=True, ...), which will replace the hadronic part of the covariance with a unit matrix.

@afedynitch afedynitch merged commit b4d9350 into main Apr 10, 2024
3 checks passed
@afedynitch afedynitch deleted the more_accessible_ch2 branch April 10, 2024 13:25
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