From bee3f5615a733beb4f3175f61ed65fd338484f67 Mon Sep 17 00:00:00 2001 From: Last Davis Vern Date: Tue, 12 Aug 2025 11:33:01 +0200 Subject: [PATCH] Figured out the answer to a question posed by one of my comments in the past --- frappy_psi/tnmr/sequence_fileformat.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frappy_psi/tnmr/sequence_fileformat.py b/frappy_psi/tnmr/sequence_fileformat.py index ce0005ea..51af2ff9 100644 --- a/frappy_psi/tnmr/sequence_fileformat.py +++ b/frappy_psi/tnmr/sequence_fileformat.py @@ -236,7 +236,12 @@ def get_event_header(event_type, vals, tables, table_reg, tuning_number, col_del dwell_us = acq_time / acq_points dwell = f'{dwell_us*1000}n' - freq = 1/(dwell_us/1e6) / 2 # put it in Hz. TODO: Figure out why the factor of 2 is necessary... + + # spectral width (here "sweep") and dwell time are linked by the relation + # DT = (2*SW)^(-1) + # Therefore, SW = 1/(DT*2) + + freq = 1/(dwell_us/1e6) / 2 # put it in Hz. sweep = f'{freq}Hz' filtr = f'{freq}Hz'