Ignore:
Timestamp:
Jul 5, 2024, 9:00:14 AM (3 months ago)
Author:
sommeria
Message:

civ3 improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_civdata.m

    r1135 r1153  
    191191if iscell(vel_type),vel_type=vel_type{1}; end%transform cell to string if needed
    192192errormsg='';
     193if CivStage>=6
     194    CivStage=6;
     195end
    193196
    194197%% select the priority order for automatic vel_type selection
    195 if strcmp(vel_type,'civ2') && strcmp(ProjModeRequest,'derivatives')
    196     vel_type='filter2';
    197 elseif strcmp(vel_type,'civ1') && strcmp(ProjModeRequest,'derivatives')
    198     vel_type='filter1';
     198if strcmp(ProjModeRequest,'derivatives')&& numel(vel_type)>=3 && strcmp(vel_type(1:3),'civ')
     199    vel_type=['filter' vel_type(4:end)];
    199200end
    200201if isempty(vel_type)||strcmp(vel_type,'*')
    201202    vel_type='filter2';% case CivStage >=6
    202203    switch CivStage
     204        case {1,2}% civ1 available but not filter1
     205            vel_type='civ1';
     206        case 3
     207            vel_type='filter1';
     208
    203209        case {4,5}% civ2 available but not filter2
    204210            if strcmp(ProjModeRequest,'derivatives')% derivatives needed
     
    207213                vel_type='civ2';
    208214            end
    209         case 3
    210             vel_type='filter1';
    211         case {1,2}% civ1 available but not filter1
    212             vel_type='civ1';
    213215    end
    214216end
Note: See TracChangeset for help on using the changeset viewer.