Ignore:
Timestamp:
May 3, 2014, 10:40:25 AM (10 years ago)
Author:
sommeria
Message:

corrections to be able to process image correlation in series

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/set_field_list.m

    r588 r769  
    44%
    55% OUTPUT:
    6 % Scal: matlab vector representing the scalar values (length nbvec defined by var_read)
    7 %      if no input, Scal=list of programmed scalar names (to put in menus)
    8 %      if only the field name is put as input, vec_A=type of scalar, which can be:
    9 %                   'discrete': related to the individual velocity vectors, not interpolated by patch
    10 %                   'vel': scalar calculated solely from velocity components
    11 %                   'der': needs spatial derivatives
    12 %                   'var': the scalar name directly corresponds to a field name in the netcdf files
    13 % error: error flag
    14 %      error = 0; OK
    15 %      error = 1; the prescribed scalar cannot be read or calculated from available fields
     6% FieldList: list (cell column) of the fields to propose in the menu FieldName
     7% VecColorList: list (cell column) of the fields to propose in the menu for vector color
    168%
    179% INPUT:
    18 % FieldList: cell array of strings representing the name(s) of the field(s) to calculate
    19 % DataIn: structure representing the field, as defined in check_field_srtructure.m
    20 % Coord_interp(:,nb_coord) optional set of coordinates to interpolate the field (use with thin plate shell)
     10% UName: name of the x vector component
     11% VName: name of the y vector component
     12% CName: name of an additional scalar for color
    2113%
    2214% FUNCTION related
    2315% varname_generator.m: determines the field names to read in the netcdf
    2416% file, depending on the scalar
     17
    2518function [FieldList,VecColorList]=set_field_list(UName,VName,CName)
    26 %function [DataOut,errormsg]=calc_field(FieldList,DataIn,Coord_interp)
    27 
    28 %list of defined scalars to display in menus (in addition to 'ima_cor').
    29 % a type is associated to each scalar:
    30 %              'discrete': related to the individual velocity vectors, not interpolated by patch
    31 %              'vel': calculated from velocity components, continuous field (interpolated with velocity)
    32 %              'der': needs spatial derivatives
    33 %              'var': the scalar name corresponds to a field name in the netcdf files
    34 % a specific variable name for civ1 and civ2 fields are also associated, if
    35 % the scalar is calculated from other fields, as explicited below
    3619
    3720FieldList={['vec(' UName ',' VName ')'];...
     
    4528    UName;...
    4629    VName};...
    47     if ~isempty(CName)
     30if exist('CName','var') && ~isempty(CName)
    4831    VecColorList=[{CName};VecColorList];
    49     end
     32end
    5033
    5134
    52 
    53 % %% list of field options implemented
    54 % FieldList={'vec(U,V)';...%image correlation corresponding to a vel vector
    55 %     'C';...%image correlation corresponding to a vel vector
    56 %     'norm(U,V)';...%norm of the velocity
    57 %     'curl(U,V)';...%vorticity
    58 %     'div(U,V)';...%divergence
    59 %     'strain(U,V)';...%rate of strain
    60 %     'U';... %u velocity component
    61 %     'V';... %v velocity component
    62 %     'W';... %w velocity component
    63 %     'W_normal';... %w velocity component normal to the plane
    64 %     'error'}; %error associated to a vector (for stereo or patch)
    65 % ColorList={'C';...%image correlation corresponding to a vel vector
    66 %     'norm(U,V)';...%norm of the velocity
    67 %     'U';... %u velocity component
    68 %     'V';... %v velocity component
    69 %     }
    70 
Note: See TracChangeset for help on using the changeset viewer.