fluxcontrol/h_values/extraerH.py
2025-03-31 11:31:56 +02:00

16 lines
311 B
Python

import json
h = []
with open("curva.txt", "r") as f:
for linea in f:
if "HValue" in linea:
partes = linea.strip().split("=")
h_val = float(partes[1])
h.append(h_val)
print(h)
with open("h_values.json", "w") as json_file:
json.dump(h, json_file, indent=4)