Changeset 1056 for trunk


Ignore:
Timestamp:
Jul 18, 2018, 6:02:01 PM (2 years ago)
Author:
sommeria
Message:

extract_multitif_special updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/extract_multitif_special.m

    r1049 r1056  
    135135%% output directory
    136136OutputDir=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]);
    137 
     137OutputDirScan=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]);
    138138%% Timing
    139139% XmlInputFile=Param.ActionInput.XmlFile;
     
    144144% end
    145145%ImagesPerLevel=size(XmlInput.Time,2)-1;%100;%use the xmlinformation to get the nbre of j indices
     146count0=14;
    146147Dtj=0.05;% time interval between frames
    147 ImagesPerLevel=450;% total number of images per position, ImagesPerLevel-Nbj images skiiped during motion between two positions
    148 Nbj=400; %Nbre of images kept at a given position
     148ImagesPerLevel=455;% total number of images per position, ImagesPerLevel-Nbj images skiiped during motion between two positions
     149Nbj=390; %Nbre of images kept at a given position
    149150Dti=Dtj*ImagesPerLevel;
    150151NbLevel=11;
    151152NbScan=3;
    152 TimeReturn=20; %time needed to return back to the first position (in sec)
    153 NbSkippedReturn=round(TimeReturn/Dtj);
     153TimeReturn=268.5; %time needed to return back to the first position (in sec)
     154NbReturn=round(TimeReturn/Dtj);
     155NbSkipReturn=NbReturn+1-NbLevel*ImagesPerLevel;
    154156%% create the xml file of PCO camera if it does not exist
    155157Newxml=fullfile(Param.InputTable{1,1},[Param.InputTable{1,2} '.xml']);
     
    164166    XmlInput.Camera.BurstTiming.Dti=Dti;
    165167    XmlInput.Camera.BurstTiming.NbDti=NbLevel-1;
    166     XmlInput.Camera.BurstTiming.Dtk=Dti*Nb
    167     Level+TimeReturn;
     168    XmlInput.Camera.BurstTiming.Dtk=TimeReturn;
    168169    XmlInput.Camera.BurstTiming.NbDtk=NbScan-1;
    169170    %XmlInput=rmfield(XmlInput,'Time');
     
    202203        checkkeep=1;
    203204        count=count+1;
    204         if count<=ImagesPerLevel*11 % first scan of 11 levels
    205             i_index=fix((count-1)/ImagesPerLevel)+1;
    206             j_index=mod(count-1,ImagesPerLevel)+1;
    207         elseif count<=ImagesPerLevel*NbLevel+400 %skip 400 images during return
     205        if count<count0
    208206            checkkeep=0;
    209         elseif count<=ImagesPerLevel*2*NbLevel+400 % =5930 second scan
    210             i_index=fix((count-401)/ImagesPerLevel)+1;
    211             j_index=mod(count-401,ImagesPerLevel)+1;
    212         elseif count<=ImagesPerLevel*2*NbLevel+800 %skip images during second return, from 2763 to 3167
    213             checkkeep=0;
    214         elseif count<=ImagesPerLevel*3*NbLevel+800 % =5930 third scan
    215             i_index=fix((count-801)/ImagesPerLevel)+1;
    216             j_index=mod(count-801,ImagesPerLevel)+1;
     207        else
     208            countnew=count-count0+1;         
     209            if countnew<=ImagesPerLevel*NbLevel % first scan of 11 levels
     210                i_index=fix((countnew-1)/ImagesPerLevel)+1;
     211                j_index=mod(countnew-1,ImagesPerLevel)+1;
     212            elseif countnew<=NbReturn%skip 400 images during return
     213                checkkeep=0;
     214            elseif countnew<=NbReturn+ImagesPerLevel*NbLevel % =5930 second scan
     215                i_index=fix((countnew-NbSkipReturn)/ImagesPerLevel)+1;
     216                j_index=mod(countnew-NbSkipReturn,ImagesPerLevel)+1;
     217            elseif countnew<=2*NbReturn %skip images during second return, from 2763 to 3167
     218                checkkeep=0;
     219            elseif countnew<=2*NbReturn+ImagesPerLevel*NbLevel % =5930 third scan
     220                i_index=fix((countnew-2*NbSkipReturn)/ImagesPerLevel)+1;
     221                j_index=mod(countnew-2*NbSkipReturn,ImagesPerLevel)+1;
     222            end
    217223        end
    218224        if checkkeep
     
    231237                end
    232238            end
     239%         else
     240%             OutputFile=fullfile(OutputDir,['img_' num2str(i_index) '_' num2str(j_index) '.png']);
    233241        end
    234242    end
Note: See TracChangeset for help on using the changeset viewer.