修复了多处滤波器的滤波参数不判断是否合法的问题
当滤波器阶数为0时,将输出原始信号
This commit is contained in:
@ -424,6 +424,10 @@ class Data:
|
||||
Constants.FAILURE_REASON["Data_Not_Exist"])
|
||||
|
||||
try:
|
||||
if ((Config["Filter"]["BandPassLow"] >= Config["Filter"]["BandPassHigh"]) or
|
||||
(Config["Filter"]["BandPassLow"] <= 0) or (Config["Filter"]["BandPassHigh"] <= 0)):
|
||||
return Result().failure(
|
||||
info=Constants.PREPROCESS_FAILURE + Constants.FAILURE_REASON["Filter_Args_Not_Correct"])
|
||||
self.processed_data = preprocess(self.raw_data,
|
||||
Config["InputConfig"]["Freq"],
|
||||
Config["Filter"]["BandPassLow"],
|
||||
@ -445,6 +449,9 @@ class Data:
|
||||
Constants.FAILURE_REASON["Data_Not_Exist"])
|
||||
|
||||
try:
|
||||
if Config["IntervalLow"] >= Config["IntervalHigh"]:
|
||||
return Result().failure(
|
||||
info=Constants.DETECT_JPEAK_PREDICT_FAILURE + Constants.FAILURE_REASON["Interval_Args_Not_Correct"])
|
||||
self.peak, self.interval = Jpeak_Detection(model.selected_model,
|
||||
Path(model.model_folder_path) / Path(model.selected_model),
|
||||
self.processed_data,
|
||||
|
||||
Reference in New Issue
Block a user