@@ -201,7 +201,7 @@ def __init__(self, peak_width_limits=(0.5, 12.0), max_n_peaks=np.inf, min_peak_h
201201 # Set default debug mode - controls if an error is raised if model fitting is unsuccessful
202202 self ._debug = False
203203 # Set default data checking modes - controls which checks get run on input data
204- # check_freqs: check the frequency values, and raises an error for uneven spacing
204+ # check_freqs: checks the frequency values, and raises an error for uneven spacing
205205 self ._check_freqs = True
206206 # check_data: checks the power values and raises an error for any NaN / Inf values
207207 self ._check_data = True
@@ -570,6 +570,19 @@ def get_settings(self):
570570 for key in OBJ_DESC ['settings' ]})
571571
572572
573+ def get_run_modes (self ):
574+ """Return run modes of the current object.
575+
576+ Returns
577+ -------
578+ data: dict
579+ Dictionary containing the run_modes from the current object.
580+ """
581+
582+ return {key : getattr (self , key ) \
583+ for key in OBJ_DESC ['run_modes' ]}
584+
585+
573586 def get_meta_data (self ):
574587 """Return data information from the current object.
575588
@@ -724,7 +737,7 @@ def set_debug_mode(self, debug):
724737
725738 self ._debug = debug
726739
727-
740+
728741 def set_check_modes (self , check_freqs = None , check_data = None ):
729742 """Set check modes, which controls if an error is raised based on check on the inputs.
730743
@@ -755,6 +768,23 @@ def set_check_data_mode(self, check_data):
755768 self .set_check_modes (check_data = check_data )
756769
757770
771+ def set_run_modes (self , debug , check_freqs , check_data ):
772+ """Simultaneously set all run modes.
773+
774+ Parameters
775+ ----------
776+ debug : bool
777+ Whether to run in debug mode.
778+ check_freqs : bool
779+ Whether to run in check freqs mode.
780+ check_data : bool
781+ Whether to run in check data mode.
782+ """
783+
784+ self .set_debug_mode (debug )
785+ self .set_check_modes (check_freqs , check_data )
786+
787+
758788 def to_df (self , peak_org ):
759789 """Convert and extract the model results as a pandas object.
760790
0 commit comments