zfit.param.
ComplexParameter
Bases: zfit.core.parameter.ComposedParameter
zfit.core.parameter.ComposedParameter
Create a complex parameter.
Note
Use the constructor class methods instead of the __init__() constructor:
ComplexParameter.from_cartesian()
ComplexParameter.from_polar()
add_cache_deps
Add dependencies that render the cache invalid if they change.
cache_deps (Union[ForwardRef, Iterable[ForwardRef]]) –
Union
ForwardRef
Iterable
allow_non_cachable (bool) – If True, allow cache_dependents to be non-cachables. If False, any cache_dependents that is not a ZfitCachable will raise an error.
bool
TypeError – if one of the cache_dependents is not a ZfitCachable _and_ allow_non_cachable if False.
dtype
The dtype of the object
DType
get_cache_deps
Return a set of all independent Parameter that this object depends on.
Parameter
only_floating (bool) – If True, only return floating Parameter
OrderedSet
get_dependencies
DEPRECATED FUNCTION
Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use get_params instead if you want to retrieve the independent parameters or get_cache_deps in case you need the numerical cache dependents (advanced).
get_params
Recursively collect parameters that this object depends on according to the filter criteria.
parameters that are fixed.
True: only return parameters that fulfil this criterion
only parameters that are not floating.
floating (Optional[bool]) – if a parameter is floating, e.g. if floating() returns True
Optional
floating()
is_yield (Optional[bool]) – if a parameter is a yield of the _current_ model. This won’t be applied recursively, but may include yields if they do also represent a parameter parametrizing the shape. So if the yield of the current model depends on other yields (or also non-yields), this will be included. If, however, just submodels depend on a yield (as their yield) and it is not correlated to the output of our model, they won’t be included.
extract_independent (Optional[bool]) – If the parameter is an independent parameter, i.e. if it is a ZfitIndependentParameter.
Set[ZfitParameter]
Set
ZfitParameter
register_cacher
Register a cacher that caches values produces by this instance; a dependent.
cacher (Union[ForwardRef, Iterable[ForwardRef]]) –
reset_cache_self
Clear the cache of self and all dependent cachers.
from_cartesian
Create a complex parameter from cartesian coordinates.
name – Name of the parameter.
real – Real part of the complex number.
imag – Imaginary part of the complex number.
from_polar
Create a complex parameter from polar coordinates.
real – Modulus (r) the complex number.
imag – Argument (phi) of the complex number.
conj
Returns a complex conjugated copy of the complex parameter.
real
Real part of the complex parameter.
imag
Imaginary part of the complex parameter.
mod
Modulus (r) of the complex parameter.
arg
Argument (phi) of the complex parameter.