Changes between Version 39 and Version 40 of UvmatHelp


Ignore:
Timestamp:
Jun 5, 2013, 6:26:21 PM (7 years ago)
Author:
sommeria
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UvmatHelp

    v39 v40  
    290290-'''Plotting:''' plot the results of projection. Function used: {plot_field.m}
    291291
    292 == 5- Field objects: ==
     292== 5- Field structures: ==
    293293
    294294=== 5.1 Griding of data: ===
    295 Physical fields can be defined either on regular grids, either scattered on an unstructured set of positions. Some measurements techniques, like PIV or particle tracking, provided unstructured data, while most methods of analysis require data  on a regular grid. This can be done by interpolation, defining a projection on a plane (with ProjMode='interp' or 'filter', see  [next section-> #set_object]).  The three possibilities of griding are defined as follows:
     295Physical fields can be defined either on regular grids, either scattered on an unstructured set of positions. Some measurements techniques, like PIV or particle tracking, provided unstructured data, while most methods of analysis require data  on a regular grid. This can be done by interpolation, defining a projection on a plane (with ProjMode='interp', see  [wiki:#a6-Projectionobjects: next section).  The three possibilities of griding are defined as follows:
    296296
    297297-'''Regular grid:'''
     
    301301-'''Structured orthogonal grid''':
    302302
    303   Each field is again a multi-dimensional array V whose dimensions match the space dimensions, but the coordinates may not be regularly spaced, so they are represented as a monotonic 1D array variable with the same length as the corresponding dimension of V.  This is called a 'coordinate variable' (see section 7.1).
     303Each field is again a multi-dimensional array V whose dimensions match the space dimensions, but the coordinates may not be regularly spaced, so they are represented as a monotonic 1D array variable with the same length as the corresponding dimension of V.  This is called a 'coordinate variable' (see [wiki:#a7.1TheNetCDFformat: section 7.1]).
    304304
    305305-'''Unstructured coordinates:'''
     
    309309-'''Thin plate shell (tps) interpolation:'''
    310310
    311 This is a multi-dimensional generalisation of the spline interpolation/smoothing, an optimum way to interpolate data with minimal  curvature of the interpolating function. The result at an interpolation {site} $'''r'''$ is expressed in the form, see [thin plate spline->73].
    312 
    313 $$\label{sol_gene} f({\bf r})=\sum S_i \phi({\bf|r-r_i}|)+a_0+a_1x+a_2y\; $$ where {\bf r_i} are the positions of the measurement points (the {centres}). Each centre can be viewed as the source of an axisymmetric field  $\phi$ of the form $\phi(r)=r^2\log (r)$. The weights $S_i$ and the linar coefficients $a_0,a_1,a_2$ are the tps coefficients which determine the interpolated value at any point. The spatial derivatives are similarly obtained at any point by analytical differentiation of the source functions $\phi(r)$. These tps coefficients therefore contain all the information for interpolation at any point. ^
     311This is a multi-dimensional generalisation of the spline interpolation/smoothing, an optimum way to interpolate data with minimal  curvature of the interpolating function. The result at an interpolation {site} ${\bf r}$ is expressed in the form, (see http://coriolis.legi.grenoble-inp.fr/spip.php?article73)
     312
     313$$\label{sol_gene} f({\bf r})=\sum S_i \phi({\bf|r-r_i}|)+a_0+a_1x+a_2y\; $$ where {\bf r_i} are the positions of the measurement points (the ''centres''). Each ''centre'' can be viewed as the source of an axisymmetric field  $\phi$ of the form $\phi(r)=r^2\log (r)$. The weights $S_i$ and the linar coefficients $a_0,a_1,a_2$ are the tps coefficients which determine the interpolated value at any point. The spatial derivatives are similarly obtained at any point by analytical differentiation of the source functions $\phi(r)$. These tps coefficients therefore contain all the information for interpolation at any point. ^
    314314
    315315Because of memory limitation, the tps interpolation must be done in sub-domains for large data sets (with non-empty overlap to avoid steps). Then the tps coordinates and tps weights are represented with an addition index, labelling the subdomain.
    316316
    317 [sec5.2<-]
    318 
    319317=== 5.2 Field representation as Matlab structure: ===
    320 The uvmat package represents data as 'Matlab structures', a set of data elements characterized by a tag name (char string) and a value. The value can be any Matlab object: number, array, character string or cell, or a structure containing itself elements in a hierarchical way. Each element is denoted in the form Data.tag=value.
    321 
    322 Data are kept in memory in the GUI uvmat as a Matlab structure, stored as 'UserData' in the figure. This structure can be extracted by the menu bar command '''[Export/field in work space] ''', then typing the Matlab command '>>Data_uvmat'. It contains the current input field as a substructure Data_uvmat.Field.
    323 
    324 This field has a specific organisation, mirroring the structure of netcdf files (see [section 7->#get_field]). This organisation defines a {field object}, used to specify the outcome of projections and plots.  The field is described by a set of arrays or matrices, called the {variables}. The {dimensions} of these arrays have names, in order to identify correspondance between different arrays. For instance the arrays representing the velocity components U and V must have the same dimensions. A dimension has a specific value, which sets the common size of all arrays sharing this dimension. Field description furthermore involves optional  {attributes} to document the field data, for instance to specify the role of variables or to provide units. These attributes can be global, or can be attached to a specific variable.
    325 
    326 In summary, the {field object} is specified by a structure with the following elements:  -*(optional) .[wiki:ListGlobalAttribute]: list (cell array of character strings) of the names of global attributes  Att_1, Att_2... -* (mandatory) .[wiki:ListVarName]: list of the variable names Var_1, Var_2....(cell array of character strings). -* (mandatory) .[wiki:VarDimName]: list of the dimensions associated with each variable: this is a cell array whose number of element is equal to that of .[wiki:ListVarName]. Each element is the dimension name for a unidimensional variable, or a cell array specifying the list of dimension names for a multidimensional variable. -* (optional) .[wiki:VarAttribute]: cell array of structures of the form .[wiki:VarAttribute]<HTML>{ivar}</HTML>.key=value, defining an attribute tag name and value for the variable #ivar (variable number in the list .[wiki:ListVarName]). -* .Att_1, Att_2... : values of the listed global attributes. -* .Var_1, .Var_2....: variables arrays whose  names are listed in .[wiki:ListVarName]
    327 
    328 In some cases, it is useful to define the field object independently from its data content. Then the variables .Var1... are replaced by the lists of dimension names and values. -* .[wiki:ListDimName]: list of dimension names (cell array of character strings)  -* .[wiki:DimValue]: array of dimension values corresponding to LisDimName.
    329 
    330 The following temporary information is added to manage projection and field substraction oerations, which must be done in general after projection: -* 'FieldRequest': 'interp_lin', 'interp_tps' indicate whether lin interpolation  or derivatives by tps is needed to calculate the requested field. -* 'Operation': name (char string) of the operation to be performed to finalise the field cell after projection. -* 'SubCheck' 0 /1 indicate that the field must be substracted (second  entry in uvmat)
    331 
    332 Any other element can be added, but will not be taken into account if they are not listed in  .[wiki:ListGlobalAttribute] or .[wiki:ListVarName].
    333 
    334 [sec5.3<-]
     318The uvmat package represents data as ''Matlab structures'', a set of data elements characterized by a tag name (char string) and a value. The value can be any Matlab object: number, array, character string or cell, or a structure containing elements in a hierarchical way. Each element is denoted in the form Data.tag=value.
     319
     320Data are kept in memory in the GUI uvmat as a Matlab structure, stored as ''!UserData'' in the GUI figure. This structure can be extracted by the menu bar command '''[Export/field in work space]''', then typing the Matlab command '>>Data_uvmat'. It contains the current input field as a substructure ''Data_uvmat.Field''.
     321
     322This field has a specific organisation, mirroring the structure of netcdf files (see [wiki:#a7-Netcdffilesandget_field.fig: section 7]). The field is described by a set of (single or multidimensional) data arrays, called the ''variables''. The ''dimensions'' of these arrays have names, in order to identify correspondance between different arrays. For instance the arrays representing the velocity components U and V must have the same dimensions. A dimension has a specific value, which sets the common size of all arrays sharing this dimension. Field description furthermore involves optional ''attributes'' to document the field data, for instance to specify the role of variables or to provide units. These attributes can be global, or can be attached to a specific variable.
     323
     324In summary, the ''field structure'' is specified by the following elements: 
     325 * (optional) '''!ListGlobalAttribute:''' list (cell array of character strings) of the names of global attributes  Att_1, Att_2...
     326 * (mandatory) '''!ListVarName:''' list of the variable names Var_1, Var_2....(cell array of character strings).
     327 * (mandatory) '''!VarDimName:''' list of the dimensions associated with each variable: this is a cell array whose number of element is equal to that of '''!ListVarName'''. Each element is the dimension name for a unidimensional variable, or a cell array specifying the list of dimension names for a multidimensional variable.
     328 * (optional) '''VarAttribute:''' cell array of structures of the form !VarAttribute{ivar}.key=value, defining an attribute tag name and value for the variable #ivar (variable number in the list !ListVarName]).
     329 * .Att_1, Att_2... : values of the listed global attributes.
     330 * .Var_1, .Var_2...: variables arrays whose names are listed in !ListVarName.
     331
     332In some cases, it is useful to define the field object independently from its data content. Then the variables .Var1... are replaced by the lists of dimension names and values.
     333 * '''!ListDimName''': list of dimension names (cell array of character strings) 
     334 * '''!DimValue''': array of dimension values corresponding to !LisDimName.
     335
     336The following temporary information is added to manage projection and field substraction oerations, which must be done in general after projection:
     337 * '''FieldRequest'''= ''interp_lin'' or ''interp_tps'' indicates whether lin interpolation  or derivatives by tps is needed to calculate the requested field.
     338 * '''Operation''': name (char string) of the operation to be performed to finalise the field cell after projection.
     339 * '''SubCheck''' 0 /1 indicate that the field must be substracted (second  entry in uvmat)
     340
     341Any other element can be added, but will not be taken into account if they are not listed in  ''!ListGlobalAttribute'' or ''!ListVarName''.
    335342
    336343=== 5.3 Conventions for attributes in field objects: ===