416 | | These are geometrical objects used to define cuts along lines or planes, to interpolate fields on a regular grid, to restrict the analysis or visualisation of fields to subregions. Objects are created by the menu bar command '''[Projection object]''' in '''uvmat.fig'''. The creation of a new object ('points', 'line'....) can be initiated by selecting the corresponding item in the menu. Alternatively, an existing xml object file can be opened by the option 'browse...'. |
417 | | |
418 | | In each case an auxiliary GUI '''set_object.fig''' describing the object properties appears, see next [sub-section->#sec6.2] for their definitions. This GUI can be edited by mouse drawing in the plotted field or by direct input. In the latter case, refresh the plots by pressing''' [PLOT] ''' in '''set_object.fig''' . Objects can be saved as xml files with the button ''' [SAVE]''' of '''set_object.fig'''. |
419 | | |
420 | | The projection of fields on objects is performed by the function ''proj_field.m'', which can be used also in data processing. The projected field from a projection object drawn in the main plotting window of uvmat will be plotted in the secondary plotting GUI '''[view_field]'''. The list of currently opened projection objects is displayed in the menus '''[ListObject]''' and '''[ListObject_1]''' at the bottom right of '''uvmat.fig'''. One object can be selected in each of these menus: the projection on the object selected in '''[ListObject]''' is viewed in '''uvmat.fig''' while that of the object selected in '''[ListObject_1]''' is viewed in '''view_field.fig'''. All the created objects are sketched in both views, except the one on which projection leads to the currently plotted field (see [subsection 6.4->#sec6.4] for object representation). The active objects are plotted in magenta, while the inactive ones are in blue. |
421 | | |
422 | | === 6.2 Object properties: === |
| 416 | These are geometrical objects used to define cuts along lines or planes, to interpolate fields on a regular grid, to restrict the analysis or visualisation to field subregions. When a 2D or 3D field is opened by uvmat, a default projection plane object is created. New objects are created by the menu bar command '''[Projection object]''' in '''uvmat.fig'''. The creation of a new object ('''points''', '''line'''....) can be initiated by selecting the corresponding item in the menu. Alternatively, an existing xml object file can be opened by selecting the menu option '''[browse...]'''. |
| 417 | |
| 418 | In each case an auxiliary GUI '''set_object.fig''' describing the object properties appears, see next [#a6.2Objectproperties sub-section] for their definitions. This GUI can be directly edited and object coordinates can be set by mouse drawing on the plot. In the latter case, refresh the plots by pressing''' [PLOT] ''' in '''set_object.fig''' . Objects can be saved as xml files with the button ''' [SAVE]''' of '''set_object.fig'''. |
| 419 | |
| 420 | The projection of fields on objects is performed by the function ''proj_field.m'', which can be used also in data processing. The projected field from a projection object drawn in the main plotting window of uvmat will be plotted in the secondary plotting GUI '''view_field.fig'''. The list of currently opened projection objects is displayed in the menus '''[!ListObject]''' and '''[!ListObject_1]''' at the bottom right of '''uvmat.fig'''. One object can be selected in each of these menus: the projection on the object selected in '''[!ListObject]''' is viewed in '''uvmat.fig''' while that of the object selected in '''[!ListObject_1]''' is viewed in '''view_field.fig'''. All the created objects are sketched in both views, except the one generating the currently plotted field (see [subsection 6.4->#sec6.4] for object representation). The active objects are plotted in magenta, while the inactive ones are in blue. |
| 421 | |
| 422 | Objects can be viewed, edited, deleted... |
| 423 | |
| 424 | === 6.2 Object properties === |
436 | | * ''' {ProjMode:} ''': specifies the method of projection of coordinates and field. |
437 | | |
438 | | * ''' {Angle:} ''': three component rotation vector used to define the orientation, for instance for planes. |
439 | | |
440 | | * ''' {RangeX:} ''', ''' {RangeY:} ''', ''' {RangeZ:} ''':bounds defining the range of projection along each coordinate, one or two values depending on the object type. |
441 | | |
442 | | * ''' {DX:} ''', ''' {DY:} ''', ''' {DZ:} ''':meash along each coordinate defining a grid for interpolation. |
443 | | |
444 | | * ''' {Coord:} ''': matrix with two (for 2D fields) or three columns defining the object position. |
| 438 | * ''' ProjMode: ''': specifies the method of projection of coordinates and field. |
| 439 | |
| 440 | * ''' Angle: ''': three component rotation vector used to define the orientation, for instance for planes. |
| 441 | |
| 442 | * ''' RangeX: ''', ''' RangeY: ''', ''' RangeZ: ''':bounds defining the range of projection along each coordinate, one or two values depending on the object type. |
| 443 | |
| 444 | * ''' DX: ''', ''' DY: ''', ''' DZ: ''':meash along each coordinate defining a grid for interpolation. |
| 445 | |
| 446 | * ''' Coord: ''': matrix with two (for 2D fields) or three columns defining the object position. |
454 | | Each variable of the input field yields a corresponding variable in the projected field. Integral quantities (circulation, flux...) can be calculated as well. The result depends on the nature of the field variable (set by the variable attribute 'Role', on the object style and projection mode ProjMode: when any averaging or interpolation process is involved, the only projected variables are scalars and vector components, excluding 'warnflag', 'errorflag', 'ancillary'. Those are only projected with the mode 'projection' on line, planes or volumes. |
455 | | |
456 | | * ''' {!ProjMode 'projection': } ''' this is a direct projection of the field data in a range of action around the object, as defined by the parameters 'RangeX', 'RangeY', "RangeZ'. The projection of an input variable defined on unstructured coordinates therefore remains unstructured. By contrast, an input variable defined on a regular grid always yields a variable on a regular grid on the projection project (for instance on a line or plane). |
457 | | |
458 | | * ''' {ProjMode 'interp_lin':} ''' Linear interpolation of the fields on a grid of regularly spaced points defined on the projection object, with meshes DX, DY, DZ. The grid array along x starts at RangeX(1) and ends at the closest value smaller than RangeX(2). Similar convention is used for y and z in case of planes and volumes. |
459 | | |
460 | | * ''' {ProjMode 'interp_tps':} ''' interpolation with thin spline shell. |
461 | | |
462 | | * ''' {ProjMode 'inside' and 'ouside} '''': defined only for closed lines: rectangle, polygon, ellipse. For each field U, its probability distribution function Uhist inside, or respectively outside, the line is calculated, as well as the mean Umean. |
| 454 | Each variable of the input field yields a corresponding variable in the projected field. Integral quantities (circulation, flux...) can be calculated as well. The result depends on the nature of the field variable (set by the variable attribute 'Role', on the object style and projection mode !ProjMode: when any averaging or interpolation process is involved, the only projected variables are scalars and vector components, excluding 'warnflag', 'errorflag', 'ancillary'. Those are only projected with the mode 'projection' on line, planes or volumes. |
| 455 | |
| 456 | * ''' !ProjMode 'projection': ''' this is a direct projection of the field data in a range of action around the object, as defined by the parameters 'RangeX', 'RangeY', "RangeZ'. The projection of an input variable defined on unstructured coordinates therefore remains unstructured. By contrast, an input variable defined on a regular grid always yields a variable on a regular grid on the projection project (for instance on a line or plane). |
| 457 | |
| 458 | * ''' !ProjMode 'interp_lin': ''' Linear interpolation of the fields on a grid of regularly spaced points defined on the projection object, with meshes DX, DY, DZ. The grid array along x starts at RangeX(1) and ends at the closest value smaller than RangeX(2). Similar convention is used for y and z in case of planes and volumes. |
| 459 | |
| 460 | * ''' !ProjMode 'interp_tps': ''' interpolation with thin spline shell. |
| 461 | |
| 462 | * ''' !ProjMode 'inside' and 'ouside '''': defined only for closed lines: rectangle, polygon, ellipse. For each field U, its probability distribution function Uhist inside, or respectively outside, the line is calculated, as well as the mean Umean. |
470 | | * ProjMode= 'projection': the value U(i) is obtained as an average of the (non false) data values in a domain of sizes max(2RangeX, 2RangeY, 2RangeZ) centered at each projection point. An ancillary data U_nbval(i) is also obtained, indicating the number of non-false data around each point. |
471 | | * ProjMode= 'interp_lin': U(i),i=1 is obtained as a linear interpolation on each point. |
472 | | |
473 | | * ''' {Projection on open lines:} ''' This includes the object styles 'line', 'polyline'. For vector fields, the projected x component is along the line and the y component is perpendicular. 3D case still needs to be implemented**. |
| 470 | * !ProjMode= 'projection': the value U(i) is obtained as an average of the (non false) data values in a domain of sizes max(2RangeX, 2RangeY, 2RangeZ) centered at each projection point. An ancillary data U_nbval(i) is also obtained, indicating the number of non-false data around each point. |
| 471 | * !ProjMode= 'interp_lin': U(i),i=1 is obtained as a linear interpolation on each point. |
| 472 | |
| 473 | * ''' Projection on open lines: ''' This includes the object styles 'line', 'polyline'. For vector fields, the projected x component is along the line and the y component is perpendicular. 3D case still needs to be implemented**. |
479 | | * ''' {Projection on closed lines:} ''' , This includes 'rectangle','ellipse','polygon'. For ProjMode='projection', 'interp', 'filter', it behaves like open lines (not all options implemented yet**). For ProjMode='inside' or 'outside', the pdf of each field variable, restricted to the inside or the outside respectively, is calculated. |
480 | | |
481 | | * ''' {Projection on planes:} ''' Data in the range of action (RangeZ on each side of the plane) are projected normally to the plane, and its position expressed with respect to the coordinate system attached to the plane. This coordinate system is defined by an origin, the plane position XObject,YObject, ZObject, the ranges [RangeX(1) RangeX(2)] and [RangeY(1) RangeY(2)] for X and Y, and the Euler angles Phi, Theta, Psi. |
482 | | * ProjMode='projection': in the case of unstructured coordinates, all field variables are projected onto the plane. For structured coordinates with meshes DX,DY (DZ), data are interpolated on the line with a mesh =min(DX,DY,DZ). |
483 | | * ProjMode='interp_lin': non-false data are linearly interpolated on the grid defined by the plane coordinate system and and meshes DX, DY. Data which are 'discrete','warnflag' or 'errorflag' (as defined by the attribute 'Role') are not projected. |
484 | | * ProjMode='interp_tps': same as interp_lin but with thin plate shell interpolation. |
485 | | |
486 | | * ''' {Projection on volumes:**} ''' This is used to delimitate a volume for 3D representation |
| 479 | * ''' Projection on closed lines: ''' , This includes 'rectangle','ellipse','polygon'. For ProjMode='projection', 'interp', 'filter', it behaves like open lines (not all options implemented yet**). For ProjMode='inside' or 'outside', the pdf of each field variable, restricted to the inside or the outside respectively, is calculated. |
| 480 | |
| 481 | * ''' Projection on planes: ''' Data in the range of action (RangeZ on each side of the plane) are projected normally to the plane, and its position expressed with respect to the coordinate system attached to the plane. This coordinate system is defined by an origin, the plane position XObject,YObject, ZObject, the ranges [RangeX(1) RangeX(2)] and [RangeY(1) RangeY(2)] for X and Y, and the Euler angles Phi, Theta, Psi. |
| 482 | * !ProjMode='projection': in the case of unstructured coordinates, all field variables are projected onto the plane. For structured coordinates with meshes DX,DY (DZ), data are interpolated on the line with a mesh =min(DX,DY,DZ). |
| 483 | * !ProjMode='interp_lin': non-false data are linearly interpolated on the grid defined by the plane coordinate system and and meshes DX, DY. Data which are 'discrete','warnflag' or 'errorflag' (as defined by the attribute 'Role') are not projected. |
| 484 | * !ProjMode='interp_tps': same as interp_lin but with thin plate shell interpolation. |
| 485 | |
| 486 | * ''' Projection on volumes:** ''' This is used to delimitate a volume for 3D representation |
491 | | -* 'points' are represented by dots surrounded by a dashed circle showing the range of projection. -* 'line' , 'polyline' are plotted as lines, surrounded by two dashed lines showing the range of projection, when applicable (i.e. not in the case ProjMode='interp'). -* 'polygon', 'rectangle', 'ellipse' are drawn. In the case ProjMode ='inside' or 'outside' the corresponding area is painted in magenta (or blue when they are not selected). -* 'plane' are shown by their axis. These axis are limited to their range of selection (RangeX and RangeY) when applicable. Otherwise they end at the edge of the figure with an arrow. ** -* 'volume' are shown like 'plane', except that they are painted in magenta (or blue) ** |
| 491 | * 'points' are represented by dots surrounded by a dashed circle showing the range of projection. |
| 492 | * 'line' , 'polyline' are plotted as lines, surrounded by two dashed lines showing the range of projection, when applicable (i.e. not in the case !ProjMode='interp'). |
| 493 | * 'polygon', 'rectangle', 'ellipse' are drawn. In the case ProjMode ='inside' or 'outside' the corresponding area is painted in magenta (or blue when they are not selected). |
| 494 | * 'plane' are shown by their axis. These axis are limited to their range of selection (RangeX and RangeY) when applicable. Otherwise they end at the edge of the figure with an arrow. ** |
| 495 | * 'volume' are shown like 'plane', except that they are painted in magenta (or blue) ** |
847 | | === 12-3 3D3C PIV ** === This is performed by the GUI '''civ_3D.fig'''. The program requires input volume images .vol. These are images in the png format, where npz slices are concatenated along the y direction, forming a composite image of dimension (npy x npz, npx) from the images (npy x npx). These volume images can be created by the function {ima2vol.m} in {/series}. |
848 | | |
849 | | ---- |
850 | | [editxml<-] |
851 | | |
852 | | == 13 Editing xml files with the GUI editxml.fig == |
| 852 | === 12-3 3D3C PIV ** === |
| 853 | This is performed by the GUI '''civ_3D.fig'''. The program requires input volume images .vol. These are images in the png format, where npz slices are concatenated along the y direction, forming a composite image of dimension (npy x npz, npx) from the images (npy x npx). These volume images can be created by the function {ima2vol.m} in {/series}. |
| 854 | |
| 855 | == 13 Editing xml files with the GUI editxml == |