source: trunk/src/set_field_list.m @ 675

Last change on this file since 675 was 588, checked in by sommeria, 11 years ago

tps_coeff_field introduced and several bugs corrected

File size: 3.2 KB
[588]1%'set_field_list': defines variables needed for the diff fields(velocity, vort, div...)
3% [FieldList,VecColorList]=set_field_list(UName,VName,CName)
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
17% 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)
22% FUNCTION related
23% varname_generator.m: determines the field names to read in the netcdf
24% file, depending on the scalar
25function [FieldList,VecColorList]=set_field_list(UName,VName,CName)
26%function [DataOut,errormsg]=calc_field(FieldList,DataIn,Coord_interp)
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
37FieldList={['vec(' UName ',' VName ')'];...
38    ['norm(' UName ',' VName ')'];...
39    ['curl(' UName ',' VName ')'];...
40    ['div(' UName ',' VName ')'];...
41    ['strain(' UName ',' VName ')'];...
42    UName;...
43    VName};
44VecColorList={['norm(' UName ',' VName ')'];...
45    UName;...
46    VName};...
47    if ~isempty(CName)
48    VecColorList=[{CName};VecColorList];
49    end
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%     }
Note: See TracBrowser for help on using the repository browser.