diff --git a/src/depiction/calibration/spectrum/calibration_method_dummy.py b/src/depiction/calibration/spectrum/calibration_method_dummy.py new file mode 100644 index 0000000..c0f5181 --- /dev/null +++ b/src/depiction/calibration/spectrum/calibration_method_dummy.py @@ -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__}()"