-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c48922e
commit a65e29d
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
src/depiction/calibration/spectrum/calibration_method_dummy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from depiction.calibration.calibration_method import CalibrationMethod | ||
from numpy.typing import NDArray | ||
from xarray import DataArray | ||
|
||
|
||
class CalibrationMethodDummy(CalibrationMethod): | ||
"""Returns the input data and creates some dummy coefficients to ensure compatibility.""" | ||
|
||
def extract_spectrum_features(self, peak_mz_arr: NDArray[float], peak_int_arr: NDArray[float]) -> DataArray: | ||
return DataArray([0], dims=["c"]) | ||
|
||
def preprocess_image_features(self, all_features: DataArray) -> DataArray: | ||
return all_features | ||
|
||
def fit_spectrum_model(self, features: DataArray) -> DataArray: | ||
return features | ||
|
||
def apply_spectrum_model( | ||
self, spectrum_mz_arr: NDArray[float], spectrum_int_arr: NDArray[float], model_coef: DataArray | ||
) -> tuple[NDArray[float], NDArray[float]]: | ||
return spectrum_mz_arr, spectrum_int_arr | ||
|
||
def __repr__(self) -> str: | ||
return f"{self.__class__.__name__}()" |