def valid_range(values: np.ndarray, threshold: float) -> tuple[int, int] | None:
idx = np.where(values > threshold)[0]
if idx.size == 0:
return None
return int(idx[0]), int(idx[-1])
def aligned_difference(meas: pd.Series, ref: pd.Series, threshold: float) -> np.ndarray:SDSL 공식
기준 데이터 정렬 후 빼기
측정 데이터와 기준(Reference) 파일을 유효 구간·중앙값으로 맞춘 뒤 차이를 구한다
#학교·과학#시각화
numpy · pandas · matplotlib · 76줄
⬇ 받아서 써보기