Skip to content

Commit

Permalink
mu and sg parameter will always float
Browse files Browse the repository at this point in the history
and will have _flt suffix
  • Loading branch information
Angel Campoverde committed Feb 5, 2025
1 parent f0cf8a0 commit 7f9ec51
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/dmu/stats/model_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,18 @@ def __init__(self, obs : zobs, l_pdf : list[str], l_shared : list[str]):

self._d_par : dict[str,zpar] = {}
#-----------------------------------------
def _fltname_from_name(self, name : str) -> str:
if name in ['mu', 'sg']:
return f'{name}_flt'

return name
#-----------------------------------------
def _get_name(self, name : str, suffix : str) -> str:
for can_be_shared in self._l_can_be_shared:
if name.startswith(f'{can_be_shared}_') and can_be_shared in self._l_shr:
return can_be_shared
return self._fltname_from_name(can_be_shared)

return f'{name}{suffix}'
return self._fltname_from_name(f'{name}{suffix}')
#-----------------------------------------
def _get_parameter(self,
name : str,
Expand Down

0 comments on commit 7f9ec51

Please sign in to comment.