summaryrefslogtreecommitdiffstats
path: root/lab_control/frequency_response.py
diff options
context:
space:
mode:
Diffstat (limited to 'lab_control/frequency_response.py')
-rw-r--r--lab_control/frequency_response.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lab_control/frequency_response.py b/lab_control/frequency_response.py
index 8d46689..af78840 100644
--- a/lab_control/frequency_response.py
+++ b/lab_control/frequency_response.py
@@ -1,3 +1,5 @@
+from pathlib import Path
+
from lab_control.function_generator import FunctionGenerator
from lab_control.oscilloscope import Oscilloscope
from lab_control.measurement import Measurement, getLinearRange
@@ -23,5 +25,9 @@ class FrequencyResponseMeasurement(Measurement):
self.measurementDone = True
- def saveToCSV(self, path: str) -> None:
- pass
+ def dumpToCSV(self, path: Path) -> None:
+ with open(path, "w") as f:
+ f.write("Frequency (Hz),Amplitude (V)")
+
+ for entry in self.data:
+ f.write(f"\n{entry[0]},{entry[1]}")