Changeset 179 for trunk/src/read_civxdata.m
- Timestamp:
- Jan 9, 2011, 12:56:28 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_civxdata.m
r159 r179 5 5 % 6 6 % OUTPUT: 7 % nb_coord,nb_dim, 8 % Civ: =0 or 1, indicates whether the data is civ (A SUPPRIMER ?) 9 % CivStage: =0, ??? A UTILISER POUR REMPLACER civ 10 % =1, civ1 has been performed only 11 % =2, fix1 has been performed 12 % =3, pacth1 has been performed 13 % =4, civ2 has been performed 14 % =5, fix2 has been performed 15 % =6, pacth2 has been performed 16 % time: absolute time 17 % Field 7 % Field: structure representing the selected field, containing 18 8 % .Txt: (char string) error message if any 19 % . NbDim: number of dimensions (=0 by default)20 % .NbCoord: number of vector components21 % .CoordType: expresses the type of coordinate ('px' for image, 'sig' for instruments, or 'phys')22 % .dt: time interval for the corresponding image pair23 % .CivStage: =0,24 % =1, civ1 has been performed only25 % =2, fix1 has been performed26 % =3, pacth1 has been performed27 % =4, civ2 has been performed28 % =5, fix2 has been performed29 % =6, pacth2 has been performed30 % .X, .Y, .Z: set of vector coordinates31 % .U,.V,.W: corresponding set of vector components32 % .F: warning flags33 % .FF: error flag, =0 for good vectors34 % .C: scalar associated with velocity (used for vector colors)35 % .CoordType36 % .DijU; matrix of spatial derivatives (DijU(1,1,:)=DUDX,37 % DijU(1,2,:)=DUDY, Dij(2,1,:)=DVDX, DijU(2,2,:)=DVDY38 % .A, .AX, .AY: additional scalar39 % dt:time interval of the image pair red from a single file, or vector with40 % pixcmx,pixcmy: scaling factors (from the first file)41 % vel_type_out: string representing the selected velocity type (civ1,civ2,filter1...)9 % .ListGlobalAttribute: list of global attributes containing: 10 % .NbCoord: number of vector components 11 % .NbDim: number of dimensions (=2 or 3) 12 % .dt: time interval for the corresponding image pair 13 % .Time: absolute time (average of the initial image pair) 14 % .CivStage: =0, 15 % =1, civ1 has been performed only 16 % =2, fix1 has been performed 17 % =3, pacth1 has been performed 18 % =4, civ2 has been performed 19 % =5, fix2 has been performed 20 % =6, pacth2 has been performed 21 % .CoordUnit: 'pixel' 22 % .ListVarName: {'X' 'Y' 'U' 'V' 'F' 'FF'} 23 % .X, .Y, .Z: set of vector coordinates 24 % .U,.V,.W: corresponding set of vector components 25 % .F: warning flags 26 % .FF: error flag, =0 for good vectors 27 % .C: scalar associated with velocity (used for vector colors) 28 % .DijU; matrix of spatial derivatives (DijU(1,1,:)=DUDX, 29 % DijU(1,2,:)=DUDY, Dij(2,1,:)=DVDX, DijU(2,2,:)=DVDY 30 % 31 % VelTypeOut: velocity type corresponding to the selected field: ='civ1','interp1','interp2','civ2'.... 42 32 % 43 33 % INPUT: … … 95 85 Field.VarAttribute(end-2:end)=[]; 96 86 end 87 88 %renaiming for standard conventions 89 Field.NbCoord=Field.nb_coord; 90 Field.NbDim=Field.nb_dim; 97 91 98 92 %determine the appropriate constant for time and dt for the PIV pair … … 125 119 end 126 120 127 %update list of global attributes 128 List=Field.ListGlobalAttribute; 129 ind_remove=[]; 130 for ilist=1:length(List) 131 switch(List{ilist}) 132 case {'patch2','fix2','civ2','patch','fix','dt2','absolut_time_T0','absolut_time_T0_2'} 133 ind_remove=[ind_remove ilist]; 134 Field=rmfield(Field,List{ilist}); 135 end 136 end 137 List(ind_remove)=[]; 138 Field.ListGlobalAttribute=[List {'Time','CivStage','CoordUnit'}]; 139 140 % rescale to pixel coordiantes 121 %% rescale fields to pixel coordinates 141 122 if isfield(Field,'pixcmx') 142 123 Field.pixcmx=double(Field.pixcmx); … … 157 138 end 158 139 end 159 %Field.CoordType='px';% TODO: abandon, use COORdUnit instead ? (to adapt 'px' and 'phys') 140 141 %% update list of global attributes 142 List=Field.ListGlobalAttribute; 143 ind_remove=[]; 144 for ilist=1:length(List) 145 switch(List{ilist}) 146 case {'patch2','fix2','civ2','patch','fix','dt2','absolut_time_T0','absolut_time_T0_2','nb_coord','nb_dim','pixcmx','pixcmy'} 147 ind_remove=[ind_remove ilist]; 148 Field=rmfield(Field,List{ilist}); 149 end 150 end 151 List(ind_remove)=[]; 152 Field.ListGlobalAttribute=[{'NbCoord'},{'NbDim'} List {'Time','CivStage','CoordUnit'}]; 160 153 Field.CoordUnit='pixel'; 161 154
Note: See TracChangeset
for help on using the changeset viewer.