Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZfitWrapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Heidelbach
ZfitWrapper
Commits
ff4e7f8f
Commit
ff4e7f8f
authored
8 months ago
by
Alexander Heidelbach
Browse files
Options
Downloads
Patches
Plain Diff
Remove manual model addition
parent
db0e6bd9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zfitwrapper/BaseModel.py
+0
-17
0 additions, 17 deletions
src/zfitwrapper/BaseModel.py
with
0 additions
and
17 deletions
src/zfitwrapper/BaseModel.py
+
0
−
17
View file @
ff4e7f8f
...
...
@@ -25,23 +25,6 @@ class BaseModel(ABC):
self
.
_model
=
None
# type: Optional[zfit.core.basepdf.BasePDF]
self
.
_ext_model
=
None
# type: Optional[Union[Union[zfit.core.basepdf.BasePDF,zfit.core.interfaces.ZfitPDF] , Fitparameter]]
def
__add__
(
self
,
model
:
"
BaseModel
"
)
->
"
BaseModel
"
:
assert
self
.
obs
==
model
.
obs
,
Exception
(
f
"
[BaseModel]: obs cannot be matched! Given:
\n
self.obs:
{
self
.
obs
}
\n
other.obs:
{
model
.
obs
}
"
)
zfit
.
settings
.
changed_warnings
.
new_sum
=
False
tmp
=
self
.
__class__
(
self
.
obs
)
tmp
.
_parameters
=
dict
(
self
.
parameters
,
**
model
.
parameters
)
if
self
.
model
is
not
None
and
model
.
model
is
not
None
:
tmp
.
_model
=
zfit
.
pdf
.
SumPDF
([
self
.
model
,
model
.
model
],
fracs
=
[
1
,
1
])
if
isinstance
(
self
.
ext_model
,
zfit
.
core
.
interfaces
.
ZfitPDF
)
and
isinstance
(
model
.
ext_model
,
zfit
.
core
.
interfaces
.
ZfitPDF
):
tmp
.
_ext_model
=
zfit
.
pdf
.
SumPDF
([
self
.
ext_model
,
model
.
ext_model
])
return
tmp
def
__str__
(
self
)
->
str
:
string
=
"
Model Wrapper
"
string
+=
f
"
\n
Parameters:
\n
{
self
.
parameters
}
"
...
...
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