Ignore:
Timestamp:
May 20, 2013, 10:12:57 AM (11 years ago)
Author:
sommeria
Message:

civ_series cleaned. Introduction of a nc file as input (to further debug)

File:
1 edited

Legend:

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

    r635 r637  
    208208        end
    209209end
    210 if ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input
     210if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video'})))% case of video input
    211211    time=zeros(2,FileInfo_A.NumberOfFrames+1);
    212212    time(2,:)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate);
     
    215215    ColorType='truecolor';
    216216end
     217if isempty(time)% time = index i +0.001 index j by default
     218    time=(MinIndex_i:MaxIndex_i)'*ones(1,MaxIndex_j-MinIndex_j+1);
     219    time=time+0.001*ones(MaxIndex_i-MinIndex_i+1,1)*(MinIndex_j:MaxIndex_j);
     220    time=[zeros(1,MaxIndex_j-MinIndex_j+1);time];% insert a first line of zeros
     221    time=[zeros(MaxIndex_i-MinIndex_i+2,1) time];% insert a first column of zeros
     222end
     223   
    217224if length(FileInfo_A) >1 %case of image with multiple frames
    218225    nbfield=length(FileInfo_A);
     
    269276            j2=j2_series_Civ1(ifield);
    270277        end
    271         Data.Civ1_Time=(time(j2+1,i2+1)+time(j1+1,i1+1))/2;
    272         Data.Civ1_Dt=time(j2+1,i2+1)-time(j1+1,i1+1);
     278        Data.Civ1_Time=(time(i2+1,j2+1)+time(i1+1,j1+1))/2;
     279        Data.Civ1_Dt=time(i2+1,j2+1)-time(i1+1,j1+1);
    273280        for ilist=1:length(list_param)
    274281            Data.(Civ1_param{4+ilist})=Param.ActionInput.Civ1.(list_param{ilist});
Note: See TracChangeset for help on using the changeset viewer.