14 lines
493 B
Python
14 lines
493 B
Python
from Common.CEnum import LEFT_SEG_METHOD
|
|
from Common.ChanException import CChanException, ErrCode
|
|
|
|
|
|
class CSegConfig:
|
|
def __init__(self, seg_algo="chan", left_method="peak"):
|
|
self.seg_algo = seg_algo
|
|
if left_method == "all":
|
|
self.left_method = LEFT_SEG_METHOD.ALL
|
|
elif left_method == "peak":
|
|
self.left_method = LEFT_SEG_METHOD.PEAK
|
|
else:
|
|
raise CChanException(f"unknown left_seg_method={left_method}", ErrCode.PARA_ERROR)
|