Skip to content

Reduce Verbosity #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions sed/core/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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] = []
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down