diff --git a/sed/core/processor.py b/sed/core/processor.py index 15efc245..fb425bea 100644 --- a/sed/core/processor.py +++ b/sed/core/processor.py @@ -65,6 +65,7 @@ def __init__( folder: str = None, runs: Sequence[str] = None, collect_metadata: bool = False, + verbose: bool = False, **kwds, ): """Processor class of sed. Contains wrapper functions defining a work flow @@ -97,6 +98,8 @@ def __init__( num_cores = N_CPU - 1 self._config["binning"]["num_cores"] = num_cores + self.verbose = verbose + self._dataframe: Union[pd.DataFrame, ddf.DataFrame] = None self._timed_dataframe: Union[pd.DataFrame, ddf.DataFrame] = None self._files: List[str] = [] @@ -666,7 +669,8 @@ def apply_momentum_correction( if preview: print(self._dataframe.head(10)) else: - print(self._dataframe) + if self.verbose: + print(self._dataframe) # Momentum calibration work flow # 1. Calculate momentum calibration @@ -799,7 +803,8 @@ def apply_momentum_calibration( if preview: print(self._dataframe.head(10)) else: - print(self._dataframe) + if self.verbose: + print(self._dataframe) # Energy correction workflow # 1. Adjust the energy correction parameters @@ -923,7 +928,8 @@ def apply_energy_correction( if preview: print(self._dataframe.head(10)) else: - print(self._dataframe) + if self.verbose: + print(self._dataframe) # Energy calibrator workflow # 1. Load and normalize data @@ -1257,7 +1263,8 @@ def append_energy_axis( if preview: print(self._dataframe.head(10)) else: - print(self._dataframe) + if self.verbose: + print(self._dataframe) def add_energy_offset( self, @@ -1451,7 +1458,8 @@ def calibrate_delay_axis( if preview: print(self._dataframe.head(10)) else: - print(self._dataframe) + if self.verbose: + print(self._dataframe) def add_jitter( self,