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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? narcwiz.m

?? zemax與matlab調(diào)用程序
?? M
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
function Results = NarcWiz
% NarcWiz - Narcissus analysis wizard
%
% Usage : NarcOut = NarcWiz      % NarcOut is case sensitive
%         report narcissus
%
% Takes the user through a narcissus analysis of the lens in the ZEMAX DDE server. NarcOut is a
% structure containing various items required for the report generator, so the function must be
% called exactly as shown above. The report will be generated in rich text format (.rtf) and
% displayed in MS Word.
%
% The general restrictions and assumptions are as follows :
% 1) The lens model to be analysed is for a 3rd generation thermal imager using a cooled detector
%    which has a cold stop. The cold stop is assumed to be at the surface before the image surface
%    and the detector window is assumed to come before the cold stop. Clear apertures of these
%    objects must be set correctly.
% 2) The inside of the dewar has emissivity of 1 all over and across the spectral band.
% 3) The side of the cold stop facing outward has a user-defined emissivity and the same temperature
%    as the inside of the dewar right out to the clear aperture of the dewar window.
% 4) Emissions and reflections of thermal radiation by non-optical surfaces are lambertian.
% 5) Lens must be single configuration. Save and analyse each configuration seperately, taking
%    special care to ensure that the apertures are as they would be for the system as-built. It is
%    particularly important that the clear aperture of the dewar window is correctly set from
%    mechanical drawings of the dewar.
% 6) Only rotationally symmetrical lenses are currently handled - mainly a
%    retriction of the ZEMAX functions used for the computation. The whole
%    approach to the problem would have to change significantly to cater
%    for non-symmetrical systems.
%
% The general functions performed are as follows :
% 1) Create a directory named after the lens to be analysed in which all results will be saved. The
%    directory name will have the .Narcissus extension.
% 2) Ensure that the system is correctly set up, has clear apertures and coatings defined. Currently this is
%    done by appealing to the users's sense of thoroughness.
% 3) Compute system transmission, YNI contributions and uniformity of image illumination.
% 4) Reverse the lens and create single bounce ghost reflection models for each optical surface.
% 5) Compute the Narcissus-Induced Delta T contributions for each surface.
% 6) Plot total NITD, NITD per surface and overall image irradiance uniformity per configuration.
% 7) Generate subjective images of image non-uniformity.
% 8) Rank surfaces in order of contribution to NITD and tabulate with YNI contributions.
% 9) Compute maximum slope of total NITD and overall image non-uniformity. This gives an indication
%    of the local visibility of the image non-uniformities.
% 10) If the user gives the command 'report narcissus', a report will be generated in MS Word,
%     containing all of the outputs.
%
% Possible return values for NarcWiz are
%  0 - Everything seems to be OK
% -1 - ZEMAX not running and could not start ZEMAX.
% -2 - The lens you wanted to analyse cannot be raytraced.
% -3 - Lens has fewer than 6 surfaces. Detector + cold stop + window + 2 additional lens surfaces is
%      six at least.
% -4 - Lens does not operate primarily in a thermal band.
% -5 - Lens is multi-config. Currently we only do single config. Save and analyse each config
%      seperately.
% -6 - User cancelled wizard.
% -7 - Double bounce ghost lenses were encountered - restart analysis.
% -8 - Lens has wrong field type. Change to "real image height".

% MZDDE - The ZEMAX DDE Toolbox for Matlab.
% Copyright (C) 2002-2004 Defencetek, CSIR
% Contact : dgriffith@csir.co.za
% 
% This file is part of MZDDE.
% 
%  MZDDE is free software; you can redistribute it and/or modify
%  it under the terms of the GNU General Public License as published by
%  the Free Software Foundation; either version 2 of the License, or
%  (at your option) any later version.
%
%  MZDDE is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%  GNU General Public License for more details.
%
%  You should have received a copy of the GNU General Public License
%  along with MZDDE (COPYING.html); if not, write to the Free Software
%  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
%



% $Revision: 1.4 $
% $Author: dgriffith $

Revision = '$Revision: 1.4 $';
Revision = Revision(11:(size(Revision,2)-1));
disp(['Narcissus Analysis Wizard. Version' Revision]);
RevDate = '$Date: 2005-04-22 09:35:38+02 $';
RevDate = RevDate(7:(size(RevDate,2)-1));
disp(['Copyright Defencetek, CSIR,' RevDate]);

NarcIcon=1:64; NarcIcon=(NarcIcon'*NarcIcon)/64; % Make an icon for use with dialogs

Results.Status = zDDEInit; % Attempt to contact ZEMAX through DDE.
if (Results.Status == -1)        % Failed, try to start ZEMAX and ask user to select the file
    Results.Status = zDDEStart;
    if (Results.Status == 0)     % Success, now do the open file dialog
        uiwait(msgbox('ZEMAX is Starting. Please accept DDE commands from Matlab and open the lens file for Narcissus Analysis.', 'ZEMAX Startup', 'custom', NarcIcon, hot(64),'modal'))
        zOpenWindow('Ope'); zWindowMaximize(0);
    end
end
if (Results.Status == -1) return; end; % Give up

while (zGetRefresh == -2); end;       % Wait for user to accept DDE messaging and open the lens file

if (zGetRefresh ~= 0) 
    uiwait(msgbox('The lens you are attempting to analyse cannot be raytraced.', 'Fatal Lens Error', 'error', 'modal'));
    Results.Status = -2;
    return; % Give up
end
zPushLens(10);
while (zGetRefresh == -2); end;       % Wait for user to accept DDE messaging and open the lens file

% Get some lens data, including the wavelengths and the number of lens surfaces.
LenSys = zsGetSystem;
if (LenSys.numsurfs < 6)
    uiwait(msgbox('The lens you are attempting to analyse has less than 6 Surfaces.', 'Fatal Lens Error', 'error', 'modal'));
    Results.Status = -3;
    return;
end

% Check that the field type is set to "real image height"
FieldData = zGetField(0); FieldType = FieldData(1);
if (FieldType ~= 3)
    uiwait(msgbox('The lens you are attempting to analyse has the wrong field type. Change field type to "Real Image Height"', 'Fatal Lens Error', 'error', 'modal'));
    Results.Status = -8;
    return;
end;

PrimaryWave = zGetWave(0); NumberWaves = PrimaryWave(2); PrimaryWave = PrimaryWave(1);
PrimaryWaveLength = zGetWave(PrimaryWave); % Get the primary wavelength

if (PrimaryWaveLength(1) < 1) | (PrimaryWaveLength(1) > 14)
    uiwait(msgbox('The primary wavelength for this lens seems to be out of the normal thermal bands.', 'Fatal Lens Error', 'error', 'modal'));
    Results.Status = -4;
    return;
end

% By now we think there is a useable lens in the ZEMAX DDE server, and we start with analysis.

% Firstly find the location of the lens and create a directory for Narcissus analysis output
% The directory has the same name as the lens file, but has the extension .Narcissus
LensFilePath = zGetFile; 
[LensDir, LensFile] = fileparts(LensFilePath);
[Success, Message, MessageID] = mkdir(LensDir, [LensFile '.Narcissus']);
NarcDir = [LensDir '\' LensFile '.Narcissus\'];

% If directory already exists
if (strcmp(MessageID, 'MATLAB:MKDIR:DirectoryExists'))
     % uiwait(msgbox('The .Narcissus directory for this lens already exists. Old Data will be overwritten.', 'Directory Warning', 'custom', NarcIcon, hot(64), 'modal'));
    if (exist([NarcDir 'rho.txt'], 'file'))
      Answer = questdlg('Relative Illumination Data for this lens already exists. Recompute Relative Illumination ?', 'Recalculate Relative Illumination');
      if (strcmp(Answer,'Yes')), delete([NarcDir 'rho.txt']); end; if (strcmp(Answer, 'Cancel')), Results.Status = -6; return; end;
    end;
    if (exist([NarcDir 'nu.txt'], 'file'))
      Answer = questdlg('Vignetting Data for this lens already exists. Recompute Vignetting Data ?', 'Recalculate Veignetting Data');
      if (strcmp(Answer,'Yes')), delete([NarcDir 'nu*.txt']); delete([NarcDir 'cnu*.txt']); end;  if (strcmp(Answer, 'Cancel')), Results.Status = -6; return; end;  
    end;
    delete([NarcDir 'GH*.ZMX']);          % Delete all ghost lenses in this directory
end

% Here we will deal with multiconfiguration lenses. For now just dump the user if the lens is
% multi-config.

ConfigData = zGetConfig;
if (ConfigData(2) > 1)
    uiwait(msgbox('This wizard currently only handles single configuration systems.', 'Fatal Lens Error', 'error', 'modal'));
    Results.Status = -5;
    return;
end

uiwait(msgbox('Please ensure that all lens surfaces have correct clear apertures and coatings. Only then click OK in this message box.', 'Apertures/Coatings', 'custom', NarcIcon, hot(64), 'modal'));

% Get the latest lens
zGetRefresh;
% and save it as 'Primary.zmx' in the analysis directory
zSaveFile([NarcDir 'Primary.zmx']);

% Get some global variables, including the ambient scene temperature, the dewar termperature, the
% housing temperature, and the cold stop reflectivity.
Prompt = {'Scene Temperature (K)', 'Dewar Temperature (K)', 'Camera Housing Temperature (K)', 'Cold Stop Reflectivity (%)'};
DefAns = {'300',                   '120',                   '300',                            '1'                         };
Answer = inputdlg(Prompt, 'Narcissus Wizard : Temperature and Emmissivity Inputs', 1, DefAns);
if (~isempty(Answer))
  T_a = str2double(Answer{1});        % T_a = Scene ambient temperature
  T_d = str2double(Answer{2});        % T_d = Internal Dewar temperature in kelvins
  T_h = str2double(Answer{3});        % T_h = optical housing temperature
  r_c = str2double(Answer{4})/100.0;  % r_c = reflectivity of the outer surface of the cold stop
else
    Results.Status = -6;
    return;
end

% Compute the effective F/number from the size of the cold stop and it's distance from the focal
% plane array.
ImSurf = LenSys.numsurfs;
ColdStopSurf = ImSurf - 1;
SurfDataCode = zSurfDataCodes;
ColdStopSemiDia = zGetSurfaceData(ColdStopSurf, SurfDataCode.semidia);
ColdStopDist = zGetSurfaceData(ColdStopSurf, SurfDataCode.thickness);
F = 1 / (2 * sin(atan(ColdStopSemiDia/ColdStopDist)));

% Now compute axial transmission, image illumination uniformity and YNI contributions.
% To compute axial transmission, trace an axial ray.
PolTraceData = zGetPolTrace(PrimaryWave, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0);
tau_S = PolTraceData(2); % This is axial system transmission. An enhanced version could do better.

% Compute YNI contributions and image uniformity using zGetTextFile
% First the settings file must be located
% Settings for the vignetting and relative illumination data are particularly important
mDir = [fileparts(which('NarcWiz')) '\'];
SettingsFile = [LensDir '\' LensFile '.cfg']; % Get the settings from the originating file
zGetTextFile([NarcDir 'YNIf.txt'], 'Yni', SettingsFile, 1); % Compute and save YNI contributions
BusyMessage = ZEMAXBusy; pause(1); % Display a message telling the user that ZEMAX is busy
while (zDDEBusy), end; % Wait for command to complete
if (~exist([NarcDir 'rho.txt']))
  zGetTextFile([NarcDir 'rho.txt'], 'Rel', SettingsFile, 1); % Compute and save relative illumination
end;
while (zDDEBusy), end; % Wait for command to complete
delete(BusyMessage); % Pack away the message

% The next step is to reverse the lens and patch up
zWindowMaximize(0);
zOpenWindow('Rev'); % Reverse elements
uiwait(msgbox('Switch to ZEMAX and select all lens surfaces for reversal. When done click OK.', 'Reverse Warning', 'custom', NarcIcon, hot(64), 'modal'));
zGetRefresh; % Lens should be reversed now
% Fix up surface 0
zSetSurfaceData(0, SurfDataCode.thickness, ColdStopDist);
% Fix up surface 1 (the cold stop)
zDeleteSurface(1);
zSetSurfaceData(1, SurfDataCode.semidia, ColdStopSemiDia);
zSetAperture(1, 1, 0, ColdStopSemiDia, 0, 0, '');
% Set aperture characteristics
zSetSystemAper(0, 1, ColdStopSemiDia*2);
% Set the field type to object height
FieldData = zGetField(0);
zSetFieldType(1, FieldData(2));

% Fixup coatings
Coating = 'I.99';
LenSys = zsGetSystem;
for Surf = 1:(LenSys.numsurfs),
    if (~strcmp(zGetSurfaceData(Surf, SurfDataCode.glass),zGetSurfaceData(Surf-1, SurfDataCode.glass)))
        zSetSurfaceData(Surf, SurfDataCode.coating, Coating);
    else
        zSetSurfaceData(Surf, SurfDataCode.coating, '');
    end
end

% Remove the aperture from the image surface
zSetAperture(LenSys.numsurfs, 0, 0, 0, 0, 0, '');

% Get the radius of the cold stop
R_c = zGetAperture(1); R_c = R_c(3);

% Get the inner and outer window radii
R_wi = zGetAperture(2); R_wi = R_wi(3);
R_wo = zGetAperture(3); R_wo = R_wo(3);

% Get lens units
switch LenSys.unitcode,
    case 0, Units = 'mm';
    case 1, Units = 'cm';
    case 2, Units = 'in';
    case 3, Units = 'm';
end

zPushLens(10);
% Snatch a picture of the lens for the report
zGetMetaFile([NarcDir 'Primary Reversed.emf'], 'Lay', SettingsFile, 1);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频一区二区三区| 国产偷国产偷亚洲高清人白洁| 精东粉嫩av免费一区二区三区 | 亚洲欧美怡红院| 3d动漫精品啪啪一区二区竹菊| 国产成人aaaa| 日本丰满少妇一区二区三区| 日韩av不卡在线观看| 亚洲欧美日韩综合aⅴ视频| 日韩精品综合一本久道在线视频| 色婷婷精品久久二区二区蜜臀av | 成人app软件下载大全免费| 污片在线观看一区二区| 国产精品久久久久久久蜜臀 | 亚洲最大色网站| 国产精品色眯眯| 精品国产不卡一区二区三区| 欧美日韩中文国产| 91一区二区在线观看| 国产精一品亚洲二区在线视频| 亚洲午夜久久久久久久久电影网| 中文字幕一区二区三区视频| 久久精品视频免费观看| 日韩午夜电影av| 欧美日韩国产另类一区| 91九色最新地址| av在线这里只有精品| 国产成人激情av| 激情综合五月天| 美女任你摸久久 | 99久久精品免费观看| 成人性色生活片免费看爆迷你毛片| 麻豆极品一区二区三区| 麻豆精品一区二区三区| 午夜精品福利一区二区蜜股av| 亚洲精品中文字幕乱码三区| 日韩理论片网站| 亚洲婷婷国产精品电影人久久| 国产精品毛片久久久久久久| 久久麻豆一区二区| 久久精品亚洲乱码伦伦中文| 国产欧美中文在线| 国产日韩欧美综合在线| 国产亲近乱来精品视频| 国产精品视频在线看| 日韩美女视频19| 亚洲精品v日韩精品| 亚洲最新在线观看| 亚洲成人高清在线| 五月天婷婷综合| 免费观看91视频大全| 国产一区视频网站| 不卡免费追剧大全电视剧网站| 日韩精品专区在线影院重磅| 日韩午夜av一区| 精品国产乱码91久久久久久网站| 久久精品一区二区三区四区| 国产精品久久久久久久久动漫| 自拍偷拍欧美激情| 亚洲成人三级小说| 久久精品国产免费| 高清国产一区二区三区| 91在线观看污| 欧美巨大另类极品videosbest| 日韩亚洲电影在线| 中文字幕第一区第二区| 亚洲免费观看高清完整版在线 | 一区二区三区四区中文字幕| 日韩一区欧美二区| 麻豆91在线播放| 国产不卡视频一区| 欧美性受xxxx黑人xyx| 日韩一区二区三免费高清| 久久久久97国产精华液好用吗| 国产精品国产a| 日韩 欧美一区二区三区| 国产露脸91国语对白| 色综合久久久网| 欧美一二三区在线| 国产精品卡一卡二卡三| 日本午夜一区二区| www.av精品| 欧美一级在线观看| 亚洲欧美影音先锋| 免费看欧美女人艹b| 99精品久久99久久久久| 日韩视频国产视频| 伊人夜夜躁av伊人久久| 国产一区二区在线电影| 中日韩免费视频中文字幕| 亚洲精品免费播放| 国产成人综合亚洲网站| 欧美精品久久一区二区三区| 国产精品福利一区二区| 美腿丝袜亚洲一区| 91福利视频网站| 国产日产欧美一区二区三区| 日日骚欧美日韩| 91麻豆.com| 国产亚洲精品资源在线26u| 亚洲国产精品久久久久秋霞影院| 国产精品一色哟哟哟| 91精品国产色综合久久不卡电影 | 一区二区三区产品免费精品久久75| 久久精品国内一区二区三区| 在线精品视频免费播放| 中文字幕成人av| 精品一二三四在线| 欧美人与禽zozo性伦| 亚洲欧美综合另类在线卡通| 国产精品资源网| 日韩情涩欧美日韩视频| 亚洲综合色视频| 成人激情动漫在线观看| 久久综合久久综合九色| 日韩影视精彩在线| 欧美日韩精品一区二区三区蜜桃| 国产精品无人区| 国产成人综合亚洲网站| 欧美大片日本大片免费观看| 日韩国产欧美视频| 欧美日韩亚洲综合一区二区三区| 亚洲色图在线视频| 成人18精品视频| 国产精品萝li| 成人毛片视频在线观看| 久久精品亚洲精品国产欧美| 国产乱码精品一区二区三| 精品日韩一区二区三区免费视频| 日韩经典一区二区| 欧美区视频在线观看| 午夜在线电影亚洲一区| 欧美日韩在线精品一区二区三区激情| 亚洲精品国产一区二区精华液| jlzzjlzz国产精品久久| 亚洲图片欧美激情| 色欧美片视频在线观看| 亚洲综合自拍偷拍| 欧美午夜在线观看| 亚洲国产日日夜夜| 日韩毛片高清在线播放| 99在线视频精品| 一区二区视频免费在线观看| 色综合av在线| 亚洲自拍偷拍av| 制服丝袜亚洲网站| 久88久久88久久久| 久久人人超碰精品| 成人高清视频在线观看| **性色生活片久久毛片| 色综合久久中文综合久久牛| 亚洲国产精品一区二区www在线| 欧美主播一区二区三区| 亚洲aⅴ怡春院| 精品国产凹凸成av人网站| 国产成人综合网| 亚洲欧美日韩综合aⅴ视频| 欧美午夜寂寞影院| 蜜臀a∨国产成人精品| 久久久久久久久久久久电影| 国产99久久久国产精品免费看| 国产精品福利一区二区| 欧美色爱综合网| 久久丁香综合五月国产三级网站 | 亚洲成人动漫在线观看| 欧美老年两性高潮| 韩国成人精品a∨在线观看| 中文字幕精品在线不卡| 在线免费观看日本一区| 久久国产福利国产秒拍| 国产精品国产自产拍高清av| 欧美综合色免费| 久久国产精品无码网站| 成人免费视频在线观看| 欧美人与z0zoxxxx视频| 国产高清精品网站| 玉米视频成人免费看| 2021中文字幕一区亚洲| 色综合天天在线| 久久福利资源站| 亚洲精品视频在线看| 精品久久久久香蕉网| 91麻豆高清视频| 国内外精品视频| 亚洲午夜视频在线| 欧美激情艳妇裸体舞| 91麻豆精品国产91久久久久| 成人av高清在线| 欧美aa在线视频| 亚洲精品视频免费观看| 久久久久久久久久久99999| 欧美天天综合网| 成人免费视频一区二区| 日本在线不卡视频一二三区| 亚洲视频在线一区观看| 久久先锋资源网| 欧美久久一二区| 色www精品视频在线观看| 国产精品12区| 蜜臀av性久久久久av蜜臀妖精 |