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 @@ -718,6 +718,30 @@ def get_contrast_model_field(self):
718718 model_field = "custom_files"
719719 return model_field
720720
721+ def set_prior_visibility (self , priors_visible : bool ):
722+ """Set whether priors are visible or invisible for all parameters.
723+
724+ Parameters
725+ ----------
726+ priors_visible : bool
727+ Whether priors should be shown.
728+
729+ """
730+ for classlist_name in parameter_class_lists :
731+ classlist = getattr (self , classlist_name )
732+ for i in range (0 , len (classlist )):
733+ classlist [i ].show_priors = priors_visible
734+
735+ def show_priors (self ):
736+ """Show priors for all parameters in the model."""
737+ # convenience function from set_prior_visibility
738+ self .set_prior_visibility (True )
739+
740+ def hide_priors (self ):
741+ """Hide priors for all parameters in the model."""
742+ # convenience function from set_prior_visibility
743+ self .set_prior_visibility (False )
744+
721745 def write_script (self , obj_name : str = "problem" , script : str = "project_script.py" ):
722746 """Write a python script that can be run to reproduce this project object.
723747
You can’t perform that action at this time.
0 commit comments