Skip to content
Snippets Groups Projects
xtomo_geometry.m 9.48 KiB
function [fans,vangle,xchord,ychord,aomega,angfact]=xtomo_geometry(i_detec,fans)

% ----[anton.public]
%
% function 
%
% [fans,vangle,xchord,ychord,aomega,angfact]=xtomo_geometry(i_detec,fans);
% 
%	inputs: 
%
%  i_detec:	=2: Xtomo prototype cameras (shot# < 6768)
%		=1: Xtomo 9-cameras	    (shot# > 682x)
%
%	outputs:
%
%  fans:    camera switch, 1=on,0=off (1x10)
%  vangle:  angle between detect. surface normal and pos. x-axis (1x10)
%  xchord:  two x-coordinates (2xnl) and
%  ychord:  two y-coord. for each line (2xnl), they specify start + end points
%  aomega:  etendue in mm^2 x steradians
%  angfact: angular factors, inverse of relative etendue (throughput) (20x10)
%
%	uses:
%		AOMEGA=etendue_n2(b1x,b1y,b1z,b2x,b2y,b2z,z01,z02,X0,cw);
%		angular_fact_*.mat , '*'=i_detec
%  
%
%---------------- M.Anton 14/3/95 -------------------------------------------

disp('*----------------------------*')
disp('|   this is xtomo_geometry   |')
disp('*----------------------------*')

global xap yap xdet ydet
global ae da
% ======== tokamak parameters ================================================

load tcv_vesc1




xcont=rzvin(:,1);
ycont=rzvin(:,2);
xmin=min(xcont);
ymin=min(ycont);
xmax=max(xcont);
ymax=max(ycont);
xedge=100;
yedge=60;
          



% =========  detector parameters =============================================

if i_detec==2

	cw=1;                         % detector numbers cw=1:clockwise cw=0:ccw

	if nargin<2
		fans=[0 0 0 0 0 0 1 0 1 0];   % camera switch
	end

	vangle=[90 90 90 0 0 0 0 -90 -90 -90];
                                % angle of detector surface normal 
	xpos=[0 0 0 0 0 0  118.05 0 87.84 0]; 
                                % x position of the diaphragmas in [cm]
	ypos=[0 0 0 0 0 0 -46 0 -80.45 0];
                                % y position of the diaphragmas in [cm]