Changeset 769 for trunk/src/set_field_list.m
- Timestamp:
- May 3, 2014, 10:40:25 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/set_field_list.m
r588 r769 4 4 % 5 5 % 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 16 8 % 17 9 % INPUT: 18 % FieldList: cell array of strings representing the name(s) of the field(s) to calculate19 % DataIn: structure representing the field, as defined in check_field_srtructure.m20 % C oord_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 21 13 % 22 14 % FUNCTION related 23 15 % varname_generator.m: determines the field names to read in the netcdf 24 16 % file, depending on the scalar 17 25 18 function [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 patch31 % 'vel': calculated from velocity components, continuous field (interpolated with velocity)32 % 'der': needs spatial derivatives33 % 'var': the scalar name corresponds to a field name in the netcdf files34 % a specific variable name for civ1 and civ2 fields are also associated, if35 % the scalar is calculated from other fields, as explicited below36 19 37 20 FieldList={['vec(' UName ',' VName ')'];... … … 45 28 UName;... 46 29 VName};... 47 if~isempty(CName)30 if exist('CName','var') && ~isempty(CName) 48 31 VecColorList=[{CName};VecColorList]; 49 32 end 50 33 51 34 52 53 % %% list of field options implemented54 % FieldList={'vec(U,V)';...%image correlation corresponding to a vel vector55 % 'C';...%image correlation corresponding to a vel vector56 % 'norm(U,V)';...%norm of the velocity57 % 'curl(U,V)';...%vorticity58 % 'div(U,V)';...%divergence59 % 'strain(U,V)';...%rate of strain60 % 'U';... %u velocity component61 % 'V';... %v velocity component62 % 'W';... %w velocity component63 % 'W_normal';... %w velocity component normal to the plane64 % 'error'}; %error associated to a vector (for stereo or patch)65 % ColorList={'C';...%image correlation corresponding to a vel vector66 % 'norm(U,V)';...%norm of the velocity67 % 'U';... %u velocity component68 % 'V';... %v velocity component69 % }70
Note: See TracChangeset
for help on using the changeset viewer.