Changeset 1180 for trunk/src/read_field.m
- Timestamp:
- Mar 27, 2025, 5:59:21 PM (3 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_field.m
r1170 r1180 145 145 NbCoord=~isempty(ParamIn.Coord_x)+~isempty(ParamIn.Coord_y)+~isempty(ParamIn.Coord_z); 146 146 if isfield(ParamIn,'TimeDimName')% case of reading of a single time index in a multidimensional array 147 [Field, var_detect,ichoice,errormsg]=nc2struct(FileName,'TimeDimName',ParamIn.TimeDimName,frame_index,[ParamIn.Coord_x ParamIn.Coord_y ParamIn.Coord_z ListVarName]);147 [Field,~,~,errormsg]=nc2struct(FileName,'TimeDimName',ParamIn.TimeDimName,frame_index,[ParamIn.Coord_x ParamIn.Coord_y ParamIn.Coord_z ListVarName]); 148 148 elseif isfield(ParamIn,'TimeVarName')% case of reading of a single time in a multidimensional array 149 [Field, var_detect,ichoice,errormsg]=nc2struct(FileName,'TimeVarName',ParamIn.TimeVarName,frame_index,[ParamIn.Coord_x ParamIn.Coord_y ParamIn.Coord_z ListVarName]);150 if numel(frame_index)~=1151 NbCoord=NbCoord+1;% adds time coordinate, except if a single time has been selected152 end153 else 154 [Field, var_detect,ichoice,errormsg]=nc2struct(FileName,[ParamIn.Coord_x ParamIn.Coord_y ParamIn.Coord_z ListVarName]);149 [Field,~,~,errormsg]=nc2struct(FileName,'TimeVarName',ParamIn.TimeVarName,frame_index,[ParamIn.Coord_x ParamIn.Coord_y ParamIn.Coord_z ListVarName]); 150 % if numel(frame_index)~=1 151 % NbCoord=NbCoord+1;% adds time coordinate, except if a single time has been selected 152 % end 153 else 154 [Field,~,~,errormsg]=nc2struct(FileName,[ParamIn.Coord_x ParamIn.Coord_y ParamIn.Coord_z ListVarName]); 155 155 end 156 156 if ~isempty(errormsg) … … 241 241 case 'telopsIR' 242 242 [A,Header]=readIRCam(FileName,'Frames',frame_index); 243 A=flip(A); 243 244 A=(reshape(A,Header(1).Width,Header(1).Height))'; 244 A=flip(A,1);245 245 case 'mmreader' 246 246 if isa(ParamIn,'mmreader')
Note: See TracChangeset
for help on using the changeset viewer.