Stft #32

Merged
nuluh merged 17 commits from stft into main 2025-03-16 04:49:44 +00:00
Showing only changes of commit ff5578652f - Show all commits

View File

@@ -28,7 +28,7 @@ def create_damage_files(base_path, output_base):
file_path = os.path.join(base_path, f'zzzAD{file_index}.TXT') file_path = os.path.join(base_path, f'zzzAD{file_index}.TXT')
df = pd.read_csv(file_path, sep='\t', skiprows=10) # Read with explicit column names df = pd.read_csv(file_path, sep='\t', skiprows=10) # Read with explicit column names
top_sensor = columns[damage-1] top_sensor = columns[i-1]
print(top_sensor, type(top_sensor)) print(top_sensor, type(top_sensor))
output_file_1 = os.path.join(output_base, f'DAMAGE_{damage}', f'D{damage:0{damage_pad}}_TEST{i:0{test_pad}}_01.csv') output_file_1 = os.path.join(output_base, f'DAMAGE_{damage}', f'D{damage:0{damage_pad}}_TEST{i:0{test_pad}}_01.csv')
print(f"Creating {output_file_1} from taking zzzAD{file_index}.TXT") print(f"Creating {output_file_1} from taking zzzAD{file_index}.TXT")
@@ -37,7 +37,7 @@ def create_damage_files(base_path, output_base):
df[['Time', top_sensor]].to_csv(output_file_1, index=False) df[['Time', top_sensor]].to_csv(output_file_1, index=False)
print(Fore.GREEN + "Done") print(Fore.GREEN + "Done")
bottom_sensor = sensor_end_map[damage] bottom_sensor = sensor_end_map[i]
output_file_2 = os.path.join(output_base, f'DAMAGE_{damage}', f'D{damage}_TEST{i}_02.csv') output_file_2 = os.path.join(output_base, f'DAMAGE_{damage}', f'D{damage}_TEST{i}_02.csv')
print(f"Creating {output_file_2} from taking zzzAD{file_index}.TXT") print(f"Creating {output_file_2} from taking zzzAD{file_index}.TXT")
print("Taking datetime column on index 0...") print("Taking datetime column on index 0...")