4545_debug : bool
4646 Whether the object is set in debug mode.
4747 This should be controlled by using the `set_debug_mode` method.
48- _check_freqs: bool
49- Whether to checked added added frequency values for even linear spacing .
50- _check_data : bool
51- Whether to check added data for NaN or Inf values, and fail out if present .
52- This should be controlled by using the `set_check_data_mode ` method.
48+ _check_data, _check_freqs : bool
49+ Whether to check added inputs for incorrect inputs, failing if present .
50+ Frequency data is checked for linear spacing.
51+ Power values are checked for data for NaN or Inf values.
52+ These modes default to True, and can be controlled with the `set_check_modes ` method.
5353
5454Code Notes
5555----------
@@ -737,19 +737,25 @@ def set_debug_mode(self, debug):
737737
738738 self ._debug = debug
739739
740-
741- def set_check_freqs_mode (self , check_freqs ):
742- """Set check freqs mode , which controls if an error is raised for unevenly spaced input frequencies .
740+
741+ def set_check_modes (self , check_freqs = None , check_data = None ):
742+ """Set check modes , which controls if an error is raised based on check on the inputs .
743743
744744 Parameters
745745 ----------
746- check_freqs : bool
747- Whether to run in check freqs mode.
746+ check_freqs : bool, optional
747+ Whether to run in check freqs mode, which checks the frequency data.
748+ check_data : bool, optional
749+ Whether to run in check data mode, which checks the power spectrum values data.
748750 """
749751
750- self ._check_freqs = check_freqs
752+ if check_freqs is not None :
753+ self ._check_freqs = check_freqs
754+ if check_data is not None :
755+ self ._check_data = check_data
751756
752757
758+ # This kept for backwards compatibility, but to be removed in 2.0 in favor of `set_check_modes`
753759 def set_check_data_mode (self , check_data ):
754760 """Set check data mode, which controls if an error is raised if NaN or Inf data are added.
755761
@@ -759,7 +765,7 @@ def set_check_data_mode(self, check_data):
759765 Whether to run in check data mode.
760766 """
761767
762- self ._check_data = check_data
768+ self .set_check_modes ( check_data = check_data )
763769
764770
765771 def set_run_modes (self , debug , check_freqs , check_data ):
@@ -774,9 +780,9 @@ def set_run_modes(self, debug, check_freqs, check_data):
774780 check_data : bool
775781 Whether to run in check data mode.
776782 """
777- self . _debug = debug
778- self ._check_freqs = check_freqs
779- self ._check_data = check_data
783+
784+ self .set_debug_mode ( debug )
785+ self .set_check_modes ( check_freqs , check_data )
780786
781787
782788 def to_df (self , peak_org ):
0 commit comments