Changeset 951 for trunk/src/series.m


Ignore:
Timestamp:
Jun 12, 2016, 5:09:47 PM (5 years ago)
Author:
sommeria
Message:

bugs repaired

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series.m

    r950 r951  
    990990        Time=XmlData.Time;
    991991        TimeName='xml';
    992                         if XmlData.Time(1,:)==XmlData.Time(2,:)% case starting with index 1
    993                     sizDti=size(XmlData.Time,1)-1;%size of the time vector explicitly defined in the xml file
    994                     ind_start=1;
    995                 else
    996                     sizDti=size(XmlData.Time,1);% case starting with index 0
    997                     ind_start=0;
    998                 end
    999         % complement the input if the whole time series is not defined
    1000             if size(i1_series,3)>size(XmlData.Time,1)-ind_start %only the first time interval is defined, extrapolate to the whole series
    1001                 Dti_total=XmlData.Time(end)-XmlData.Time(1);%total time interval covered by the time vector
    1002                 missing_indices=sizDti+1+ind_start:size(i1_series,3)+1;% remaining set of frame indices for which time needs to be found
    1003                 repeat_nbre=1+floor((missing_indices-sizDti-ind_start)/(sizDti-1));% number of repetitions of Dti
    1004                 time_indices=1+mod(missing_indices-sizDti-1,sizDti-1);
    1005                 for j=1:size(XmlData.Time,2)
    1006                 Time(missing_indices,j)=XmlData.Time(time_indices,j)+repeat_nbre'*Dti_total;
    1007                 end
    1008                 % update the xml file with NbDti
    1009                 t=xmltree(XmlFileName);
    1010                 uid_NbDti=find(t,'ImaDoc/Camera/BurstTiming/NbDti')
    1011                 if isempty(uid_NbDti)
    1012                     uid_BurstTiming=find(t,'ImaDoc/Camera/BurstTiming')
    1013                     [t,uid_NbDti]=add(t,uid_BurstTiming,'element','NbDti');
    1014                 end
    1015                 [t,uid_NbDti]=add(t,uid_NbDti,'chardata',num2str(repeat_nbre(end)-1));
    1016                 save(t,XmlFileName)
    1017             end
     992%                         if XmlData.Time(1,:)==XmlData.Time(2,:)% case starting with index 1
     993%                     sizDti=size(XmlData.Time,1)-1;%size of the time vector explicitly defined in the xml file
     994%                     ind_start=1;
     995%                 else
     996%                     sizDti=size(XmlData.Time,1);% case starting with index 0
     997%                     ind_start=0;
     998%                 end
     999%         % complement the input if the whole time series is not defined
     1000%             if size(i1_series,3)>size(XmlData.Time,1)-ind_start %only the first time interval is defined, extrapolate to the whole series
     1001%                 Dti_total=XmlData.Time(end)-XmlData.Time(1);%total time interval covered by the time vector
     1002%                 missing_indices=sizDti+1+ind_start:size(i1_series,3)+1;% remaining set of frame indices for which time needs to be found
     1003%                 repeat_nbre=1+floor((missing_indices-sizDti-ind_start)/(sizDti-1));% number of repetitions of Dti
     1004%                 time_indices=1+mod(missing_indices-sizDti-1,sizDti-1);
     1005%                 for j=1:size(XmlData.Time,2)
     1006%                 Time(missing_indices,j)=XmlData.Time(time_indices,j)+repeat_nbre'*Dti_total;
     1007%                 end
     1008%                 % update the xml file with NbDti
     1009%                 t=xmltree(XmlFileName);
     1010%                 uid_NbDti=find(t,'ImaDoc/Camera/BurstTiming/NbDti')
     1011%                 if isempty(uid_NbDti)
     1012%                     uid_BurstTiming=find(t,'ImaDoc/Camera/BurstTiming')
     1013%                     [t,uid_NbDti]=add(t,uid_BurstTiming,'element','NbDti');
     1014%                 end
     1015%                 [t,uid_NbDti]=add(t,uid_NbDti,'chardata',num2str(repeat_nbre(end)-1));
     1016%                 save(t,XmlFileName)
     1017%             end
    10181018    end
    10191019    if isfield(XmlData,'Camera')
Note: See TracChangeset for help on using the changeset viewer.