Changes between Version 108 and Version 109 of UvmatHelp


Ignore:
Timestamp:
Aug 13, 2014, 7:47:24 PM (10 years ago)
Author:
g7moreau
Comment:

fix NetCDF CIVx notation

Legend:

Unmodified
Added
Removed
Modified
  • UvmatHelp

    v108 v109  
    8989Once a root name has been introduced, navigation among  the file indices is provided by the red push buttons '''[runplus]''' ( '''[+>]''')  and   '''[runmin] ''' ('''[<-]'''). The central push button '''[run0]''' ('''[!0]''') refreshes the current plot. See [#a3.4Navigationamongfieldindices section 3.4] for more details.
    9090
    91 When available, the time of each frame or field is displayed in the edit box '''[!TimeValue]''', at the very right. In the case of image pairs, the time interval Dt is displayed between the edit boxes '''[i1], [j1]''' and '''[i2], [j2]'''. This timing information can be read directly in the input file, in the case of movies or Netcdf files, or can be defined in a XML documentation file, see [#a3.5Imagedocumentationfiles.xml section 3.5] (in case of conflict, the latter prevails).
     91When available, the time of each frame or field is displayed in the edit box '''[!TimeValue]''', at the very right. In the case of image pairs, the time interval Dt is displayed between the edit boxes '''[i1], [j1]''' and '''[i2], [j2]'''. This timing information can be read directly in the input file, in the case of movies or NetCDF files, or can be defined in a XML documentation file, see [#a3.5Imagedocumentationfiles.xml section 3.5] (in case of conflict, the latter prevails).
    9292
    9393'''Note: ''' the five last input file names, as well as other pieces of personal information, are stored for convenience in a file (''uvmat_perso.mat'') automatically created in the user preference directory of Matlab (indicated by the Matlab command '>>prefdir'. Browsers then  read default input in this file. A corruption of this file ''uvmat_perso.mat'' may lead to problems for opening UVMAT, type '>>reinit' on the Matlab prompt to delete it and reinitialise the configuration of UVMAT.
     
    113113uvmat can read any image format recognised by the Matlab image reading function ''imread.m''. Images can be in true color or B&W, with 8 bit or 16 bit grey levels. Image files containing multiple frames are handled. Movie files can be also opened, using the Matlab function ''!VideoReader.m'', or ''mmreader.m'' for older versions of Matlab.
    114114
    115 ''UVMAT'' can also read various kinds of data in the binary format Netcdf, as described in [#a7Netcdffilesandget_field.fig section 7]. Velocity fields obtained by PIV and results of data processing are stored in this format. Derived quantities (vorticity, divergence...) can be directly obtained. The input file type is recognized by the function ''get_file_type.m'' of UVMAT and the file is opened by the function ''read_field.m'' according to this file type. It is possible to include new input file types by a modification of these two functions.
     115''UVMAT'' can also read various kinds of data in the binary format NetCDF, as described in [#a7Netcdffilesandget_field.fig section 7]. Velocity fields obtained by PIV and results of data processing are stored in this format. Derived quantities (vorticity, divergence...) can be directly obtained. The input file type is recognized by the function ''get_file_type.m'' of UVMAT and the file is opened by the function ''read_field.m'' according to this file type. It is possible to include new input file types by a modification of these two functions.
    116116
    117117The PIV software provided in UVMAT can deal with any image or movie format recognised by Matlab, while the older fortran version CIVx requires B&W images in the format png (portable network graphics). It is a binary format for images with lossless (reversible) compression, recommended by w3c (http://www.w3.org/Graphics/PNG). It is an open source patent-free replacement of GIF and can also replace many common uses of TIFF. It can be read directly by all standard programs of image visualisation and processing.  Compressing a raw binary image to its png form typically saves disk storage by a factor of 3.
     
    128128The choice can be imposed by selecting a check box, or can be left automatic. The second iteration (civ2, filter2), presumed to be of higher quality,  is prefered by default. The filter fields are interpolated on a regular grid, with or without smoothing respectively. It allows to fill holes and get spatial derivatives. If a scalar depending on spatial derivatives, like vort, is selected, the field option switches automatically from civ  to filter.
    129129
    130 The choice of fields, velocity, vorticity, divergence... is done by the popup menu '''[Fields]'''. The option 'image' gives access to an image file corresponding to the velocity field. The option 'get_field...' allows the user to display all the variables of the netcdf file in the GUI '''get_field.fig'''. This is the only available option when the input file is not from CIV.
     130The choice of fields, velocity, vorticity, divergence... is done by the popup menu '''[Fields]'''. The option 'image' gives access to an image file corresponding to the velocity field. The option 'get_field...' allows the user to display all the variables of the NetCDF file in the GUI '''get_field.fig'''. This is the only available option when the input file is not from CIV.
    131131
    132132=== 3.3 File naming and indexing ===
     
    20420419 450.000824 30 60 30 1           
    205205}}}
    206  * '''.cmx''' ASCII text files containing the parameters sent by the GUI '''civ.fig''' to the CIV fortran programmes. Each velocity field named *.nc results from a parameter file *.cmx. It can be opened by the browser of '''uvmat.fig'''. In a later version of civx**, the .cmx file is replaced by a .xml ’!CivDoc’ file.
     206 * '''.cmx''' ASCII text files containing the parameters sent by the GUI '''civ.fig''' to the CIV fortran programmes. Each velocity field named *.nc results from a parameter file *.cmx. It can be opened by the browser of '''uvmat.fig'''. In a later version of CIVx**, the .cmx file is replaced by a .xml ’!CivDoc’ file.
    207207
    208208 * '''.log''' ASCII text files, containing information about processing in batch mode. Each velocity field named *.nc is associated with a  file *.log. A file *_patch.log is similarly produced by the ’patch’ program.  These files can be opened by the browser of '''uvmat.fig'''.
     
    302302The following succession of operations is performed by '''uvmat.fig''':
    303303
    304 -'''File identification:''' the nomenclature type and file type (for instance image, movie, or Netcdf file) are identified from the opened file (using the function ''find_file_series.m'').
     304-'''File identification:''' the nomenclature type and file type (for instance image, movie, or NetCDF file) are identified from the opened file (using the function ''find_file_series.m'').
    305305
    306306-'''File Reading:''' the input field is first read from the input file by the Matlab function ''read_field.m''.
     
    350350Data 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''.
    351351
    352 This field has a specific organisation, mirroring the structure of netcdf files (see [#a7-Netcdffilesandget_field 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.
     352This field has a specific organisation, mirroring the structure of NetCDF files (see [#a7-Netcdffilesandget_field 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.
    353353
    354354In summary, the ''field structure'' is specified by the following elements:
     
    516516
    517517----
    518 == 7 - Netcdf files and the GUI get_field ==
     518== 7 - NetCDF files and the GUI get_field ==
    519519=== 7.1 The NetCDF format ===
    520 NetCDF (network Common Data Form) is a machine-independent format for representing scientific data, suitable for large arrays (http://www.unidata.ucar.edu/software/netcdf/). Each piece of data can be directly accessed by its tag name without reading the whole file. New records can be added to the file without perturbing the remaining information. The next release of NetCDF is now connected to the more recent hdf format.
     520NetCDF (Network Common Data Form) is a machine-independent format for representing scientific data, suitable for large arrays (http://www.unidata.ucar.edu/software/netcdf/). Each piece of data can be directly accessed by its tag name without reading the whole file. New records can be added to the file without perturbing the remaining information. The next release of NetCDF is now connected to the more recent HDF format.
    521521
    522522The NetCDF format has been initially developed for meteorological data, but has been progressively chosen by many scientific communities. This format has been for instance proposed by the European network PIVNet (http://www.meol.cnrs.fr/LML/EuroPIV2/Proceedings/p251.pdf ) to inter compare data obtained by various techniques of Particle Imaging Velocimetry.
    523523
    524 Libraries for reading-writing and data visualisation with usual computer languages can be freely downloaded. Recent releases of Matlab contain built in functions for reading and writting netcdf files. For old versions, a free toolbox must be downloaded from from http://sourceforge.net/projects/mexcdf/. UVMAT deals with both cases.
     524Libraries for reading-writing and data visualisation with usual computer languages can be freely downloaded. Recent releases of Matlab contain built in functions for reading and writting NetCDF files. For old versions, a free toolbox must be downloaded from from http://sourceforge.net/projects/mexcdf/. UVMAT deals with both cases.
    525525
    526526The NetCDF data model consists of variables, dimensions, and attributes.
     
    545545<doc62|center>
    546546
    547 When a NetCDF input file opened, its full name, including path, is displayed in the upper window '''[inputfile]'''. The names and value of the global attributes are listed in the left column '''[attributes]''', the list of variables in the central column '''[variables]''', and the list of dimension names and values in the right column '''[dimensions]'''. By selecting one of the variables in the central column, the corresponding variable attributes and dimensions are displayed in the left and right columns respectively. Note that the whole content of the Netcdf file can be obtained by the function ''nc2struct.m''. Input fields can be selected according to three options, chosen by the menu '''[!FieldOption]'''.
     547When a NetCDF input file opened, its full name, including path, is displayed in the upper window '''[inputfile]'''. The names and value of the global attributes are listed in the left column '''[attributes]''', the list of variables in the central column '''[variables]''', and the list of dimension names and values in the right column '''[dimensions]'''. By selecting one of the variables in the central column, the corresponding variable attributes and dimensions are displayed in the left and right columns respectively. Note that the whole content of the NetCDF file can be obtained by the function ''nc2struct.m''. Input fields can be selected according to three options, chosen by the menu '''[!FieldOption]'''.
    548548
    549549-'''1D plot:''' to plot a simple graph, ordinate versus abscissa. Select by the menu '''[ordinate]''' the variable(s) to plot as ordinate (use the key '''Ctrl''' for multiple selection). Then select the corresponding abscissa in the column '''[abscissa]'''.  If the variable is indexed with more than one dimension, each component is plotted versus the first index (like with the plot Matlab function ''plot.m''). If the option '''[matrix index]'''('''[!CheckDimensionX]''') is selected, the ordinate variable is plotted versus its index.
     
    764764 * fix2 and patch2: similar as fix1 and patch1, but applied to the civ2 results.
    765765
    766 This series of operations is chosen by selecting the corresponding  check boxes on the left of the GUI '''civ_series''', which give access to the corresponding parameter input panels. Note that the result of each of these operations is stored in the output netcdf file, so the process can be split in several runs. When an existing netcdf velocity file has been initially opened, the GUI '''civ.fig''' is automaticaly configured to perform the next operation (fix1, patch1, civ2...) needed in the process.
     766This series of operations is chosen by selecting the corresponding  check boxes on the left of the GUI '''civ_series''', which give access to the corresponding parameter input panels. Note that the result of each of these operations is stored in the output NetCDF file, so the process can be split in several runs. When an existing NetCDF velocity file has been initially opened, the GUI '''civ.fig''' is automaticaly configured to perform the next operation (fix1, patch1, civ2...) needed in the process.
    767767
    768768=== 11.2 CIV1: ===
     
    829829
    830830=== 11.7 Description of the velocity files: === #civdata
    831 The velocity fields obtained by PIV, as well as their spatial derivatives, are stored in the machine independent binary format ['netcdf'->#netcdf]. The file contains constants ('global attributes') and fields ('variables') whose values can be directly accessed by their name.
     831The velocity fields obtained by PIV, as well as their spatial derivatives, are stored in the machine independent binary format ['NetCDF'->#netcdf]. The file contains constants ('global attributes') and fields ('variables') whose values can be directly accessed by their name.
    832832
    833833Several fields, corresponding to the successive operations 'civ1', 'fix1', 'patch1', 'civ2', 'fix2', 'patch2' are stored in the same .nc file. When a third or higher order civ iteration is performed, a new .nc file is created, containing the two last iterations as civ1 and civ2.
     
    970970 * 'editxml';...%display and edit XML files using a xls schema
    971971 * 'geometry_calib';...%performs geometric calibration from a set of reference points
    972  * 'get_field';...% choose and plot a field from a Netcdf file
     972 * 'get_field';...% choose and plot a field from a NetCDF file
    973973 * 'msgbox_uvmat';... associated with GUI msgbox_uvmat.fig to display message boxes, for error, warning or input calls
    974974 * 'rotate_points';...%'rotate_points': associated with GUI rotate_points.fig to introduce (2D) rotation parameters
     
    997997 * 'imadoc2struct';...% convert the image documentation file <!ImaDoc> into a Matlab structure
    998998 * 'nomtype2pair';... creates nomenclature for index pairs knowing the image nomenclature, used by series fct
    999  * 'nc2struct';...% transform a netcdf file in a corresponding Matlab structure
     999 * 'nc2struct';...% transform a NetCDF file in a corresponding Matlab structure
    10001000 * 'num2stra';...% transform number to the corresponding character string depending on the nomenclature.
    1001  * 'read_field':...% read the fields from files in different formats (netcdf files, images, video)
     1001 * 'read_field':...% read the fields from files in different formats (NetCDF files, images, video)
    10021002 * 'read_GUI'::...% read a GUI and provide the data as a Matlab structure
    10031003 * 'read_image';... read images or video objects
    10041004 * 'read_multimadoc';... %read a set of Imadoc files and compare their timing of different file series 'read_xls';...%read excel files containing the list of the experiments
    10051005 * 'stra2num';...% transform letters (a, b, A, B,) or numerical strings ('1','2'..) to the corresponding numbers
    1006  * 'struct2nc';...% write fields in netcdf files
     1006 * 'struct2nc';...% write fields in NetCDF files
    10071007 * 'struct2xml';... transform a Matlab structure to a XML tree.
    10081008 * 'xml2struct'...% read an XML file as a Matlab structure, converts numeric character strings into numbers
     
    10371037 * 'phys_XYZ';...% transform coordinates from pixels to phys
    10381038 * 'px_XYZ';...% transform coordiantes from phys to pixels
    1039  * 'read_civxdata';...reads civx data from netcdf files
    1040  * 'read_civdata';... reads new civ data from netcdf files
     1039 * 'read_civxdata';...reads CIVx data from NetCDF files
     1040 * 'read_civdata';... reads new civ data from NetCDF files
    10411041 * 'read_geometry_calib';... read data on the GUI geometry_calib
    10421042 * 'read_imatext';...%read .civ files (obsolete, but can be adapted to other text documentation files)