From 9bd061b6ee01c18dcf4c9c0e140eef70e4c20cec Mon Sep 17 00:00:00 2001 From: Michiel Cottaar <MichielCottaar@protonmail.com> Date: Tue, 21 May 2024 14:03:19 +0100 Subject: [PATCH] Fix duration calculation for ADC Each sample takes `dwell_time` to collect --- src/components/readouts/ADCs.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/readouts/ADCs.jl b/src/components/readouts/ADCs.jl index f1be9ce..15ba354 100644 --- a/src/components/readouts/ADCs.jl +++ b/src/components/readouts/ADCs.jl @@ -52,7 +52,7 @@ readout_times(adc::ADC) = ((1:Int(nsamples(adc))) .- 0.5) .* dwell_time(adc) oversample(adc::ADC) = adc.oversample nsamples(adc::ADC) = resolution(adc) * oversample(adc) dwell_time(adc::ADC) = adc.dwell_time -duration(adc::ADC) = (nsamples(adc)-1) * dwell_time(adc) +duration(adc::ADC) = nsamples(adc) * dwell_time(adc) time_to_center(adc::ADC) = adc.time_to_center effective_time(adc::ADC) = time_to_center(adc) resolution(adc::ADC) = adc.resolution -- GitLab