目录
Sensitivity Measurement
SNR is the ratio of the peak value of the Ascan with a reflector on the sample arm and rms of the noise floor with the sample arm blocked.
Note that in the OCT community, SNR and sensitivity are sometimes used interchangeably 可交换的 (although technically they should be different). In our group, we will agree that SNR refers to the base measurement and Sensitivity is determined by also considering what ND filters were used. We should also report what power was incident on the sample for the measurement that was made.
This measurement process assumes your system is well enough aligned to get an interferogram.
该测量是假设系统已调校好的情况下
To perform an SNR measurement:

Make sure that your ND filters have been calibrated for the wavelength / light source you are using. The specifications are wavelengthdependent. To calibrate the ND filter, measure the power of a light source without a filter and after you add the filter. The decrease should tell you the actual OD of the filter for the wavelength you are using.
校准NDF，测量放NDF前后的光强，记录衰减。必须记录实际OD值和对应波长。 
Add a reflector (mirror) in the sample arm.样品臂放置反射镜

Align the sample arm with the calibrated ND filter in place (this ensures that your alignment is as good as possible when you make the measurement).样品臂放置NDF校准样品臂，同时确保数字转换器范围接近期待值来最小化数字噪声。(make sure you set your digitizer range to nearly what you expect to measure to minimize digitization noise)

Adjust the reference arm power so that you are near to saturation with the current ND filter in the sample arm (this may require also having some sort of filter in the reference arm).调节参考镜功率接近饱和，此时样品臂有NDF，可能也需要NDF在参考臂。

Take an Ascan and find the peak. The reflector should be placed close to the DC point to reduce errors from falloff（脱落）.记录信号，参考镜必须放置接近DC的地方来降低falloff

Block the sample arm and take a measurement of the noise floor. (where the peak would normally be; use many pixels about where the peak would be; you can also take pixels from the same location as a function of time)挡住样品臂测试噪声，在peak所在的地方取值，

Take the ratio of the Ascan peak (linear scale) to the noise rms（root mean square均方根）. This number is your SNR. When reported in dB you should multiply it by 20.
SNR = 20*log10(peak / noise_rms).
We use 20log10 instead of 10log10 because in the interferometric equation, the information that corresponds to the peak of the Ascan value is proportional to the electric field from the sample (i.e., proportional to sqrt(Rs)*Es), not the intensity. 
To calculate the sensitivity, add to the SNR the deficit caused by use of the ND filters. As mentioned above, the filter must be counted twice for doublepassed light.
Sensitivity = SNR + 20*OD
where OD = optical density. This is because OD is already expressed in log10 form.
计算系统灵敏度的程序：
#!/usr/bin/env python3
# * coding: utf8 *
"""
Created on Wed Dec 14 18:45:30 2016
@author: zhuyue
"""
import matplotlib.pyplot as plt
import numpy as np
from scipy import signal
from scipy.fftpack import fft, fftshift
# %% Calibrate NDF 这是 放置NDF后光强 文件 和 原始光强 文件%%
INDF = 0.243 #uw
I0 = 294 #uw
OD = (np.log10(I0 / INDF))/2
#OD = max(od)
INDF_R = 44.4 #uw
I0_R = 294 #uw
OD_R = (np.log10(I0 / INDF_R))/2
# %% PEAK 这是 参考臂饱和样品臂NDF的干涉信号 文件%%
#%%initialization%%
SelRan = np.arange(0,2048,1)
window = signal.hann(SelRan.size)
ref = np.loadtxt(open("NKT_ND20_52us_REF.csv","rb"),delimiter=",",skiprows=0)
sam = np.loadtxt(open("NKT_ND20_52us_SAM.csv","rb"),delimiter=",",skiprows=0)
AveRef = ref + sam
#%% Read data %%
I = np.loadtxt(open("NKT__ND20_52us_0thou.csv","rb"),delimiter=",",skiprows=0)
#%% Reshape %%
I = I  AveRef
I = I * window
S = fft(I, I.size)
Signal = np.abs(S)
peak_range = np.arange(0,50,1)
peak = max(Signal[peak_range])
# %% NOISE 这是 noise floor 文件 %%
N = np.loadtxt(open("NKT_ND20_52us_BG.csv","rb"),delimiter=",",skiprows=0)
N = np.abs(fft(N, N.size))
noise_range = np.arange(500,1023,1)
Noise = N[noise_range]
# %% RMS %%
from math import sqrt
def qmean(num):
return sqrt(sum(n*n for n in num)/len(num))
noise_rms = qmean(Noise)
sensi = 20 * np.log10 (peak / noise_rms) + 20 * OD + 20 * OD_R
What I learned from:
 Optical power meter 要确定波长范围再读数据
 Noise floor
 Turn off the laser and make a reading
 Turn on the laser and block the sample
 Use a section of the FFT where there’s no signal as noise floor.