mirror of
https://github.com/nqrduck/nqrduck-spectrometer-simulator.git
synced 2024-10-13 23:15:26 +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."""
|
||||
|
||||
import logging
|
||||
from datetime import datetime
|
||||
import numpy as np
|
||||
from nqrduck_spectrometer.base_spectrometer_controller import BaseSpectrometerController
|
||||
from nqrduck_spectrometer.measurement import Measurement
|
||||
|
@ -57,7 +58,12 @@ class SimulatorController(BaseSpectrometerController):
|
|||
tdx = tdx[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(
|
||||
name,
|
||||
tdx,
|
||||
result / simulation.averages,
|
||||
sample.resonant_frequency,
|
||||
|
|
Loading…
Reference in a new issue