亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? narcwiz.m

?? zemax與matlab調用程序
?? M
?? 第 1 頁 / 共 2 頁
字號:
zOpenWIndow('Sas');
uiwait(msgbox(['Switch to ZEMAX and save the lens as "Primary Reversed.zmx" in the directory ' NarcDir], 'Save Request', 'custom',NarcIcon, hot(64), 'modal'));
zOpenWindow('Gho');
uiwait(msgbox('Switch to ZEMAX and generate single bounce ghost lenses for all surfaces. Remember to specify Save Files and the correct coating', 'Ghost Lens Generation', 'custom', NarcIcon, hot(64), 'modal'));

% The next job is to perform a vignetting calculation and save text for each ghost lens
% Start by getting a list of all ghost lenses
GhostFiles = dir([NarcDir 'gh*.zmx']);
% Loop and load each ghost lens in turn

BusyMessage = ZEMAXBusy; pause(1);
nuFID = fopen([NarcDir 'nu.txt'], 'wt');
for i=1:size(GhostFiles,1)
    zLoadFile([NarcDir GhostFiles(i).name]);  % Load up the next ghost lens file
    LenSys = zsGetSystem;                     % Get system operating parameters esp. number of surfaces
    zPushLens(3);                             % Push the lens into the foreground
    GhostSurf = GhostFiles(i).name(3:5);      % Extract the ghosting surface from the filename
    NoNoSurf  = GhostFiles(i).name(6:8);      % This must be 000, otherwise user has generated double bounce lenses
    if (~strcmp(NoNoSurf, '000'))             % The user seems to have generated double bounce lenses
        uiwait(msgbox('Encountered double bounce ghost lenses. Restart the analysis.', 'Double Bounce Error', 'error', 'modal'));
        delete([NarcDir 'GH*.ZMX']);          % Delete all ghost lenses in this directory
        delete(BusyMessage);                  % Delete the busy message
        Results.Status = -7;                  % Give up
        return;
    end;
    nuDataFile = ['nu' GhostSurf '.txt'];     % Synthesize filename of vignetting data with cold stop
    nu_cDataFile = ['cnu' GhostSurf '.txt'];  % Filename of vignetting data without cold stop
    % Compute transmission for the axial ray
    PolTraceData = zGetPolTrace(PrimaryWave, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0);
    tau = PolTraceData(2); % This is axial system transmission. An enhanced version could do better.
    fprintf(nuFID, '%s %11.9f\n', nuDataFile, tau);       % Write filename and transmission data into file for later
    nuDataFile = [NarcDir nuDataFile];                    % Synthesize full pathname of vignetting data with cold stop
    nu_cDataFile = [NarcDir nu_cDataFile];                % Synthesize full pathname of vignetting data without cold stop
    if (~exist(nuDataFile, 'file')),                      % Check if the vignetting datafile already exists
      zGetTextFile(nuDataFile, 'Vig', SettingsFile, 1);   % if not, generate vignetting data for this ghost lens
    end;
    zSetAperture(LenSys.numsurfs - 1, 0, 0, 0, 0, 0, ''); % Now remove the cold stop aperture
    zPushLens(3);                                         % Push the lens into the foreground
    if (~exist(nu_cDataFile, 'file')),                    % Check if the vigentting data file exists
      zGetTextFile(nu_cDataFile, 'Vig', SettingsFile, 1); % if not, generate vignetting data for this ghost lens with cold stop removed
    end;
end
fclose(nuFID);
delete(BusyMessage);

% Here are the pixel resolutions at which to plot the qualitative narcissus map
xres = 640;
yres = 480;

% Here are the wavelengths over which we will integrate
deltalambda = 0.02;
lambda1 = 3.0;
lambda2 = 5.0;
lambda = lambda1:deltalambda:lambda2;
lambda = lambda';

% Compute Black body curves for ambient scene, dewar and housing
BB_a = planck(lambda, T_a);
BB_d = planck(lambda, T_d);
BB_h = planck(lambda, T_h);

% Read in the relative illumination (irradiance) rho
% Please check that the number of headerlines is correct

[yrho, rho] = textread([NarcDir 'rho.txt'], '%f %f', 'headerlines', 13);

% Now read in all the filename and transmittance data from nu.txt

[names, tau] = textread([NarcDir, 'nu.txt'], '%9c %f'); % Filenames of vignetting data with cold stop
names_c = cat(2,repmat('c',size(names,1),1),names);     % Filenames of vignetting data wihtout cold stop
% Now read in all of the vignetting curves
for i=1:size(names)
    [y, nu(:,i)] = textread([NarcDir names(i,:)], '%f %f', 'headerlines', 12);     % Read vignetting data with cold stop
    [y, nu_c(:,i)] = textread([NarcDir names_c(i,:)], '%f %f', 'headerlines', 12); % Read vignetting data without cold stop
end

% It is possible that rho has been computed on a less dense y field sampling. We must therefore resample rho.
rho = interp1(yrho, rho, y, 'spline');

% Now compute and sum all the irradiance terms

% First the contribution from the ambient scene, with and without the effect of rho
H_arho = tau_S * trapz(lambda, BB_a) * rho / (4 * F * F);
H_a = tau_S * trapz(lambda, BB_a) * ones(size(rho)) / (4 * F * F);
% Next comes the direct contribution from the cold dewar walls;
H_d = 2 * sqrt(1 - 1 / (4 * F * F)) * trapz(lambda, BB_d) * ones(size(H_a));
% The following contribution is the "cold return", or cold straylight from single bounce reflections
H_id = repmat(tau',size(nu,1),1).*nu*trapz(lambda, BB_d) / (4 * F * F);
sigmaH_id = sum(H_id,2);
% Secondly, we have the mixed return from the outside of the cold stop
H_idh = repmat(tau',size(nu,1),1).*(nu_c - nu)*trapz(lambda, (r_c * BB_h + (1 - r_c) * BB_d)) / (4 * F * F);
sigmaH_idh = sum(H_idh,2);
% Lastly, the warm return, assumed to come from the housing
H_ih = repmat(tau',size(nu,1),1).*(1-nu_c)*trapz(lambda, BB_h) / (4 * F * F);
sigmaH_ih = sum(H_ih,2);

% Here comes the final irradiance sum, with and without the effect of rho

H_rho = H_arho + H_d + sigmaH_id + sigmaH_idh + sigmaH_ih;
H = H_a + H_d + sigmaH_id + sigmaH_idh + sigmaH_ih;

% and here come the contributions per surface

H_i = repmat(H_a, 1, size(H_id,2)) + repmat(H_d, 1, size(H_id,2)) + H_id + H_idh + H_ih;

% And finally we get to NITD

% First compute planck curve for radiation one kelvin above ambient
BB_a1 = planck(lambda, T_a + 1);

% Compute Detector irradiance delta T
TD = (H_rho-H(1))./(tau_S * rho * (trapz(lambda, BB_a1) - trapz(lambda, BB_a))/(4 * F * F));

% Total NITD computed without the effect of rho
%NITD = (H-H(1))./(tau_S * ones(size(rho)) * (trapz(lambda, BB_a1) - trapz(lambda, BB_a))/(4 * F * F));
NITD = (H-H(1))/(tau_S *(trapz(lambda, BB_a1) - trapz(lambda, BB_a))/(4 * F * F));

% Compute the NITD contributions per surface 
NITD_i = (H_i - repmat(H_i(1,:), size(H_i,1),1))/(tau_S *(trapz(lambda, BB_a1) - trapz(lambda, BB_a))/(4 * F * F));

% Find worst offending surfaces

sigmaNITD_i = sum(NITD_i);
sigmaNITD_i = sigmaNITD_i';
Worst = flipdim(sortrows([str2num(names(:,3:5)) sigmaNITD_i],2),1); % Rank surfaces on worst total integrated NITD

% Compute the maximum gradient of NITD contribution per surface in kelvins
% per image diagonal
for Col = 1:size(NITD_i,2)
  slup = 2 * max(gradient(NITD_i(:,Col),mean(diff(y/max(y)))));    % maximum slope is most upward
  sldn = -2 * min(gradient(NITD_i(:,Col),mean(diff(y/max(y)))));   % minimum slope is most downward
  maxgradNITD_i(1,Col) = max([slup, sldn]);                        % maximum of either upward or downward slope
end;

WorstSlope = flipdim(sortrows([str2num(names(:,3:5)) maxgradNITD_i'],2),1); % Rank surfaces on maximum gradient of NITD contribution

% Read in the YNI contributions
[YNIsurf, YNIf] = textread([NarcDir, 'YNIf.txt'], '%f %f', 'headerlines', 11);
% Reverse order as for ghost analysis lenses
YNIf = flipud(YNIf);
Worst(:,3) = YNIf(Worst(:,1));
WorstSlope(:,3) = YNIf(WorstSlope(:,1));
% Display Worst offenders with rank and YNI contribution
Rank = (1:size(Worst,1))';
Worst = cat(2,Rank,Worst);
Rank = (1:size(WorstSlope,1))';
WorstSlope = cat(2,Rank,WorstSlope);
disp(Worst);         % Worst integrated NITD contributions
disp(WorstSlope);    % Worst NITD slope contributions

h1 = figure;
set(h1, 'Tag', 'NITDps');
plot(y,NITD_i);
grid;
xlabel('Field Position (mm)');
ylabel('NITD per Surface (K)');
legend(names(:,4:5));
title(['NITD per Surface for T_a = ' num2str(T_a) 'K    T_d = ' num2str(T_d) 'K    T_h = ' num2str(T_h) 'K    r_c = ' num2str(r_c*100) '%']);

h2 = figure;
set(h2, 'Tag', 'TNITD');
plot(y,NITD);
grid;
xlabel('Field Position (mm)');
ylabel('Total NITD (K)');
title(['Total NITD for T_a = ' num2str(T_a) 'K    T_d = ' num2str(T_d) 'K    T_h = ' num2str(T_h) 'K    r_c = ' num2str(r_c*100) '%']);

h3 = figure;
set(h3, 'Tag', 'IrrUni');
plot(y,TD);
grid;
xlabel('Field Position (mm)');
ylabel('TD (K)');
title(['Irradiance Uniformity for T_a = ' num2str(T_a) 'K    T_d = ' num2str(T_d) 'K    T_h = ' num2str(T_h) 'K    r_c = ' num2str(r_c*100) '%']);


% Compute the NITD and TD maximum gradients in kelvins per image diagonal
slup = 2 * max(gradient(NITD,mean(diff(y/max(y)))));   % maximum slope is most upward
sldn = -2 * min(gradient(NITD,mean(diff(y/max(y)))));  % minimum slope is most downward
maxgradNITD = max([slup, sldn]);                       % find the steepest slope

slup = 2 * max(gradient(TD  ,mean(diff(y/max(y)))));   % maximum slope is most upward
sldn = -2 * min(gradient(TD  ,mean(diff(y/max(y)))));  % minimum slope is most downward
maxgradTD = max([slup, sldn]);                         % find the steepest slope

% Display the maximum gradient values
disp(['Maximum Gradient of NITD is ' num2str(maxgradNITD) ' K per Image Diagonal']);
disp(['Maximum Gradient of Image Uniformity is ' num2str(maxgradTD) ' K per Image Diagonal']);

% Now also make narcissus image map for "qualitative" impact of this total NITD and uniformity curve
% We find the distance of the pixel centre from the image centre and set the brightness according to
% the fraction of the image semi-diagonal.
% First find the length of the image semidiagonal in pixels.
semidiag = round(sqrt((xres/2)^2 + (yres/2)^2));

% Now compute the radial distance of the centre of each pixel from the centre of the image
r = max(y) * abs(repmat(1:1:xres, yres, 1) - xres/2 + j * (repmat((1:1:yres)',1, xres) - yres/2)) / semidiag;

% Finally, interpolate TD and NITD on this grid of radii
imTD = interp1(y, TD, r);
imNITD = interp1(y, NITD, r);
imH = interp1(y, H, r);
imH_rho = interp1(y, H_rho, r);

% Perform some scaling and shifting - currently this is not correct to yield a good representation
% SiTF must be taken into account.
% imH and imH_rho are probably the better indication at this stage.
minim = min(min(imTD));
imTD = imTD - minim;
imTD = imTD/max(max(imTD));

minim = min(min(imNITD));
imNITD = imNITD - minim;
imNITD = imNITD/max(max(imNITD));

% imH = 0.75 * imH/max(max(imH));
% imH_rho = 0.75 * imH_rho/max(max(imH_rho));

% Display the image non-uniformity representations
figure;
imshow(imTD);
title(['Total Image Uniformity for T_a = ' num2str(T_a) 'K    T_d = ' num2str(T_d) 'K    T_h = ' num2str(T_h) 'K']);

figure;
imshow(imNITD);
title(['NITD Uniformity for T_a = ' num2str(T_a) 'K    T_d = ' num2str(T_d) 'K    T_h = ' num2str(T_h) 'K']);

% figure;
% imshow(imH);
% title(['Image Irradiance for T_a = ' num2str(T_a) 'K    T_d = ' num2str(T_d) 'K    T_h = ' num2str(T_h) 'K']);
% xlabel('Note : \rho is neglected');

% figure;
% imshow(imH_rho);
% title(['Image Irradiance for T_a = ' num2str(T_a) 'K    T_d = ' num2str(T_d) 'K    T_h = ' num2str(T_h) 'K']);
% xlabel('Note : \rho is included');

% Save the images for later reference

imwrite(imTD, [NarcDir 'FieldUniformity.jpg']);
imwrite(imNITD, [NarcDir 'NITDUniformity.jpg']);
% imwrite(imH, [NarcDir 'ImageIrradianceWithoutRho.jpg']);
% imwrite(imH_rho, [NarcDir 'ImageIrradianceWithRho.jpg']);

% Set up results to pass back
Results.Revision = Revision;        % Revision of NarcWiz which produced this output
Results.RevDate = RevDate;          % Date of Revision which produced this output
Results.LensFile = LensFilePath;    
Results.LensDir = LensDir;
Results.NarcDir = NarcDir;
Results.Worst = (cat(1, {'Rank', 'Surface Number', 'Contribution', 'YNI'}, num2cell(Worst)))';
Results.WorstSlope = (cat(1, {'Rank', 'Surface Number', 'Slope', 'YNI'}, num2cell(WorstSlope)))';
Results.T_a = T_a;    % Ambient scene temperature
Results.T_d = T_d;    % Internal dewar temperature
Results.T_h = T_h;    % Camera housing temperature
Results.r_c = r_c*100;% Reflectivity of the cold stop
Results.D_c = R_c*2;  % Diameter of the cold stop
Results.D_wo = R_wo*2;% Outer window clear aperture diameter
Results.D_wi = R_wi*2;% Inner window clear aperture diameter
Results.Units = Units;% Lens dimensional units
Results.maxgradNITD = maxgradNITD;      % Maximum gradient of total NITD
Results.maxgradTD = maxgradTD;          % Maximum gradient of total image non-uniformity
Results.maxgradNITD_i = maxgradNITD_i;  % Maximum gradient of surface contributions to NITD





?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线欧美日韩精品| 成人欧美一区二区三区白人| 国产欧美日韩精品a在线观看| 亚洲欧美国产高清| 精品一区二区三区在线观看国产| 97久久久精品综合88久久| 日韩午夜av电影| 亚洲一二三区视频在线观看| 国产成人av网站| 日韩一区二区精品在线观看| 一区二区三区久久| 波多野结衣精品在线| 26uuu久久天堂性欧美| 亚欧色一区w666天堂| 91麻豆精品在线观看| 久久精品亚洲精品国产欧美kt∨| 日韩精品成人一区二区在线| 91在线精品一区二区三区| 久久久久久99久久久精品网站| 天天操天天色综合| 在线免费亚洲电影| 亚洲精品亚洲人成人网| 成人黄色在线视频| 中文字幕 久热精品 视频在线| 久久不见久久见中文字幕免费| 欧美疯狂做受xxxx富婆| 亚洲综合一区二区精品导航| 99re6这里只有精品视频在线观看| 国产精品网站在线观看| 高清成人在线观看| 国产人成亚洲第一网站在线播放| 国产美女精品在线| 久久久国产精华| 国产成人午夜电影网| 国产欧美日韩在线| 成人av电影免费在线播放| 国产精品污www在线观看| 成人手机电影网| 国产精品亲子伦对白| www.视频一区| 亚洲制服丝袜一区| 欧美日韩综合在线| 蜜桃视频在线观看一区二区| 91精品国产欧美一区二区| 久久99精品国产91久久来源| 久久人人97超碰com| 国产精品一二一区| 综合欧美一区二区三区| 欧美视频在线一区二区三区| 天天操天天综合网| 亚洲精品在线电影| 成人av在线一区二区三区| 亚洲三级电影网站| 91精品国产品国语在线不卡| 国产在线精品一区二区三区不卡| 久久久久久久久一| 色综合天天综合网天天狠天天| 亚洲国产视频在线| 久久综合资源网| 91视频观看视频| 日韩电影免费在线看| 久久综合久久综合久久| 91色porny在线视频| 日韩二区三区四区| 欧美国产欧美综合| 欧美巨大另类极品videosbest | 久久蜜桃一区二区| 成人的网站免费观看| 亚洲成人av一区二区| 337p日本欧洲亚洲大胆精品| 97se亚洲国产综合自在线不卡| 亚洲国产成人高清精品| 国产午夜精品理论片a级大结局| 一本一道久久a久久精品| 久久草av在线| 夜夜精品浪潮av一区二区三区| 精品日韩一区二区| 91久久精品一区二区| 激情文学综合丁香| 亚洲愉拍自拍另类高清精品| 久久综合狠狠综合久久综合88 | 国产精品久久久久精k8| 欧美日韩国产另类一区| 国产盗摄女厕一区二区三区 | 91社区在线播放| 寂寞少妇一区二区三区| 亚洲一区二区三区激情| 国产色91在线| 日韩一级片在线观看| 欧美视频一区二区三区在线观看| 福利一区二区在线观看| 久久精品国产久精国产| 亚洲国产成人精品视频| ...xxx性欧美| 国产精品午夜免费| 欧美大片日本大片免费观看| 欧美日韩色一区| 色婷婷av一区二区三区gif | 亚洲国产日韩精品| 亚洲欧洲99久久| 亚洲国产高清aⅴ视频| 日韩精品在线一区| 91精品国产91久久久久久一区二区 | 国产乱子伦一区二区三区国色天香| 亚洲综合久久久| **欧美大码日韩| 国产精品久久久久三级| 久久久国产精品不卡| 精品久久久网站| 精品少妇一区二区| 日韩精品一区二区三区swag| 欧美精品自拍偷拍动漫精品| 在线观看日韩国产| 91国在线观看| 欧美图区在线视频| 在线一区二区三区四区| 在线视频国内一区二区| 色94色欧美sute亚洲13| 欧美综合色免费| 欧美日韩一区二区在线观看| 欧美日韩视频在线一区二区| 欧美久久一二三四区| 日韩视频在线永久播放| 欧美大片国产精品| 国产偷国产偷精品高清尤物| 亚洲国产成人在线| 亚洲人成亚洲人成在线观看图片 | 日韩一区二区三| 日韩欧美中文字幕一区| 日韩精品一区二区三区视频播放| 欧美成人综合网站| 久久久久久亚洲综合影院红桃| 久久久久成人黄色影片| 亚洲欧洲国产日本综合| 亚洲自拍都市欧美小说| 五月天婷婷综合| 狠狠色丁香久久婷婷综| 成人丝袜高跟foot| 91福利资源站| 欧美r级在线观看| 国产精品网曝门| 亚洲丰满少妇videoshd| 麻豆精品蜜桃视频网站| 国产凹凸在线观看一区二区| 色综合久久66| 日韩欧美二区三区| 视频一区二区中文字幕| 九九热在线视频观看这里只有精品| 国产精品 欧美精品| 日本大香伊一区二区三区| 欧美一区二区三区在线视频| 国产日产欧美精品一区二区三区| 亚洲女同ⅹxx女同tv| 蜜臀av一区二区在线观看| 成人免费的视频| 91麻豆精品国产91久久久资源速度 | 成人精品视频.| 欧美艳星brazzers| 久久亚洲欧美国产精品乐播| 亚洲视频一区二区免费在线观看| 日韩精品亚洲专区| caoporn国产一区二区| 欧美日韩国产大片| 中国色在线观看另类| 免费看黄色91| 91黄色激情网站| 国产亚洲成年网址在线观看| 亚洲国产成人av| 99久久99久久久精品齐齐| 精品女同一区二区| 亚洲bdsm女犯bdsm网站| 成人动漫av在线| 2021国产精品久久精品| 天涯成人国产亚洲精品一区av| 国产成人在线视频网站| 91麻豆精品91久久久久久清纯| 国产精品视频yy9299一区| 久久丁香综合五月国产三级网站| 色婷婷国产精品| 国产精品久久久久久久久久久免费看 | 色吧成人激情小说| 日本一区二区视频在线观看| 欧美aaa在线| 欧美日韩免费一区二区三区视频 | 一区二区三区中文在线观看| 国产美女在线观看一区| 欧美一区二区三区啪啪| 亚洲国产日日夜夜| 色哟哟在线观看一区二区三区| 久久蜜桃av一区二区天堂| 婷婷久久综合九色综合绿巨人 | 欧美人体做爰大胆视频| 亚洲另类在线制服丝袜| 97超碰欧美中文字幕| 中文幕一区二区三区久久蜜桃| 国产在线精品一区二区三区不卡| 日韩一区二区三区精品视频| 9l国产精品久久久久麻豆| 久久久99精品免费观看| 国产成人精品综合在线观看|