Repository: scikit-hep/pyhf

Issue:
rename paramsets.fixed to paramset.suggested_fixed
# Description

in order to align with the rest of the config (init,bounds)



Discussion:

Resolving patch:
diff --git a/src/pyhf/parameters/paramsets.py b/src/pyhf/parameters/paramsets.py
--- a/src/pyhf/parameters/paramsets.py
+++ b/src/pyhf/parameters/paramsets.py
@@ -6,7 +6,7 @@ def __init__(self, **kwargs):
         self.n_parameters = kwargs.pop('n_parameters')
         self.suggested_init = kwargs.pop('inits')
         self.suggested_bounds = kwargs.pop('bounds')
-        self.fixed = kwargs.pop('fixed')
+        self.suggested_fixed = kwargs.pop('fixed')
 
 
 class unconstrained(paramset):
diff --git a/src/pyhf/pdf.py b/src/pyhf/pdf.py
--- a/src/pyhf/pdf.py
+++ b/src/pyhf/pdf.py
@@ -288,7 +288,7 @@ def suggested_fixed(self):
         fixed = []
         for name in self.par_order:
             paramset = self.par_map[name]['paramset']
-            fixed = fixed + [paramset.fixed] * paramset.n_parameters
+            fixed = fixed + [paramset.suggested_fixed] * paramset.n_parameters
         return fixed
 
     def set_poi(self, name):
diff --git a/src/pyhf/workspace.py b/src/pyhf/workspace.py
--- a/src/pyhf/workspace.py
+++ b/src/pyhf/workspace.py
@@ -769,7 +769,7 @@ def build(cls, model, data, name='measurement'):
                         {
                             "bounds": [list(x) for x in v['paramset'].suggested_bounds],
                             "inits": v['paramset'].suggested_init,
-                            "fixed": v['paramset'].fixed,
+                            "fixed": v['paramset'].suggested_fixed,
                             "name": k,
                         }
                         for k, v in model.config.par_map.items()


Test patch:
diff --git a/tests/test_paramsets.py b/tests/test_paramsets.py
--- a/tests/test_paramsets.py
+++ b/tests/test_paramsets.py
@@ -11,7 +11,7 @@ def test_paramset_unconstrained():
     )
     assert pset.suggested_init == [0, 1, 2, 3, 4]
     assert pset.suggested_bounds == [(-1, 1), (-2, 2), (-3, 3), (-4, 4)]
-    assert not pset.fixed
+    assert not pset.suggested_fixed
     assert not pset.constrained
 
 
@@ -26,7 +26,7 @@ def test_paramset_constrained_custom_sigmas():
     )
     assert pset.suggested_init == [0, 1, 2, 3, 4]
     assert pset.suggested_bounds == [(-1, 1), (-2, 2), (-3, 3), (-4, 4)]
-    assert not pset.fixed
+    assert not pset.suggested_fixed
     assert pset.constrained
     assert pset.width() == [1, 2, 3, 4, 5]
 
@@ -41,7 +41,7 @@ def test_paramset_constrained_default_sigmas():
     )
     assert pset.suggested_init == [0, 1, 2, 3, 4]
     assert pset.suggested_bounds == [(-1, 1), (-2, 2), (-3, 3), (-4, 4)]
-    assert not pset.fixed
+    assert not pset.suggested_fixed
     assert pset.constrained
     assert pset.width() == [1, 1, 1, 1, 1]
 
@@ -57,7 +57,7 @@ def test_paramset_constrained_custom_factors():
     )
     assert pset.suggested_init == [0, 1, 2, 3, 4]
     assert pset.suggested_bounds == [(-1, 1), (-2, 2), (-3, 3), (-4, 4)]
-    assert not pset.fixed
+    assert not pset.suggested_fixed
     assert pset.constrained
     assert pset.width() == [1 / 10.0, 1 / 20.0, 1 / 30.0, 1 / 40.0, 1 / 50.0]