|
|
clc
|
|
|
clear
|
|
|
close all
|
|
|
|
|
|
[I_dark,Fn,QE,Gain,Noise_read,FWC,ADC,Lambda_center,D_aperture,GSD,H_orbit,Tao0,Epslong,M_TDI,Light_input_low,Light_input_classic,Light_input_high,pho_max,pho_L_k,pho_L_b] = readinput_SMR();
|
|
|
|
|
|
%探测器性能参数
|
|
|
Sensor_input = [I_dark,Fn,QE, Gain, Noise_read,FWC,ADC];
|
|
|
|
|
|
%光学性能系统参数
|
|
|
Optic_input = [Lambda_center,D_aperture,GSD,H_orbit,Tao0,Epslong];
|
|
|
|
|
|
%成像参数
|
|
|
t_TDI = NaN; % 积分时间,单位s,可以不输入,改输入积分级数M
|
|
|
T_imaging_input = [t_TDI,M_TDI];
|
|
|
|
|
|
%入瞳辐亮度
|
|
|
Light_input = [Light_input_low,Light_input_classic,Light_input_high];
|
|
|
|
|
|
pho_input = imread('SNR_simulation.jpg');
|
|
|
|
|
|
%反射率矩阵或图片数据
|
|
|
pho_L_infor = [pho_max,pho_L_k,pho_L_b];
|
|
|
site_str = "";
|
|
|
|
|
|
[SNR_output, mmm_pho_SNR, Picture_output] = SNR_simulation(Sensor_input,Optic_input,T_imaging_input,Light_input,pho_input,pho_L_infor,site_str);
|
|
|
mmm_pho_SNR(1,:)
|
|
|
mmm_pho_SNR(2,:)
|
|
|
|
|
|
%保存SNR_output数组到output_result(1).txt
|
|
|
fileID = fopen('output_result(1).txt', 'w');
|
|
|
|
|
|
% 逐行写入数组的元素
|
|
|
for i = 1:length(SNR_output)
|
|
|
fprintf(fileID, '%f\n', SNR_output(i)); % 每行一个元素
|
|
|
end
|
|
|
|
|
|
fclose(fileID); % 关闭文件
|
|
|
|
|
|
%保存mmm_pho_SNR矩阵到output_result(2).txt
|
|
|
dlmwrite('output_result(2).txt',mmm_pho_SNR,'delimiter','\t');
|