Skip to content

Incorrect creation of extended PDF #739

Description

@acampove

Bugs Please fill the below form if possible.

When creating an extended PDF, the normalization and observable range seem to be changed

Current Behaviour

I would expect only the yield to be attached to the PDF, instead the normalization range seems to also be changed

import zfit

obs = zfit.Space('x', limits=(-10, 10))
nrm = zfit.Space('x', limits=(  0, 10))

mu     = zfit.Parameter('mu', 0.0)
sigma  = zfit.Parameter('sigma', 1.0)
yield_ = zfit.Parameter('yield', 1000.0)
gauss  = zfit.pdf.Gauss(mu=mu, sigma=sigma, obs=obs, norm=nrm)

print(gauss.space)
print(gauss.norm )

gauss_extended = gauss.create_extended(yield_)

print(gauss_extended.space)
print(gauss_extended.norm )

Expected Behaviour

The PDF should be the same, except for the normalization

Context (Environment)

  • zfit version: 0.28
  • Python version: 3.13
  • Are you using conda, pipenv, etc? : micromamba
  • Operating System: Almalinux9
  • Tensorflow version: 2.20.0

Possible Solution/Implementation

set_yield is a workaround, but the behavior is wrong and will give the wrong results in the user code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions