Skip to content

Commit 24679e8

Browse files
committed
parameterScale* + lin
1 parent a328559 commit 24679e8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

petab/v2/petab1to2.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,15 +416,12 @@ def update_prior(row):
416416
if pd.isna(pscale):
417417
pscale = v1.C.LIN
418418

419-
if (
420-
pscale == v1.C.LIN
421-
or prior_type not in v1.C.PARAMETER_SCALE_PRIOR_TYPES
422-
):
419+
if prior_type not in v1.C.PARAMETER_SCALE_PRIOR_TYPES:
423420
return prior_type
424421

425-
new_prior_type = (
426-
f"{pscale}-{prior_type.removeprefix('parameterScale').lower()}"
427-
)
422+
new_prior_type = prior_type.removeprefix("parameterScale").lower()
423+
if pscale != v1.C.LIN:
424+
new_prior_type = f"{pscale}-{new_prior_type}"
428425

429426
if new_prior_type not in v2.C.PRIOR_DISTRIBUTIONS:
430427
raise NotImplementedError(

0 commit comments

Comments
 (0)