Skip to content

Commit

Permalink
Merge branch 'fix_save_energy_offset' of github.com:OpenCOMPES/sed in…
Browse files Browse the repository at this point in the history
…to fix_save_energy_offset
  • Loading branch information
steinnymir committed Nov 9, 2023
2 parents ee0da20 + f8a19ca commit d48897a
Showing 1 changed file with 13 additions and 5 deletions.
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 @@ -800,7 +804,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 @@ -925,7 +930,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 @@ -1258,7 +1264,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 @@ -1473,7 +1480,8 @@ def calibrate_delay_axis(
if preview:
print(self._dataframe.head(10))
else:
print(self._dataframe)
if self.verbose:
print(self._dataframe)

def save_workflow_params(
self,
Expand Down

0 comments on commit d48897a

Please sign in to comment.