feat: implement DTW comparison, add data segmentation and persistence, and update QML UI for file imports and graphing.
This commit is contained in:
@@ -45,3 +45,23 @@ class CsvRecorder:
|
||||
self._file_handle.close()
|
||||
path, self._file_handle, self._path = self._path, None, None
|
||||
return path
|
||||
|
||||
@staticmethod
|
||||
def write_segment(file_path: str, source_path: str, start_frame: int, end_frame: int) ->bool:
|
||||
"""Copy a range of frames from source CSV into a new file.
|
||||
|
||||
Args:
|
||||
file_path: Output CSV path.
|
||||
source_path: Source CSV path with full wafer data
|
||||
start_frame: First frame index (inclusive).
|
||||
end_frame: Last frame index (inclusive)
|
||||
|
||||
Returns:
|
||||
True on success.
|
||||
"""
|
||||
import pandas as pd
|
||||
df = pd.read_csv(source_path)
|
||||
segment = df.iloc[start_frame:end_frame + 1]
|
||||
segment.to_csv(file_path, index=False)
|
||||
return True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user