Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PeakOTron
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
UHHDetLab
SiPM
PeakOTron
Commits
badf3a96
Commit
badf3a96
authored
2 years ago
by
Jack Christopher Hutchinson Rolph
Browse files
Options
Downloads
Patches
Plain Diff
Update PeakOTron.py
parent
2c9b1752
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PeakOTron.py
+0
-42
0 additions, 42 deletions
PeakOTron.py
with
0 additions
and
42 deletions
PeakOTron.py
+
0
−
42
View file @
badf3a96
...
...
@@ -352,48 +352,6 @@ class PeakOTron:
########################################################################################################
# def __CalcChi2(self, x, y, y_hat, y_err):
# chi2 = np.nansum(((y_hat - y)/y_err)**2)
# ndof = len(x) - 10
# return chi2, ndof
# def GetChi2(self, prefit=False):
# if(self._m_DRM is None):
# raise Exception ("Fit has not yet been performed. Please first perform a fit.")
# else:
# x_all = self._hist_data["bin_numbers"]
# y_all = self._hist_data["counts"]
# y_err_all = self._hist_data["counts_error"]
# if(self._fit_kwargs["truncate_nsigma0_do"] is not None):
# lim_nsigma0 = self._prefit_values_bin["Q_0"] - self._fit_kwargs["truncate_nsigma0_do"]*self._prefit_values_bin["sigma_0"]
# cond_sel_nsigma0 = (self._hist_data["bin_numbers"]>lim_nsigma0)
# else:
# cond_sel_nsigma0 = np.full(len(self._hist_data["bin_numbers"]), True).astype(bool)
# x = x_all[cond_sel_nsigma0]
# y = y_all[cond_sel_nsigma0]
# y_err = y_err_all[cond_sel_nsigma0]
# y_hat = self.GetModel(x, prefit=prefit, bin_units=True)
# y_hat_err = np.sqrt(y_hat)
# plt.figure()
# plt.plot(x, (y-y_hat)/y_err)
# plt.show()
# chi2, ndof = self.__CalcChi2(x, y, y_hat, y_err)
# return chi2, ndof
def
GetChi2
(
self
,
pars
=
None
,
prefit
=
False
,
full
=
False
,
n_sigma_lims
=
[
None
,
None
]):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment