% pp_cal_dat_05_07_07

    clear all ; close all ;

    cent = [1024 1024] ;
    calplt = 1 ;
    midp = [] ;
    sp = [] ;
    imt = [] ;

    [ppdir,slash] = getppdir ;
    datdir = ('05_07_07') ;
    scdir = ('Scintilator') ;
    ltdir = ('light_test') ;

    fuldir = ([ppdir slash datdir slash scdir slash]) ;
%    fuldir= 'E:\Pepperpot\PP_05_7_07\Scintilator\';

    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'PP_17Kv_35Kv_0mm_cal_2s.tif'],[29 45],[2011 47],[30 2030],[2009 2030],126,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'PP_17Kv_35Kv_0mm_cal_2s.tif'],[525 542],[? ?],[525 1535],[1515 1536],63,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'PP_17Kv_35Kv_0mm_cal_2s.tif'],[950 966],[1091 967],[950 1108],[1091 1108],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'PP_17Kv_35Kv_0mm_cal_200ms.tif'],[29 46],[2011 47],[29 2031],[2009 2029],126,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'PP_17Kv_35Kv_0mm_cal_200ms.tif'],[525 542],[? ?],[524 1534],[1514 1535],63,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'PP_17Kv_35Kv_0mm_cal_200ms.tif'],[949 967],[1092 967],[950 1108],[1090 1108],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

    fuldir = ([ppdir slash datdir slash ltdir slash]) ;
%    fuldir='E:\Pepperpot\PP_05_7_07\light_test\';

    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_0cm_2s.tif'],[30 47],[2011 47],[29 2032],[2009 2030],126,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_0cm_2s.tif'],[525 543],[? ?],[524 1535],[1515 1536],63,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_0cm_2s.tif'],[950 967],[1090 968],[949 1109],[1090 1108],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_0cm_200ms.tif'],[30 46],[2011 47],[29 2032],[2009 2030],126,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_0cm_200ms.tif'],[527 542],[? ?],[525 1536],[1515 1536],63,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_0cm_200ms.tif'],[950 967],[1092 968],[950 1108],[1090 1109],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_102.11cm_2s.tif'],[32 42],[2014 43],[31 2027],[2011 2026],126,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_102.11cm_2s.tif'],[527 539],[1517 540],[527 1531],[1517 1532],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_102.11cm_2s.tif'],[952 963],[1093 963],[952 1104],[1093 1104],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_102.11cm_200ms.tif'],[31 42],[2013 44],[31 2028],[2011 2027],126,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_102.11cm_200ms.tif'],[527 540],[1517 541],[527 1532],[1518 1533],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_102.11cm_200ms.tif'],[952 964],[1093 964],[952 1105],[1093 1106],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_204.22cm_200ms.tif'],[? ?],[? ?],[ ],[ ],126,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_204.22cm_200ms.tif'],[524 536],[1515 537],[524 1528],[1514 1528],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_204.22cm_200ms.tif'],[950 959],[1090 959],[949 1101],[1090 1101],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_204.22mm_2s.tif'],[? ?],[ ],[ ],[ ],126,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_204.22mm_2s.tif'],[524 536],[1514 536],[523 1529],[1513 1528],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_204.22mm_2s.tif'],[949 959],[1090 959],[949 1101],[1089 1101],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_306.33mm_2s.tif'],[ ],[? ?],[ ],[ ],126,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_306.33mm_2s.tif'],[518 533],[1508 535],[518 1526],[1508 1527],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_306.33mm_2s.tif'],[943 957],[1084 957],[942 1099],[1083 1099],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_306.33mm_100ms.tif'],[ ],[ ],[ ],[? ?],126,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_306.33mm_100ms.tif'],[518 533],[1508 535],[518 1526],[1508 1527],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_306.33mm_100ms.tif'],[943 957],[1084 958],[943 1099],[1083 1100],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_408.44mm.tif'],[ ],[ ],[ ],[? ?],126,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_408.44mm.tif'],[517 531],[1508 532],[517 1524],[1508 1525],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_408.44mm.tif'],[942 955],[1084 955],[942 1097],[1083 1097],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

%    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_408.44mm_200ms.tif'],[],[? ?],[ ],[ ],126,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_408.44mm_200ms.tif'],[517 532],[1508 532],[516 1525],[1507 1525],63,calplt) ;
    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;
    [midpos,sp2sp,imtilt] = ppcalfindmm([fuldir 'pp_test_LEDs_408.44mm_200ms.tif'],[942 956],[1083 956],[941 1098],[1083 1098],9,calplt) ;
%    midp = [midp; midpos] ; sp = [sp; sp2sp] ; imt = [imt; imtilt] ;

    midp
    sp
    imt

    return

