mirror of
https://github.com/nqrduck/nqrduck-spectrometer-simulator.git
synced 2024-12-21 15:10:25 +00:00
Added name to measurement.
This commit is contained in:
parent
1ebda98a0b
commit
84b542d19f
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
"""The controller module for the simulator spectrometer."""
|
"""The controller module for the simulator spectrometer."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
from datetime import datetime
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from nqrduck_spectrometer.base_spectrometer_controller import BaseSpectrometerController
|
from nqrduck_spectrometer.base_spectrometer_controller import BaseSpectrometerController
|
||||||
from nqrduck_spectrometer.measurement import Measurement
|
from nqrduck_spectrometer.measurement import Measurement
|
||||||
|
@ -57,7 +58,12 @@ class SimulatorController(BaseSpectrometerController):
|
||||||
tdx = tdx[evidx]
|
tdx = tdx[evidx]
|
||||||
result = result[evidx]
|
result = result[evidx]
|
||||||
|
|
||||||
|
# Measurement name date + module + target frequency + averages + sequence name
|
||||||
|
name = f"{datetime.now().strftime('%Y-%m-%d %H:%M:%S')} - Simulator - {self.module.model.target_frequency / 1e6} MHz - {self.module.model.averages} averages - {self.module.model.pulse_programmer.model.pulse_sequence.name}"
|
||||||
|
logger.debug(f"Measurement name: {name}")
|
||||||
|
|
||||||
measurement_data = Measurement(
|
measurement_data = Measurement(
|
||||||
|
name,
|
||||||
tdx,
|
tdx,
|
||||||
result / simulation.averages,
|
result / simulation.averages,
|
||||||
sample.resonant_frequency,
|
sample.resonant_frequency,
|
||||||
|
|
Loading…
Reference in a new issue