- Timestamp:
- Mar 23, 2015, 11:19:28 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/read_lvm.m
r809 r884 53 53 %% get the list of channel names 54 54 Break_pos=regexp(txt,'\n','once');%find the line break 55 VarNameCell=textscan(txt(1:Break_pos- 1),'%s');% read list of variable names (until next line break)55 VarNameCell=textscan(txt(1:Break_pos-2),'%s');% read list of variable names (until next line break) 56 56 Data.ListVarName=VarNameCell{1}; 57 57 Data.ListVarName(end)=[]; %remove last name (Comment) -
trunk/src/series/aver_stat.m
r883 r884 239 239 end 240 240 nbfiles=0;%counter of the successfully read files (bad files are skipped) 241 VarMesh=NaN; 242 if isfield(Param,'ProjObject') && ismember(Param.ProjObject.ProjMode,{'inside','outside'})&& isfield(Param.ActionInput,'VarMesh')%case of histograms 241 VarMesh=[]; 242 if isfield(Param,'ProjObject') && ismember(Param.ProjObject.ProjMode,{'inside','outside'}) 243 if isfield(Param,'ActionInput') && isfield(Param.ActionInput,'VarMesh')%case of histograms 243 244 VarMesh=Param.ActionInput.VarMesh; 245 else 246 VarMesh=[]; 247 disp_uvmat('WARNING','automatic bin size for histograms, select aver_stat again to set the value',checkrun) 248 end 244 249 end 245 250 %%%%%%%%%%%%%%%% loop on field indices %%%%%%%%%%%%%%%% … … 312 317 DataOut=Field;%outcome reproduces the first (projected) field by default 313 318 DataOut.Conventions='uvmat'; %suppress Conventions='uvmat/civdata' for civ input files 314 if is member(Param.ProjObject.ProjMode,{'inside','outside'})%case of histograms319 if isfield(Param,'ProjObject')&& ismember(Param.ProjObject.ProjMode,{'inside','outside'})%case of histograms 315 320 for ivar=1:numel(Field.ListVarName)% list of variable names before projection (histogram) 316 321 VarName=Field.ListVarName{ivar}; … … 324 329 else 325 330 errorvar=zeros(numel(Field.ListVarName));%index of errorflag associated to each variable 326 for ivar=1:numel(Field.ListVarName) 327 VarName=Field.ListVarName{ivar}; 328 DataOut.(VarName)=zeros(size(DataOut.(VarName)));% initiate each field to zero 329 NbData.(VarName)=zeros(size(DataOut.(VarName)));% initiate the nbre of good data to zero 330 for iivar=1:length(Field.VarAttribute) 331 if isequal(Field.VarDimName{iivar},Field.VarDimName{ivar})&& isfield(Field.VarAttribute{iivar},'Role')... 332 && strcmp(Field.VarAttribute{iivar}.Role,'errorflag') 333 errorvar(ivar)=iivar; % index of the errorflag variable corresponding to ivar 331 if isfield(Field,'VarAttribute') 332 for ivar=1:numel(Field.ListVarName) 333 VarName=Field.ListVarName{ivar}; 334 DataOut.(VarName)=zeros(size(DataOut.(VarName)));% initiate each field to zero 335 NbData.(VarName)=zeros(size(DataOut.(VarName)));% initiate the nbre of good data to zero 336 337 for iivar=1:length(Field.VarAttribute) 338 if isequal(Field.VarDimName{iivar},Field.VarDimName{ivar})&& isfield(Field.VarAttribute{iivar},'Role')... 339 && strcmp(Field.VarAttribute{iivar}.Role,'errorflag') 340 errorvar(ivar)=iivar; % index of the errorflag variable corresponding to ivar 341 end 334 342 end 335 343 end 344 DataOut.ListVarName(errorvar(errorvar~=0))=[]; %remove errorflag from result 345 DataOut.VarDimName(errorvar(errorvar~=0))=[]; %remove errorflag from result 346 DataOut.VarAttribute(errorvar(errorvar~=0))=[]; %remove errorflag from result 347 else 348 for ivar=1:numel(Field.ListVarName) 349 VarName=Field.ListVarName{ivar}; 350 DataOut.(VarName)=zeros(size(DataOut.(VarName)));% initiate each field to zero 351 NbData.(VarName)=zeros(size(DataOut.(VarName)));% initiate the nbre of good data to zero 352 end 336 353 end 337 DataOut.ListVarName(errorvar(errorvar~=0))=[]; %remove errorflag from result 338 DataOut.VarDimName(errorvar(errorvar~=0))=[]; %remove errorflag from result 339 DataOut.VarAttribute(errorvar(errorvar~=0))=[]; %remove errorflag from result 354 340 355 end 341 356 end %current field … … 344 359 sizmean=size(DataOut.(VarName)); 345 360 siz=size(Field.(VarName)); 346 if is member(Param.ProjObject.ProjMode,{'inside','outside'})361 if isfield(Param,'ProjObject') && ismember(Param.ProjObject.ProjMode,{'inside','outside'}) 347 362 if isfield(Data{1},VarName) 348 363 MaxValue=max(DataOut.(VarName));% current max of histogram absissa … … 387 402 end 388 403 %%%%%%%%%%%%%%%% end loop on field indices %%%%%%%%%%%%%%%% 389 if ~ ismember(Param.ProjObject.ProjMode,{'inside','outside'})404 if ~(isfield(Param,'ProjObject') && ismember(Param.ProjObject.ProjMode,{'inside','outside'})) 390 405 for ivar=1:length(Field.ListVarName) 391 406 VarName=Field.ListVarName{ivar}; -
trunk/src/series/civ_input.m
r883 r884 960 960 index_pair=index_pair+1; 961 961 displ_pair{index_pair}=['j= ' num2stra(numod_a,nom_type_ima) '-' num2stra(numod_b,nom_type_ima)]; 962 displ_pair_dt{i pair}=displ_pair{ipair};962 displ_pair_dt{index_pair}=displ_pair{index_pair}; 963 963 dt(index_pair)=numod_b-numod_a;%default dt 964 964 if size(Time,1)>ref_i && size(Time,2)>numod_b % && ~checkframe -
trunk/src/series/time_series.m
r883 r884 304 304 if isfield(Param,'ActionInput') && isfield(Param.ActionInput,'VarMesh')%case of histograms 305 305 VarMesh=Param.ActionInput.VarMesh; 306 else 307 VarMesh=[]; 308 disp_uvmat('WARNING','automatic bin size for histograms, select time_series again to set the value',checkrun) 306 309 end 307 310 end
Note: See TracChangeset
for help on using the changeset viewer.