Skip to content
Snippets Groups Projects
Commit fe32298d authored by Danilo Ferreira de Lima's avatar Danilo Ferreira de Lima
Browse files

Added method to return x-axis from high resolution data.

parent 7a38ac2d
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ class HighResolutionSmoother(TransformerMixin, BaseEstimator): ...@@ -66,7 +66,7 @@ class HighResolutionSmoother(TransformerMixin, BaseEstimator):
Returns: The object itself. Returns: The object itself.
""" """
self.energy = fit_params["energy"] self.energy = np.copy(fit_params["energy"])
if len(self.energy.shape) == 2: if len(self.energy.shape) == 2:
self.energy = self.energy[0,:] self.energy = self.energy[0,:]
return self return self
...@@ -536,6 +536,10 @@ class Model(TransformerMixin, BaseEstimator): ...@@ -536,6 +536,10 @@ class Model(TransformerMixin, BaseEstimator):
"""Get channels used in training.""" """Get channels used in training."""
return self.x_model.named_steps["select"].channels return self.x_model.named_steps["select"].channels
def get_energy_values(self) -> np.ndarray:
"""Get x-axis of high-resolution data."""
return self.y_model.named_steps["smoothen"].energy
def debug_peak_finding(self, low_res_data: Dict[str, np.ndarray], filename: str): def debug_peak_finding(self, low_res_data: Dict[str, np.ndarray], filename: str):
""" """
Produce image to understand if the peak finding step worked well. Produce image to understand if the peak finding step worked well.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment