Transmission Telescope Optical Dynamic Allignment

Citation Author(s):
Viviana
Vladutescu
NYCCT/ELI-NP
Submitted by:
Viviana Vladutescu
Last updated:
Sat, 06/20/2020 - 13:28
DOI:
10.21227/sdn8-j840
Data Format:
License:
90 Views
Categories:
Keywords:
0
0 ratings - Please login to submit your rating.

Abstract 

Level 2 data set. Averaging over multiple measurements were performed to reduce electronic noise and jitter

Instructions: 

%Program developed by Viviana Vladutescu for iROC alignment 3/30/2018

clc 

clear all

close all

fontSize=14;

 

load('Distances.mat')

 

% xlswrite('Distances.xlsx', Distances)

%Distances=[dist_STIF_av; dist_STIF_std; dist_PixSen_av; dist_PixSen_std; pi_pos_X_av; pi_pos_X_std; pi_pos_Y_av;... 

 %   pi_pos_Y_std; con_X_av; con_X_std; con_Y_av; con_Y_std; con2_X_av; con2_X_std; con2_Y_av; con2_Y_std];

 

 m=36;

 

dist_STIF_av=Distances(1,:);

 dist_STIF_std=Distances(2,:);

 dist_PixSen_av=Distances(3,:);

 dist_PixSen_std=Distances(4,:);

 pi_pos_X_av=Distances(5,:);

 pi_pos_X_std=Distances(6,:);

 pi_pos_Y_av=Distances(7,:);

 pi_pos_Y_std=Distances(8,:);

 con_X_av=Distances(9,:);

 con_X_std=Distances(10,:);

 con_Y_av=Distances(11,:);

 con_Y_std=Distances(12,:);

 con2_X_av=Distances(13,:);

 con2_X_std=Distances(14,:);

 con2_Y_av=Distances(15,:);

 con2_Y_std=Distances(16,:);

 

  col=find(dist_PixSen_av);

  figure(1)

 surface([dist_PixSen_av;dist_PixSen_av],[dist_STIF_av;dist_STIF_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

     xlabel('DistPixSen', 'FontSize',fontSize)

   ylabel('DistSTIF','FontSize', fontSize)

   title('DistPixSen vs. DistSTIF','FontSize', fontSize)

   grid on

% surface([x;x],[y;y],[z;z],[col;col],...

%         'facecol','no',...

%         'edgecol','interp',...

%         'linew',2);

    

 figure(2)

 

 subplot(2,2,1)

   errorbar(dist_PixSen_av, dist_STIF_av,dist_STIF_std,'ro-')

   hold on

   surface([dist_PixSen_av;dist_PixSen_av],[dist_STIF_av;dist_STIF_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

   xlabel('DistPixSen', 'FontSize',fontSize)

   ylabel('DistSTIF','FontSize', fontSize)

   title('DistPixSen vs. DistSTIF','FontSize', fontSize)

   legend('X')

   grid on

 

  

 subplot(2,2,2)

   errorbar(dist_PixSen_av,pi_pos_X_av,pi_pos_X_std,'k^-')

   hold on

   surface([dist_PixSen_av;dist_PixSen_av],[pi_pos_X_av;pi_pos_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

%     hold on

%    plot(dist_PixSen_avcalc,pi_pos_X_av,'r:')

   xlabel('DistPixSen','FontSize', fontSize)

   ylabel('PiPosX','FontSize', fontSize)

   legend('X')

   title('DistPixSen vs. PiPosX','FontSize', fontSize)

   grid on

   

%    subplot(2,2,3)

%    errorbar(dist_PixSen_av,pi_pos_Y_av,pi_pos_Y_std,'b<:')

%    hold on

%    surface([dist_PixSen_av;dist_PixSen_av],[pi_pos_Y_av;pi_pos_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

%    xlabel('DistPixSen','FontSize', fontSize)

%    ylabel('PiPosY','FontSize', fontSize)

%    legend('X','FontSize', fontSize)

%    title('DistPixSen vs. PiPosY','FontSize', fontSize)

%    grid on

   

   subplot(2,2,3)

   errorbar(dist_PixSen_av,con_X_av,con_X_std,'m>-')

   hold on 

   surface([dist_PixSen_av;dist_PixSen_av],[con_X_av;con_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

   xlabel('DistPixSen','FontSize', fontSize)

   ylabel('Con1PosX','FontSize', fontSize)

   legend('X')

   title('DistPixSen vs. Con1X','FontSize', fontSize)

   grid on

   

%    subplot(2,4,5)

%    errorbar(dist_PixSen_av,con_Y_av,con_Y_std,'gx-')

%    hold on

%    surface([dist_PixSen_av;dist_PixSen_av],[con_Y_av;con_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

% %     hold on

% %    plot(dist_PixSen_avcalc,con_Y_av,'r:')

%    xlabel('DistPixSen','FontSize', fontSize)

%    ylabel('Con1PosY','FontSize', fontSize)

%    legend('Y','FontSize', fontSize)

%    title('DistPixSen vs. Con1Y','FontSize', fontSize)

%    grid on

%    

 subplot(2,2,4)

   errorbar(dist_PixSen_av,con2_X_av,con2_X_std,'cv-.')

   hold on 

   surface([dist_PixSen_av;dist_PixSen_av],[con2_X_av;con2_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

   %     hold on

   %    plot(dist_PixSen_avcalc,pi_pos_X_av,'r:')

   xlabel('DistPixSen','FontSize', fontSize)

   ylabel('Con2PosX','FontSize', fontSize)

   legend('X')

   title('DistPixSen vs. Con2X','FontSize', fontSize)

   grid on

%     subplot(2,4,7)

%    errorbar(dist_PixSen_av,con2_Y_av,con2_Y_std,'kp-')

%    hold on

%    surface([dist_PixSen_av;dist_PixSen_av],[con2_Y_av;con2_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

% %    hold on

% %    plot(dist_PixSen_avcalc,con2_Y_av,'r:')

%    xlabel('DistPixSen','FontSize', fontSize)

%    ylabel('Con2PosY','FontSize', fontSize)

%    legend('Y','FontSize', fontSize)

%    title('DistPixSen vs. Con2Y','FontSize', fontSize)

%    grid on

  

   figure(3)

   

   subplot(2,2,1)

   errorbar(dist_STIF_av,dist_PixSen_av,dist_PixSen_std,'ro-')

   hold on

   surface([dist_STIF_av;dist_STIF_av],[dist_PixSen_av;dist_PixSen_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

%     hold on

%    plot(dist_STIF_avcalc,dist_PixSen_avcalc,'r:')

   xlabel('DistSTIF', 'FontSize',fontSize)

   ylabel('DistPixSens','FontSize', fontSize)

   title('DistSTIF vs. DistPixSens','FontSize', fontSize)

      legend('DistSTIF')

   hold on

    grid on

   

    subplot(2,2,2)

   errorbar(dist_STIF_av,pi_pos_X_av,pi_pos_X_std,'k^-')

   surface([dist_STIF_av;dist_STIF_av],[pi_pos_X_av;pi_pos_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

%     hold on

%    plot(dist_STIF_avcalc,pi_pos_X_av,'r:')

   xlabel('DistSTIF','FontSize', fontSize)

   ylabel('PiPosX','FontSize', fontSize)

   legend('PiPosX')

   title('DistSTIF vs. PiPosX','FontSize', fontSize)

   grid on

  

%    subplot(2,2,3)

%    errorbar(dist_STIF_av,pi_pos_Y_av,pi_pos_Y_std,'b<:')

%    surface([dist_STIF_av;dist_STIF_av],[pi_pos_Y_av;pi_pos_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

% %    hold on

% %     plot(dist_STIF_avcalc,pi_pos_Y_av,'r:')

%    xlabel('DistSTIF','FontSize', fontSize)

%    ylabel('PiPosY','FontSize', fontSize)

%    legend('PiPosY')

%    title('DistSTIF vs. PiPosY','FontSize', fontSize)

%    grid on

   subplot(2,2,3)

   errorbar(dist_STIF_av,con_X_av,con_X_std,'m>-')

   hold on 

   surface([dist_STIF_av;dist_STIF_av],[con_X_av;con_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

%     hold on

%    plot(dist_STIF_avcalc,con_X_av,'r:')

   xlabel('DistSTIF','FontSize', fontSize)

   ylabel('Con1PosX','FontSize', fontSize)

   legend('Con1PosX')

   title('DistPixSen vs. Con1X','FontSize', fontSize)

   grid on

%    subplot(2,4,5)

%    errorbar(dist_STIF_av,con_Y_av,con_Y_std,'gx-')

%    hold on

%    surface([dist_STIF_av;dist_STIF_av],[con_Y_av;con_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

% %    hold on

% %    plot(dist_STIF_avcalc,con_Y_av,'r:')

%    xlabel('DistSTIF','FontSize', fontSize)

%    ylabel('Con1PosY','FontSize', fontSize)

%    legend('Y','FontSize', fontSize)

%    title('DistSTIF vs. Con1Y','FontSize', fontSize)

%    grid on

    

subplot(2,2,4)

   errorbar(dist_STIF_av,con2_X_av,con2_X_std,'cv-.')

   hold on

   surface([dist_STIF_av;dist_STIF_av],[con2_X_av;con2_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

%    hold on

%    plot(dist_STIF_avcalc,con2_X_av,'r:')

   xlabel('DistSTIF','FontSize', fontSize)

   ylabel('Con2PosX','FontSize', fontSize)

   legend('Con2PosX')

   title('DistSTIF vs. Con2X','FontSize', fontSize)

   grid on

   %     subplot(2,4,7)

%    errorbar(dist_STIF_av,con2_Y_av,con2_Y_std,'kp-')

%    surface([dist_STIF_av;dist_STIF_av],[con2_Y_av;con2_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

% %     hold on

% %    plot(dist_STIF_avcalc,con2_Y_av,'r:')

%    xlabel('DistSTIF','FontSize', fontSize)

%    ylabel('Con2PosY','FontSize', fontSize)

%    legend('Y','FontSize', fontSize)

%    title('DistSTIF vs. Con2Y','FontSize', fontSize)

%    grid on\

   figure (4)

   

   subplot(2,1,1) 

   

   rel_err_DSTIF_DPix=((dist_STIF_av-dist_PixSen_av)./dist_STIF_av).*100;

    surface([dist_STIF_av;dist_STIF_av],[rel_err_DSTIF_DPix;rel_err_DSTIF_DPix],...

       [col;col],'facecol','no','edgecol','interp','lines',':','linew',2);

   hold on

   plot(dist_STIF_av,rel_err_DSTIF_DPix,'cv-.')

   xlabel('DistSTIF','FontSize', fontSize)

   ylabel('Relative Error','FontSize', fontSize)

   title('Relative error ','FontSize', fontSize)

%  legend('Rel Error','Fit to Rel Error')

   legend('Relative Error DistSTIF DistPixSens')

    grid on

    

   subplot(2,1,2)  

  rel_err_DPix_DSTIF=((dist_PixSen_av-dist_STIF_av)./dist_PixSen_av).*100;

  surface([dist_PixSen_av;dist_PixSen_av],[rel_err_DPix_DSTIF;rel_err_DPix_DSTIF],...

       [col;col],'facecol','no','edgecol','interp','lines',':','linew',2);

   hold on

   plot(dist_PixSen_av, rel_err_DPix_DSTIF,'cv-.')   

   xlabel('DistPixSen','FontSize', fontSize)

   ylabel('Relative Error','FontSize', fontSize)

   title('Relative error','FontSize', fontSize)

%  legend('Rel Error','Fit to Rel Error')

   legend('Relative Error DistPixSens DistSTIF')

    grid on

 

   

   figure(5)

   

  rel_err_con1X_2X=((con_X_av-con2_X_av)./con_X_av).*100;

    

  surface([dist_STIF_av;dist_STIF_av],[rel_err_con1X_2X;rel_err_con1X_2X],...

       [col;col],'facecol','no','edgecol','interp','lines',':','linew',2);

  hold on

   plot(dist_STIF_av,rel_err_con1X_2X,'cv-.')

   xlabel('DistSTIF','FontSize', fontSize)

   ylabel('Relative Error','FontSize', fontSize)

   title('Relative error','FontSize', fontSize)

%  legend('Rel Error','Fit to Rel Error')

   legend('Relative Error Con1X to Con2X')

    grid on

    

    

 figure(6)

 

  subplot(2,1,1)

   %semilogy(dist_PixSen_av, dist_STIF_av,'ro-',dist_PixSen_av,pi_pos_X_av,'k^-',dist_PixSen_av,pi_pos_Y_av,'b<:',dist_PixSen_av,con_X_av,'m>-',dist_PixSen_av,con_Y_av,'gx-',dist_PixSen_av,con2_X_av,'cv-.',dist_PixSen_av,con2_Y_av,'kp-')

    semilogy(dist_PixSen_av, dist_STIF_av,'ro-',dist_PixSen_av,pi_pos_X_av,'k^-',dist_PixSen_av,con_X_av,'m>-',dist_PixSen_av,con2_X_av,'cv-.')

   xlabel('DistPixSen','FontSize', fontSize)

   ylabel('Instrument position','FontSize', fontSize)

  % legend('DistSTIF','PiPosX','PiPosY','Con1X','Con1Y','Con2X','Con2Y','FontSize', fontSize)

    legend('DistSTIF','PiPosX','Con1X','Con2X','FontSize', fontSize)

   title('All Instrum.Pos. vs. DistPixSens','FontSize', fontSize)   

   grid on

%    plot(dist_PixSen_av,con_Y_av)

%    title('DistPixSen vs. Con1Y','Fontsize',fontSize)

   subplot(2,1,2)

   %semilogy(dist_STIF_av,dist_PixSen_av,'ro-',dist_STIF_av,pi_pos_X_av,'k^-',dist_STIF_av,pi_pos_Y_av,'b<:',dist_STIF_av,con_X_av,'m>-',dist_STIF_av,con_Y_av,'gx-',dist_STIF_av,con2_X_av,'cv-.',dist_STIF_av,con2_Y_av,'kp-')

   semilogy(dist_STIF_av,dist_PixSen_av,'ro-',dist_STIF_av,pi_pos_X_av,'k^-',dist_STIF_av,con_X_av,'m>-',dist_STIF_av,con2_X_av,'cv-.')

   xlabel('DistSTIF','FontSize', fontSize)

   ylabel('Instrument Position','FontSize', fontSize)

   legend('DistPixSens','PiPosX','PiPosY','Con1X','Con2X','FontSize', fontSize)

   legend('DistPixSens','PiPosX','Con1X','Con2X','FontSize', fontSize)

   title('DistSTIF vs. All Instrum Positions','FontSize', fontSize)   

   grid on

   

   figure(7)

   subplot(2,1,1)

   errorbar(pi_pos_X_av,con_X_av,con_X_std,'g+-')

   hold on 

   surface([pi_pos_X_av;pi_pos_X_av],[con_X_av;con_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

%     hold on

%    plot(pi_pos_X_av,con_X_av,'r:')

   xlabel('PiPosX','FontSize', fontSize)

   ylabel('Con1PosX','FontSize', fontSize)

   legend('X-X')

   title('PiPosX vs. Con1PosX','FontSize', fontSize)

   axis tight

   grid on

   

%    subplot(2,2,2)

%    errorbar(pi_pos_Y_av,con_Y_av,con_Y_std,'kh-')

%    hold on 

%    surface([pi_pos_Y_av;pi_pos_Y_av],[con_Y_av;con_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

%    xlabel('PiPosY','FontSize', fontSize)

%    ylabel('Con1PosY','FontSize', fontSize)

%    legend('Y-Y','FontSize', fontSize)

%    title('PiPosY vs. Con1PosY','FontSize', fontSize)

%    axis tight

%    grid on

   

   subplot(2,1,2)

   errorbar(pi_pos_X_av,con2_X_av,con2_X_std,'g+-')

   hold on 

   surface([pi_pos_X_av;pi_pos_X_av],[con2_X_av;con2_X_av],[col;col],...

         'facecol','no','edgecol','interp','linew',2);

%      hold on

%    plot(pi_pos_X_av,con2_X_avcalc,'r:')

   xlabel('PiPosX','FontSize', fontSize)

   ylabel('Con2PosX','FontSize', fontSize)

   legend('X-X')%,'FontSize', fontSize)

   title('PiPosX vs. Con2PosX','FontSize', fontSize)

   axis tight

   grid on

     

%    subplot(2,2,4)

%    errorbar(pi_pos_Y_av,con2_Y_av,con2_Y_std','b^:')

%    hold on 

%    surface([pi_pos_Y_av;pi_pos_Y_av],[con2_Y_av;con2_Y_av],[col;col],...

%          'facecol','no','edgecol','interp','linew',2);

%    xlabel('PiPosY','FontSize', fontSize)

%    ylabel('Con2PosY','FontSize', fontSize)

%    legend('Y-Y')%,'FontSize', fontSize)

%    title('PiPosY vs. Con2PosY','FontSize', fontSize)

%    grid on

   axis tight

   

  

   %mean of stds

   PiXstdMean=nanmean(pi_pos_X_std);

   PiYstdMean=nanmean(pi_pos_Y_std);

   ConXstdMean=nanmean(con_X_std); 

   ConYstdMean=nanmean(con_Y_std);

   Con2XstdMean=nanmean(con2_X_std);

   Con2YstdMean=nanmean(con2_Y_std);

   DistPixSenstdMean=nanmean(dist_PixSen_std);

   DistSTIFstdMean=nanmean(dist_STIF_std);

   

   figure(8)

   

  % plot(1:36,pi_pos_X_std,'k^-',1:36,pi_pos_Y_std,'b<:',1:36,con_X_std,'m>-',1:36,con_Y_std,'kh-',1:36,con2_X_std,'g+-',1:36,con2_Y_std,'kp-',1:36,dist_STIF_std,'ro-',1:36,dist_PixSen_std,'r:')

      plot(1:36,pi_pos_X_std,'k^-',1:36,pi_pos_Y_std,'b<:',1:36,con_X_std,'m>-',1:36,con2_X_std,'g+-',1:36,dist_STIF_std,'ro-',1:36,dist_PixSen_std,'r:')

   xlabel('Step','FontSize', fontSize)

   ylabel('STD','FontSize', fontSize)

%    legend('PiPosX','PiPosY','Con1X','Con1Y','Con2X','Con2Y','DistSTIF','DistPixSen','FontSize', fontSize)

   legend('PiPosX','PiPosY','Con1X','Con2X','DistSTIF','DistPixSen','FontSize', fontSize)

   title('STD','FontSize', fontSize)

   grid on

   axis tight

%    text(15,0.7,{'Mean STDs', 'PiXstdMean=', num2str(PiXstdMean), 'PiYstdMean=', num2str(PiYstdMean),...

%                'Con1XstdMean', num2str(ConXstdMean),'Con1YstdMean', num2str(ConYstdMean),...

%                'Con2XstdMean',num2str(Con2XstdMean),'Con2YstdMean', num2str(Con2YstdMean),...

%                'DistSTIFstdMean', num2str(DistSTIFstdMean),'DistPixSenstdMean', num2str(DistPixSenstdMean),},...

%                'Color','black','FontSize',10)

   text(15,0.7,{'Mean STDs', 'PiXstdMean=', num2str(PiXstdMean), 'PiYstdMean=', num2str(PiYstdMean),... 

       'Con1XstdMean', num2str(ConXstdMean),'Con2XstdMean',num2str(Con2XstdMean),...

       'DistSTIFstdMean', num2str(DistSTIFstdMean),...

       'DistPixSenstdMean', num2str(DistPixSenstdMean),},'Color','black','FontSize',10)

          

%  z1=find(dist_PixSen_av<38);

 z2=find(dist_PixSen_av>20);

 

 

f2= fit(dist_PixSen_av(z2)',dist_STIF_av(z2)','poly2')

fit_f2=0.0005418.*((dist_PixSen_av(z2)').^2)-0.3428.*dist_PixSen_av(z2)'+342.6;

 

rms2=rms(dist_STIF_av(z2)'-fit_f2)

[r2,pval2]=corr(dist_PixSen_av(z2)',dist_STIF_av(z2)')

mdl2=fitlm(dist_PixSen_av(z2)',dist_STIF_av(z2)')

tbl2=anova(mdl2)

 

% corrected_DistSTIF2=dist_STIF_av(z2)'.\fit_f2;

% rel_err2=abs(corrected_DistSTIF2-1); %(relative error=|Theory-Meas|/Theory)

rel_err2=abs(dist_STIF_av(z2)'-fit_f2)./fit_f2;

f_rel_err2= fit(dist_PixSen_av(z2)', rel_err2,'poly2');

fit_rel_err2=(-1.232*10^(-7)).*((dist_PixSen_av(z2)').^2)+(2.488*10^(-5)).*dist_PixSen_av(z2)'+0.0002836; % coefficients from f_rel_err_PiPosX_PixSen

mean_rel_err2=mean(rel_err2)

 

col1=find(dist_PixSen_av(z2))

 

figure(9)

 

  subplot(2,1,1)

     surface([dist_PixSen_av(z2);dist_PixSen_av(z2)],[dist_STIF_av(z2);dist_STIF_av(z2)],[col1;col1],...

         'facecol','no','edgecol','interp','lines',':','linew',2);

     hold on 

    plot(f2,dist_PixSen_av(z2),dist_STIF_av(z2),'bd')%,dist_PixSen_av(z),FitSTIF,'^k')

      

    xlabel('DistPixSen','FontSize', fontSize)

    ylabel('DistSTIF','FontSize', fontSize)

    title('Distance and Fitting Lines to distances between beams on STIF relative to PixSen','FontSize', fontSize)

    legend('DistSTIF','DistSTIF','Fit')

    grid on

 

 subplot(2,1,2)

  surface([dist_STIF_av(z2);dist_STIF_av(z2)],[rel_err2';rel_err2'],[col1;col1],...

         'facecol','no','edgecol','interp','lines',':','linew',2);

     hold on

    plot(dist_STIF_av(z2), rel_err2','r*',dist_STIF_av(z2), fit_rel_err2','r-')

    xlabel('DistSTIF','FontSize', fontSize)

    ylabel('Relative Error','FontSize', fontSize)

    title('Relative error of fit of distance on STIF relative to PixSen','FontSize', fontSize)

    legend('Relative Error','Relative Error','Fit')

    grid on

 

% repeat the fit for pix sensor (as y) and pi_pos_X_av with fit_f from pix sens

 

f2_PiPosX_PixSen= fit(dist_PixSen_av(z2)',pi_pos_X_av(z2)','poly2')

fit_f2_PiPosX_PixSen=0.009709.*((dist_PixSen_av(z2)').^2)-12.84.*dist_PixSen_av(z2)'+2333

 rms2_PiPosX_PixSen_Fit2=rms(pi_pos_X_av(z2)'-fit_f2_PiPosX_PixSen)

 

 rel_err_PiPosX_PixSen=abs(pi_pos_X_av(z2)'-fit_f2_PiPosX_PixSen)./fit_f2_PiPosX_PixSen;

 mean_rel_err_PiPosX_PixSen=mean( rel_err_PiPosX_PixSen);

 

 f_rel_err_PiPosX_PixSen= fit(dist_PixSen_av(z2)', rel_err_PiPosX_PixSen,'poly2');

 fit_rel_err_PiPosX_PixSen=(3.062*10^(-7)).*((dist_PixSen_av(z2)').^2)+(7.746*10^(-7)).*dist_PixSen_av(z2)'+0.008499; % coefficients from f_rel_err_PiPosX_PixSen

% corrected_PixSen_PiPosX=dist_PixSen_av(z2)'.\fit_f2_PixSen_PiPosX;

% rel_err_PixSen_PiPosX=abs(corrected_PixSen_PiPosX-1); %(relative error=|Theory-Meas|/Theory)

 

 

 figure(10)

 

 subplot(2,1,1)

    surface([dist_PixSen_av(z2);dist_PixSen_av(z2)],[pi_pos_X_av(z2);pi_pos_X_av(z2)],[col1;col1],...

         'facecol','no','edgecol','interp','lines',':','linew',2);

    hold on

     plot(f2_PiPosX_PixSen,dist_PixSen_av(z2),pi_pos_X_av(z2),'bd')%,dist_PixSen_av(z),FitSTIF,'^k')

 

    xlabel('DistPixSen','FontSize', fontSize)

    ylabel('PiPosX','FontSize', fontSize)

    title('Distance and Fitting Lines to distances between beams on PixSen relative to PiPosX','FontSize', fontSize)

    legend('PiPosX','PiPosX','Fit')

    grid on

    

  subplot(2,1,2)

      surface([dist_PixSen_av(z2);dist_PixSen_av(z2)],[rel_err_PiPosX_PixSen';rel_err_PiPosX_PixSen'],...

       [col1;col1],'facecol','no','edgecol','interp','lines',':','linew',2);

     hold on 

     plot(dist_PixSen_av(z2),rel_err_PiPosX_PixSen','b^',dist_PixSen_av(z2), fit_rel_err_PiPosX_PixSen','b-')

      xlabel('DistPixSen','FontSize', fontSize)

    ylabel('Relative Error','FontSize', fontSize)

    title('Relative error of fit of distance on PixSen relative to PiPosX','FontSize', fontSize)

    %     legend('Rel Error','Fit to Rel Error')

   legend('Relative Error','Relative Error','Fit')

   grid on

 

Dataset Files

LOGIN TO ACCESS DATASET FILES
Open Access dataset files are accessible to all logged in  users. Don't have a login?  Create a free IEEE account.  IEEE Membership is not required.