File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -713,6 +713,30 @@ def get_contrast_model_field(self):
713713 model_field = "custom_files"
714714 return model_field
715715
716+ def set_prior_visibility (self , priors_visible : bool ):
717+ """Set whether priors are visible or invisible for all parameters.
718+
719+ Parameters
720+ ----------
721+ priors_visible : bool
722+ Whether priors should be shown.
723+
724+ """
725+ for classlist_name in parameter_class_lists :
726+ classlist = getattr (self , classlist_name )
727+ for i in range (0 , len (classlist )):
728+ classlist [i ].show_priors = priors_visible
729+
730+ def show_priors (self ):
731+ """Show priors for all parameters in the model."""
732+ # convenience function from set_prior_visibility
733+ self .set_prior_visibility (True )
734+
735+ def hide_priors (self ):
736+ """Hide priors for all parameters in the model."""
737+ # convenience function from set_prior_visibility
738+ self .set_prior_visibility (False )
739+
716740 def write_script (self , obj_name : str = "problem" , script : str = "project_script.py" ):
717741 """Write a python script that can be run to reproduce this project object.
718742
You can’t perform that action at this time.
0 commit comments