From 2d7bc36fee40470e48ba27f3df0c8b85227d4e63 Mon Sep 17 00:00:00 2001 From: Karthik Chandrashekara Date: Fri, 16 Jul 2021 15:51:00 +0200 Subject: [PATCH] Cosmetic changes only. --- .../@TwoDimensionalMOT/bootstrapErrorEstimation.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/+Simulator/@TwoDimensionalMOT/bootstrapErrorEstimation.m b/+Simulator/@TwoDimensionalMOT/bootstrapErrorEstimation.m index d47cb5d..4c26441 100644 --- a/+Simulator/@TwoDimensionalMOT/bootstrapErrorEstimation.m +++ b/+Simulator/@TwoDimensionalMOT/bootstrapErrorEstimation.m @@ -9,20 +9,20 @@ function [LoadingRate, StandardError, ConfidenceInterval] = bootstrapErrorEstima if ~isnan(CorrelationFactor) SampleLength = floor(CorrelationFactor); NumberOfBootsrapSamples = 1000; - MeanLoadingRatioInEachSample = zeros(1,NumberOfBootsrapSamples); + MeanCaptureRatioInEachSample = zeros(1,NumberOfBootsrapSamples); for SampleNumber = 1:NumberOfBootsrapSamples BoostrapSample = datasample(NumberOfLoadedAtoms, SampleLength); % Sample with replacement - MeanLoadingRatioInEachSample(SampleNumber) = mean(BoostrapSample) / n; % Empirical bootstrap distribution of sample means + MeanCaptureRatioInEachSample(SampleNumber) = mean(BoostrapSample) / n; % Empirical bootstrap distribution of sample means end - LoadingRate = mean(MeanLoadingRatioInEachSample) * ovenObj.ReducedFlux; + LoadingRate = mean(MeanCaptureRatioInEachSample) * ovenObj.ReducedFlux; Variance = 0; % Bootstrap Estimate of Variance for SampleNumber = 1:NumberOfBootsrapSamples - Variance = Variance + (MeanLoadingRatioInEachSample(SampleNumber) - mean(MeanLoadingRatioInEachSample))^2; + Variance = Variance + (MeanCaptureRatioInEachSample(SampleNumber) - mean(MeanCaptureRatioInEachSample))^2; end - StandardError = sqrt((1 / (NumberOfBootsrapSamples-1)) * Variance) * ovenObj.ReducedFlux; + StandardError = sqrt((1 / (NumberOfBootsrapSamples-1)) * Variance) * ovenObj.ReducedFlux; ts = tinv([0.025 0.975],NumberOfBootsrapSamples-1); % T-Score ConfidenceInterval = LoadingRate + ts*StandardError; % 95% Confidence Intervals