Extended IDL Help

  • Return to IDL Topics

    Last modified: Tue Aug 7 08:53:44 2007.


    List of Routines


    Routine Descriptions

    CLOSEPFF

    [Next Routine] [List of Routines]
       Close a pff file. If the current file is closed, the current file pointer
       will be set to the next file opened or to the previous file if it is the
       last file.
       format:   CLOSEPFF, [, fileid]
       where:
          fileid    - file id of the file to be closed
                      If it is omitted, the current file is closed.
                      If it is zero or 'all', then all files will be closed.
       Example:
          Close the current file.
             closepff
    
          Close the file with a file id of 3
             closepff, 3
    
          Close all files
             closepff, 0
         closepff, 'all'
    

    (See ../pfidl/pff/closepff.pro)


    COMP_GEO

    [Previous Routine] [Next Routine] [List of Routines]
     NAME:
           COMP_GEO
    
     PURPOSE:
           Compare geometry files.
    
     CALLING SEQUENCE:
           Format:
    
           COMP_GEO, PFF1, PFF2 [, UNIT = unit] [, ERROR = error] [, FULL = full]
    
    
     INPUTS:
           PFF1    File ID for first PFF file
           PFF2    File ID for second PFF file
       Note: Routine assumes first dataset is the bounding box, second is the grid
             and third to end are the conductors to be compared.
       Note: If the number of blocks and grid values do not match then the 
             comparison is terminated.
    
     KEYWORD PARAMETERS:
           UNIT    UNIT number if output is to a file.
           ERROR   This can be a scalar or a vector.  If a vector, the first value
                   will be used for grids and the second for conductors.
                   GRIDS:
                   If set, two grid values will be equal if they differ by less 
                     than RELERROR * grid spacing
                     where REKERROR = error/100 (ie error is taken as a percent)
                   CONDUCTORS:
                   If set, two conductor values will be equal if they differ by
                     less than RELERROR /(2^17)*(max(x)-min(x)) 
                     where x represents xi, xj, and xk for each dataset.
           FULL    All differences will be printed.  ERROR will be used to
                     determine if a difference exists.
    
     OUTPUTS:
           Output file differences between two geometry files.
    
     EXAMPLE:
    
           Compare files with file id's 1 and 3 and write output to unit.
              openw, unit, /get, 'difference.dat'
              comp_geo, 1, 3, unit = unit
              free_lun, unit
    
     MODIFICATION HISTORY:
     	Written by:     Paul Mix, June 6, 1997
    

    (See ../pfidl/pff/comp_geo.pro)


    COPYPFF

    [Previous Routine] [Next Routine] [List of Routines]
     NAME:
           COPYPFF
    
     PURPOSE:
           Copy PFF datasets from one file to the end of another 
           This routine uses a PFF utility and is much faster than using read
           and write in PFIDL. 
    
     CATEGORY:
           PFF Utility
    
     CALLING SEQUENCE:
    
           COPYPFF, FID_1, FID_2 [, START] [, STOP] [, SKIP]
      or
           COPYPFF, FID_1, FID_2 , DATASET
    
     INPUTS:
           FID_1:  File ID of the file to copy FROM, 0 (zero) indicates current FID
           FID_2:  File ID of the file to copy TO, 0 (zero) indicates current FID
               NOTE: FID_1 must not equal FID_2
               NOTE: File ID's are shown with the command PFF_INFO and SHOWPFF
           START:  First dataset number to copy
                   If START is a string, then get_dir will be used to obtain
                      DATASET.  STOP and SKIP are ignored.
                   If START is missing then all datasets will be copied.
                   If START is (< 1 or undefinded) then START = 1
                   If START > NDSPFF(FID_1) then no datasets copied.
           NOTE: If START is an array, see DATASET below.  
                 STOP and SKIP are ignored. 
           STOP:   Last dataset number to copy
                   IF STOP is undefined, then STOP = START and only 1 dataset 
                     is copied.
                   If STOP < START then STOP = NDSPFF(FID_1)
           SKIP:   Skip factor 
           DATASET: An array of valid datasets will be copied from FID_1 to FID_2.
                   Values of DATASET (< 1 or > NDSPFF(FID_1)) are ignored.
    
     KEYWORD PARAMETERS:
           DELETE: Dataset number or array of dataset numbers to not copy
           SORT:   Dataset comments are sorted and datasets transferred in the
                   sorted order.  Equal values will stay in the original order.
                   The standard PFF dataset directory comment is used.  This 
                     comment string is limited to 64 characters in the present 
                     PFF version.
                   If is a scalar and SORT > 1 then sort on STRMID(comment, SORT-1)
                   If SORT has more than one elements then sort on the string
                       STRMID(comment, (SORT[0]-1)>0, SORT[1])
                   that is, SORT[0] is the first character to use 
                      and    SORT[1] is the length of the string to use
                   If SORT[1] le 0 then it is ignored and all remaining 
                      characters are used.  
    
     OUTPUTS:
           Copies the datasets to the indicated file.
    
     EXAMPLE:
           Copy file id 1 to file id 2
           COPYPFF, 1, 2
    
           Copy dataset 5 from file id 1 to file id 2
           COPYPFF, 1, 2, 5
    
           Copy from file id 1 to file id 2 datasets from 5 to the end of file
           COPYPFF, 1, 2, 5, 0
    
           Copy file 1 to file 2 datasets 6 and every 10th dataset
           COPYPFF, 1, 2, 6, 0, 10
    
           Copy file id 3 to file id 2 and delete every 11th dataset starting 
             with dataset 6
           COPYPFF, 3, 2, delete= 6+lindgen(ndspff(3)/11)*11
    
           Copy file id 3 to file id 4 all the datasets with beginning with "xrd"
           COPYPFF, 3, 4, '^xrd'
    
           Copy file id 3 to file id 4 with the comments sorted.
           COPYPFF, 3, 4, /sort
    
           Copy file id 3 to file id 4 with the comments sorted using first 5
             characters.
           COPYPFF, 3, 4, sort=[1,5]
    
           Copy file id 3 to file id 4 with the comments sorted beginning with 
             the 11th character in the dataset comment string.
           COPYPFF, 3, 4, sort = 11
    
     MODIFICATION HISTORY:
           Written by:     Paul Mix, 1/31/01
    

    (See ../pfidl/pff/copypff.pro)


    CREATEPFF

    [Previous Routine] [Next Routine] [List of Routines]
     Create a PFF file for output. Current file pointer is set to this file.
       format:  CREATEPFF  [, filename]  [, fileid ] [, FILEID = fid]
                           [, /STRICT]  [, /DELETE] [, ERROR = error]
       where:
          filename - name of the file to be created
                     Default value is 'PFFdefault.pff'
                     If the file exists, it will be expanded to a unique name
                        unless STRICT is set.
          STRICT   - If set and the file exists, CREATEPFF will terminate.
                     Default: STRICT=0; Filename will be expanded to a unique name.
          DELETE   - If set and filename exists, the old file will be deleted.
                     Caution:  You will not be asked if you are sure!
          fileid   - user specified file id 
          fid      - Alternate user specified file id. If fileid is present
                    then fid is ignored.
          error    - Returns the error flag
    
          NOTE:    If fileid (or fid) is specified, it will be used as the file id.
                   If fileid is not provided or is zero, a value will be 
                     provided; default value is the first unused integer >/= 1.
                     If fileid is provided but has been used for another 
                     file, the program will inquire if the user wishes to 
                     close the old file, to specify a new file id, or to accept 
                     the default.
    
      Examples:
         Create a PFF file, "test" with a default file id
           createpff, 'test'
         Creates a PFF file, "TEST.DAT" with a file id of 66
           createpff, `test.dat', 66
         Create a PFF file, "PFFdefault.pff" with a default file id
           createpff
    

    (See ../pfidl/pff/createpff.pro)


    DIR

    [Previous Routine] [Next Routine] [List of Routines]
    
         this routine prints a directory of pff files
    
         DIR [, P1] [, P2] [, P3] [, Page = Page] [, NDSET = ndset]
             [, TRUNCATE = truncate] [, /sortit]
             [, Reset = reset] [, Xsize = xsize]
         where p1, p2, p3 are identical to dirpff
               page is the number of lines on the directory
                    default is directorypage
               reset if present and not zero, resets the directory
                    use this if the window has been closed
                 also: if the window is still open and you wish to leave it
                    open, use /reset to put the current command in a second
                    window.
               ndset is the number of datasets returned
              NOTE: By using the reset qualifier, a window can be
                    opened for each file with the filename at the top.
               xsize is the width of the window in pixels (generally not set)
               truncate - if set, the dataset comments will be truncated at ' - '
                          This is a toggle; If not specified the last value will
                          be used.  Default value =0 -- no truncate
               sortit - If set, display the directory with comments sorted.
                        IF SORTIT is a string, then sorting will begin following 
                        the string.
    
         READ funtion:
              The DIR widget can be used to read files.
              Datasets may be highlighted using the left mouse button. 
              Shift-Left mouse button will select a range of datasets.
              Control-Left mouse button will toggle individual datasets.
              If a carriage return is entered in the window or if one of the 
              above selections is performed with a double-click, PFIDL will read
              selected datasets.  
              All seleced datasets should be either structures or waveforms.
             
         Example:
             Get a directory of the current pff file and the number of datasets.
               dir, ndset = ndset
             Get a directory of the current file and the pff file with id = 3
               with an additional window for this widget
               (to see two different files simultaneously)
               dir & dir, 3, /reset
    
    

    (See ../pfidl/pff/dir.pro)


    DIRP

    [Previous Routine] [Next Routine] [List of Routines]
    
         this routine prints a directory of pff file to a file or allows 
         the user to look at one "page" of directory information at a tiem
         
    
         DIRP  [, INIT] [, FILEID = FILEID] [, PAGE= PAGE] [,/HELP]
              [, LUOUT = luout]
            where init - initial dataset number
                       - default is current dataset
                  page - number of datasets per page
                  fileid - file id of the file
                  help - puts a widget on the screen to guide the user in looking
                         at pages of data on the screen 
                         HELP is ignored if LUOUT is specified
                  luout - writes the directory to a file 
                          LUOUT must be a string and is the name of 
                          the file to which the directory is printed.
    

    (See ../pfidl/pff/dirp.pro)


    DIRPFF

    [Previous Routine] [Next Routine] [List of Routines]
    
         this routine prints a directory of pff files
         two forms are possible:
         DIRPFF  [, fileid ]  [, low] [, high ] 
                 [, LUOUT = luout] [, FILENAME = filename] [, WIDTH = width]
                 [, NUMBER = ndset] [, POINT = point]
         DIRPFF  [, fileid ] , string  [, LUOUT = luout]
                 [, LUOUT = luout] [, FILENAME = filename] [, WIDTH = width]
                 [, NUMBER = ndset] [, POINT = point]
    
          where: 
            fileid   - file id of the file
            low      - first dataset number
                       If LOW is negative, a listing of +/- LOW around current
                       dataset pointer will be returned.
            high     - last dataset number
            string   - search string for the dataset comments
            point    - dataset pointer
            luout    - name of a file if the directory is to a file
            filename - name of the file
            width    - desired width of the output
                       default is 80 if luout is not specified
                       default is 76 if luout is not specified
                             because of a feature in IDL.
                       default is 98 if luout is specified
            number   - number of datasets in the directory
    
         Example:
              Get a directory around current dataset of 5 datasets
                DIRPFF, -5
              Get a directory of datasets 95 to 100
                DIRPFF, 95, 100
              Get a listing of all datasets with 'MOCAM2?'
                DIRPFF, 'MOCAM2?'
    
    

    (See ../pfidl/pff/dirpff.pro)


    DIR_PFF

    [Previous Routine] [Next Routine] [List of Routines]
    
         This routine prints a directory of pff files to a directory widget
    
         DIR_PFF [, P1] [, P2] [, P3] [, Page = Page] [, NDSET = ndset]
             [, TRUNCATE = truncate] [, /sortit] [, LINE = line]
             [, Reset = reset] [, Xsize = xsize] [, FILENAME = filename]
         where p1, p2, p3 are identical to dirpff
               page is the number of lines on the directory
                    default is directorypage
               reset if present and not zero, resets the directory
                    use this if the window has been closed
                 also: if the window is still open and you wish to leave it
                    open, use /reset to put the current command in a second
                    window.
               ndset is the number of datasets returned
              NOTE: By using the reset qualifier, a window can be
                    opened for each file with the filename at the top.
               xsize is the width of the window in pixels (generally not set)
               truncate - if set, the dataset comments will be truncated at ' - '
                          This is a toggle; If not specified the last value will
                          be used.  Default value =0 -- no truncate
               sortit - If set, display the directory with comments sorted.
                        IF SORTIT is a string, then sorting will begin following 
                        the string.
               LINE - Data sent to the directory widget
               FILENAME - Name of the file.
    
         READ funtion:
              The DIR widget can be used to read files.
              Datasets may be highlighted using the left mouse button. 
              Shift-Left mouse button will select a range of datasets.
              Control-Left mouse button will toggle individual datasets.
              If a carriage return is entered in the window or if one of the 
              above selections is performed with a double-click, PFIDL will read
              selected datasets.  
              All seleced datasets should be either structures or waveforms.
             
         Example:
             Get a directory of the current pff file and the number of datasets.
               dir, ndset = ndset
             Get a directory of the current file and the pff file with id = 3
               with an additional window for this widget
               (to see two different files simultaneously)
               dir & dir, 3, /reset
    
    

    (See ../pfidl/pff/dir_pff.pro)


    ENDPFF

    [Previous Routine] [Next Routine] [List of Routines]
    
         this routine ends the pff procedures and closes files 
         this procedure or CLOSEPFF should be used when writing to files 
         to insure that the files are properly closed
    

    (See ../pfidl/pff/endpff.pro)


    GET_DIR

    [Previous Routine] [Next Routine] [List of Routines]
      this routine returns up to four arrays of dataset numbers, dataset types,
      dataset comments, and the entire dataset line.  The size of these arrays 
      is returned in number.
    
       Format: get_dir [,p1] [, p2] [, p3] [, dataset=dataset]
               [,type=type] [,comment=comment] [, number= ndset] [, POINT= point]
               [, line = line] [, filename = filename] [, /no_trim] [, /SortIT]
       where:
              p1, p2, p2 have the same possibilities as dirpff
              That is:
                [, FILEID] [, LOW] [, HIGH]
            or  [, FILEID] ,STRING
                where:
                    fileid   - file id of the file
                    low      - first dataset number
                               If low lt 0 then make a directory +/- low around
                                 current dataset
                    high     - last dataset number
                    string   - search string for the dataset comments
    
              dataset - integer array of dataset numbers
              type    - string array of dataset type
              comment - string array of dataset comments
              number  - number of elements in the above arrays
              point   - dataset pointer
              line    - string array of the entire dataset directory line
              filename - name of the pff file
              NO_trim - If set, leave comment as read
              SortIT  - If set sort directory by dataset comments
                        Dataset pointer refers to the dataset number.
                        IF SORTIT is a string, then sorting will begin following 
                        the string.
         Example:
              Get a directory around current dataset of 5 datasets
                GET_DIR, -5, line = line
              Get a directory of datasets 95 to 100
                GET_DIR, 95, 100, line = line
              Get a listing of all datasets with 'MOCAM2?'
                GET_DIR, 'MOCAM2?', line = line
    

    (See ../pfidl/pff/get_dir.pro)


    NDSPFF

    [Previous Routine] [Next Routine] [List of Routines]
         This routine returns the maximum number of datasets in a pff file.
         Note: Dir will also return this information with the ndset keyword
    
         format: ndset = ndspff([ fileid ])
     
         where
             ndset   - Number of datasets in pff file = fileid
             fileid  - file id of the PFF file containing the data
                       If fileid is undefined or zero, the number of datasets in 
                         the current file is returned
     
    
         Example
           store in n, the number of datasets in the current pff file
              n = ndspff()
    

    (See ../pfidl/pff/ndspff.pro)


    OPENPFF

    [Previous Routine] [Next Routine] [List of Routines]
      Open a PFF file.  The current file pointer is set to this file id and 
      the dataset pointer for this file is set to 1.
      format: OPENPFF [, File] [, Fileid ] [, Error = error] [, NDSET =ndset]
                      [, PATH = path] [, FILTER = filter] [, HELP = help]
                      [, FILENAME = filename] [, FILEID = fileid]
      where:
        File   - name of the PFF file to be opened.  The default file extension
                 is ".PFF".  Both upper and lower case versions of the file name
                 will be tried.
                 If file is omitted or undefined or is not a string,
                 PICKFILE will be used to select a file.
                 The initial path in PICKFILE is the current directory or
                 the PATH to the last file selected.
                 NOTE: PATH and FILTER may be used to set the initial path and
                       filter for PICKFILE.
                 NOTE: FULFNAM procedure is used to handle environment variables
                       See FULFNAM for details
        Fileid - user specified file id 
                 (If fileid is specified, it will be used as the file id.  If 
                 fileid is not provided or is zero, a value will be 
                 provided; default value is the first unused integer greater
                 than 0.  If fileid is provided but has been used for another 
                 file, the program will inquire if the user wishes to 
                 close the old file, to specify a new fid, or to accept 
                 the default.  If positional parameter is valid, keyword will 
                 be ignored.
        Error  - Error parameter
                 If this error is zero, no error encountered.
                 If no file specified for open then error = -13
                 If Error = -99, file not found
                 If Error = n > -99, error is a pff library error code defined
                   by the particular routine where the error occurred.
                   For example, file has no PFF header.
        help   - Print a help text
        PATH   - Path to the current file 
                 Default is the current directory in the first call to OPENPFF but
                 the default path is changed to the final path selected is 
                 retained as the default in the next call to openpff.
        FILTER - File filter - The default may be set in USERQSINIT; if undefined
                 the default is '*'.  The default filter is set only with
                  USERQSINIT or SETDEFAULT.
        NDSET  - Number of datasets
        FILENAME - Name of the file opened.
                   Filename is also available with:
                   get_dir, 0, 1, filename= filename
    
      Examples:
        Open a PFF file with the default file id
          openpff
        Open a PFF file, 'users/test', with the default file id
          openpff, '/users/test'
        Open a file to be selected from a menu with a file id of 14
          openpff, ' ', 14
        Open 'test' or 'test.pff' with a file id of 14
          openpff, 'test', 14
        Determine keywords and parameters for openpff
          openpff, /h
    

    (See ../pfidl/pff/openpff.pro)


    OPENZZ

    [Previous Routine] [Next Routine] [List of Routines]
     Name: OPENZZ
     
     Description:
           Open a Z shot file or a Z scratch file
           NOTE:  This only works on machines that mount the Z data.
           The following files can be opened
             Default: "/pff_data/pbfa2z/pbfa2z_"+shot_number+".pff"
             Scratch: "/pff_data/scratch/z"+shot_number+"*.pff"
    
     Format: OPENZZ [, SHOT] [, /SCRATCH] [, IERROR = IERROR] [, FILEID = fileid]
        where:
           SHOT    - Z shot number
                     If missing or zero, then Dialog_Pickfile will be called
           SCRATCH - If set, open a STYGAR scratch file.
           IERROR  - Error parameter
                     If no file specified for open then error = -13
                     If Error = -99, file not found
                     If Error = n > -99, error is a pff library error code defined
                       by the particular routine where the error occurred.
                       For example, file has no PFF header.
           FILEID  - File ID for file.  Passed to OPENPFF
     Example:
        Open shot 848
            OPENZZ, 848
    
        Open a Z shot from a list
            OPENZZ
    
     MODIFICATION HISTORY:
        Modified Greg Dunham "openzz" by:       Paul Mix, May 8, 2002 
    

    (See ../pfidl/pff/openzz.pro)


    PFF_DIAG

    [Previous Routine] [Next Routine] [List of Routines]
         This routine sets pff diagnostic options
    
         format: pff_diag [, FILE] [, DEBUB = debug] [, VERBOSE = verbose]
                         [, INQUIRE = inquire] [, /HELPME] [, /QUIET]
     
         where
           FILE    - Used only if debug is set.
                     If debug is a string, FILE is ignored.
           DEBUG   - If set, DEBUG diagnostics are toggled
                     File must be provided unless debug is a string
           VERBOSE - If set, VERBOSE diagnostics are toggled
           INQUIRE - Returns a two element vector with the value of 0 or 1 depending
                     on whether verbose and debug are set.
                     INQUIRE(0) = 0 if VERBOSE is not set
                                = 1 if VERBOSE is set
                     INQUIRE(1) = 0 if DEBUG is not set
                                = 1 if DEBUG is set
           HELPME  - If set, returns the command format
           QUIET   - If set, no output to the terminal unless errors are present.
    
         Example
           Determine the status of PFF diagnostics
              pff_diag
       or     pff_diag, inquire = inquire
    
           Toggle VERBOSE diagnostics 
              pff_diag, /verbose
    
           Toggle DEBUG diagnostics with output to go to '/tmp/debug.out'
           Return the status of the diagnostics in stat
              pff_diag, '/tmp/debug.out', /debug, inquire = stat
       or     pff_diag, debug = '/tmp/debug.out', inquire = stat
     
           Turn off debug diagnostic.
           (Note: If debug is off, a message will be printed but debug will remain
                  off since no file is provided.)
              pff_diag, /debug
    
     MODIFICATION HISTORY:
           Written by:     LPMix, October 27, 1998
    
    

    (See ../pfidl/pff/pff_diag.pro)


    PFF_INFO

    [Previous Routine] [Next Routine] [List of Routines]
         This routine gets pff file information 
    
         format: pff_info [, FID] [, fname = fname] [, ndset = ndset]
                         [, dpoint = dpoint] [, current = current] 
                         [, nfile = nfile]  [,fid = fid] [, quiet = quiet]
     
         where
           FID     - file id of pff file for which information is desired
                     If FID is undefined or zero, data for all file is returned.
                     NOTE: Only the positional parameter, FID, will be used to 
                           specify pff files. (see second example)
                     FID (positional parameter) is not modified.
           fname   - array of file names (maximum of 160 characters
           fid     - keyword used to return an array of file ids.
           ndset   - Number of datasets in each file
           dpoint  - Dataset pointer location
           current - integer array = 0 for all files except CURRENT file = 1 
                     or if an error Current = -1 if error on the PFF_INFO
           For example: current = [0, 0,-1, 1] indicates:
                                  First two files had good data but are not current
                                  Third file had a problem with PFF_INFO
                                  Fourth file is current file
           Nfile   - Integer, number of open files
           quiet   - If present and not zero, then no data will be printed
    
    
         Example
           Determine the number of open files and other pff parameters
              pff_info
    
           Get arrays of the fids and the file names for all open files in 
              arrays fid and name, but print nothing to the screen.
              (Since the positional parameter is undefined, all file information
               is returned.)
                pff_info, fid = fid, fname = fname, /quiet
    

    (See ../pfidl/pff/pff_info.pro)


    PFF_PRECISION

    [Previous Routine] [Next Routine] [List of Routines]
     NAME:
           PFF_PRECISION
    
     PURPOSE:
           Set the floating point precision of one or more PFF files
           or
           Set the floating point precision of all new files opened
    
      Note: This procedure has no effect on reading PFF data.  Date is read at 
            the precision at which it was written.
      Note: Precision may be set on a dataset by dataset basis.
      Note: READHDR will indicate the precision which floating point numbers have
            been written.
    
     CALLING SEQUENCE:
           PFF_PRECISION  [, FILE_ID] [, /FULL_PRECISION] [, /HELPME]
                          [, /NEW_FILES] [, /ALL_FILES] [, /SHOW_PRECISION]
                          [, PRECISION = precision] [, /QUIET]
    
     WHERE:
           FILE_ID        - PFF File_ID   If fileid  is missing or 0, the current
                            PFF file is used the unless NEW_FILES or ALL_FILES
                            is set.
           HELP_ME        - Print a quick description of the command.  
                            No other action is taken.
         If SHOW_PRECISION is zero or missing then:
           FULL_PRECISION - If set, indicated file(s) will write 32-bit IEEE 
                            floating point numbers.
                            If omitted or zero, floating point numbers are 
                            linearly mapped to 2 byte integers.
           NEW_FILES      - If set, and FILE_ID is missing or zero, a PFF global
                            default will be set which controls the floating 
                            precision for subsequently opened files.  The 
                            precision of files already open is unchanged.
           ALL_FILES      - If set, and FILE_ID is missing or zero, a PFF global
                            default will be set which controls the floating 
                            precision for all files, including those already open
                            and those which are yet to be opened.
           PRECISION      - A two dimensional array [2, *] where
                            PRECISION[0, *] = file ID (File ID = 0 indicates the 
                                              PFF global default value)
                            PRECISION[1, *] = Previous Precision Flag Value.
                                              Valid values are:
                                              0 - Default scaled 2 byte array
                                              1 - 32-bit IEEE arrays
         If SHOW_PRECISION is set then:
           NEW_FILES      - If set, and FILE_ID is missing or zero, the PFF global
                            default precision flag will be returned which controls
                            the floating precision for subsequently opened files.
           ALL_FILES      - If set, and FILE_ID is missing or zero, the value of
                            the global default precision flag and the precision
                            flag for each of the open files is returned.
           PRECISION      - A two dimensional array [2, *] where
                            PRECISION[0, *] = file ID (File ID = 0 indicates the 
                                              PFF global default value)
                            PRECISION[1, *] = Current Precision Flag.
                                              Valid values are:
                                              0 - Default scaled 2 byte array
                                              1 - 32-bit IEEE arrays
           QUIET          - If set, no output to the terminal.  All data is
                            returned in the PRECISION variable.
    
     EXAMPLE:
           Set the precision to full precision for all pff files.
             PFF_PRECISION, /full_precision, /all_files
           Set the precision to full precision for file with fileid =8
             PFF_PRECISION, 8, /full_precision
           Set the current file to full precision
             PFF_PRECISION, /full_precision
           Return the current file to default precision
             PFF_PRECISION
          or PFF_PRECISION, 0, full_precision=0
     MODIFICATION HISTORY:
           Written by:     L. P. Mix, November 29, 2000
    

    (See ../pfidl/pff/pff_precision.pro)


    RE

    [Previous Routine] [Next Routine] [List of Routines]
      Reads a PFF dataset into a WDF array.  Procedure options are explained
      below.
    
      Format:  RE, wda  [, dataset] [, NARRAY = narray] [, ALL = all] 
                 [, BLOCK = block] [, FILEID = fileid] [XYDATA = xydata]
                 [, /SORTIT] [, /PMES]
      where:
        wda -     WDF array number or an array of numbers
        dataset - indicates a PFF dataset number, an array of dataset numbers,
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: A '*' value of dataset will return all datasets.
            See: GET_DSET for more details
        alldata - nonzero value indicates all datasets with the search 
                  string are to be read into WDF arrays.  If all is 
                  missing or zero, only the elements of wda will be filled.
        fileid -  file id of the PFF file containing the data
        xydata -  Must be set to zero to store nonuniform data as uniform
                  All uniform datasets will be stored as WDF arrays. 
                  If data is not read from UF1 or UF3 dataset, 
                  then data will be stored as XY data unless xydata = 0.
        narray -  number of datasets read into WDF arrays
        block -   block of data in the dataset - Currently ignored
                  default is 1 
        sortit -  If SORTIT is set then dataset comments will be sorted.
        pmes   -  If set, points larger than 5e29 are deleted and the data is 
                  stored as XY data.  This is only checked for UF1 and the
                  first vector in NGD data.
    
     the parameters wda and dataset can take the following combination of values
     to produce the correspondint actions:
      wda          dataset         action
     array(N)  zero or missing   Read current dataset and (N-1) successive
                                 datasets into the array(N) WDF arrays.
     integer      array(M)       Read array(M) datasets and store in WDF array
                                 integer and the following (M-1) WDF arrays.
     array(N)     array(M)       M must equal N; read the array(M) datasets
                                 and store in the array(N) WDF arrays.
     integer      string         Read dataset with string into WDF array, integer.
                 (all = 0)       If more than one array with string, look for
                                 string followed by spaces at the beginning of
                                 the dataset comment.
                (all not zero)   Read all datasets with string into WDF array,
                                 integer and successive WDF arrays.
     array(N)     string         Read all datasets with string into WDF arrays,
                                 array(N).  Number of array elements must equal
                                 number of datasets with string in the dataset
                                 comment.If string occurs in only 1 dataset,
                                 then read that dataset and the next (N-1) 
                                 datasets into WDF arrays, array(N).
      Examples:
        Read dataset 34 into array 1 from file with file id of 4.
          re, 1, 34, fil = 4
        Read into WDF array 2,..., 10, datasets 34,..., 42 from the current file
          re, indgen(9)+2, 34
      or: re, 2, indgen(9)+34
        Read into WDF arrays beginning with 2 all datasets beginning with "mspin" 
        in the current file and indicate the number of arrays in the variable,
        nread. 
          re, 2,  '^mspin' , n=nread, /all 
        Read into WDF arrays [2, 5, 8, 11] the datasets [3, 4, 1, 2] from file
        with id of 2
          re, [2,5,8,11], [3,4,1,2], file= 2
        Read into WDF arrays [2,5,8, 11] the datasets having the string "vtot".
        Note:  vtot must occur in either 1 array or 4 arrays.
          re,[2,5,8,11], 'vtot'
    

    (See ../pfidl/pff/re.pro)


    READCON

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a CONDUCTOR dataset into an IDL structure.
      Procedure options are explained below. PFF dataset type must be VTX
    
      Format:  READCON, structure  [, dataset] [, number]
                 [, FILEID = fileid] [, CLABEL = clabel]
                 [, SOLID_MODEL = solid_model] [, VERT_ADD = vert_add]
      where:
        structure - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.  If dataset is an array then all datasets 
                  will be read into the same structure.
        number  - If present, then a total of number datasets will be read and 
                  stored in the structure
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        clabel -  If CLABEL has a length gt 0, it will be used as the COMMENT label
                  Note: CLABEL = ' ' will result in a blank value for clabel
                        CLABEL = '' will result in the default value
        solid_model - If set store the planes for the geometry with the 
                  connectivity information
                  The following structure labels are added when SOLID_MODEL is set
                  space : polygon coordinates 
                          Each conductor is a series of planar polygons.
                          In QS each polygon is a rectangle
                  Connectivity : Connectivity description required to make an 
                          IDLgrPolygon object
                  loc_con : Pointer array to the beginning and end of the polygons
                          which are normal to no axis, and those normal to the 
                          X, Y and Z axis.
        Vert_add - Additional vertices to add to the model
                   Current version requires 4 points (rectangular planes)
    
      Structure Labels
        type  - 4
        ndim  - number of spatial dimensions = 3
        block - number of blocks = 1
        size  - number of planes according to the following
                size (0) = number not normal to any axis
                size (1) = number normal to x
                size (2) = number normal to y
                size (3) = number normal to z
                size (4) = Total number of planes
        plane(2,3,size(4))
               - array of the min and max in each dimension 
        n0, n1, n2, n3 array of indices with planes normal to no axis, x, y,or z axis
        slant(3,2,size(0)) - opposite corners of a slant surface 
                             if vect(0:3) are read, slant = [vect(0), vect(2)]
        slnorm(3, size(0)) - unit slant normal from point slant(*, 0, i)
                             unit cross product of vector(0, 1) X vector(0, 3)
                             where vector(0, 1) = vect(1)-vect(0) and 
                                   vector(0, 3) = vect(3)-vect(0)
        xlab(3)- spatial labels
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
    
      Examples:
        Read dataset 3 in file id 4 into structure c1
          readcon, c1, 3, fil=4
        Read next dataset of the current file into structure anode
          readcon, anode
        read datasets 3, 4, 5 into structure c2
          readcon, c2, 3, 3 
     (or) readcon, c2, [3,4,5]
    

    (See ../pfidl/pff/readcon.pro)


    READFLD

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below. PFF dataset type must be 
      7 N-Dimensional Vector on M-spatial dimensions or 3-Dimensional 
      vector or scalar data.
      Note - TWO QUICK data is stored as 3D data
      Format:  READFLD, structure  [, dataset] [, FILEID = fileid]
               [, Finite_Element= finite_element] [, RECTILINEAR = rectilinear]
               [, GET_GRID = get_grid] [, STRINGLEN = stringlen] [, ERROR = error]
    
      where:
        structure - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently ignored
                    Maximum number of characters in the spatial labels and the
                    field labels. Currently 64 characters.
        finite_element - If set mach2 data will be stored as finite element data.
        get_grid       - If finite element, reads the grid
        rectilinear- Set to 1 if data is rectilinear 
        If old vertex format and range of x, y differ by 200, linear interpolation.
        ERROR    - Error parameter used to determine if Vertex data is rectilinear.
                   Default value = 1.55E-5 of data range. 
    
      Structure Labels
        type  - 1
        ndim  - number of spatial dimensions
        nvect - number of vector dimensions
        block - number of blocks 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        slice - value of the missing dimension, if known. Default is zero.
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        order - (ndim, nblock) Ordering of blocks in each dimension by initial 
                value of the block, in units of block -1
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x1(locx(0, m-1): locx(0, m)-1) )
        locv  - array of the location of the first point for each block
                vector array- locv = locv(block+1)
                (first vector array for block m is v and is defined by
                v = reform (v1(locv(m-1):locv(m)-1),size(*,m-1))
        x1, x2, ...x(ndim) - spatial arrays
        v1, v2, ...v(nvect) - vector arrays
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        v1lab, v2lab, ...v(nvect)lab - vector labels, Vector label in the case of
                      NGD data and block label in the case of vector and 3d data
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Note: If block > 1 spatial and vector arrays are reformed to linear 
            arrays and stored in the respective arrays.
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readfld, ch5, 34, fil=4
        Read next dataset of the current file into structure efldstart
          readfld, efldstart
    

    (See ../pfidl/pff/readfld.pro)


    READGRD

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a GRID dataset into an IDL structure.
      Procedure options are explained below. PFF dataset type must be NG3
      (nonuniform 3-D grid)  (See readNG3 for more details.)
    
      Format:  READGRD, structure  [, dataset] [, FILEID = fileid]
                        [, STRINGLEN = stringlen]
      where:
        structure - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently ignored
                    Maximum number of characters in labels -- currently 64
    
      Structure Labels
        type  - 3
        ndim  - number of spatial dimensions = 3
        block - number of blocks 
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x1(locx(0, m-1): locx(0, m)-1) )
        x1, x2, x3 - spatial arrays
        proc  - Processor number if available on parallel jobs
        x1lab, x2lab, x3lab - spatial labels
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
    
      Examples:
        Read dataset 34 in file id 4 into structure g5
          readgrd, g5, 34, fil=4
        Read next dataset of the current file into structure gstart
          readgrd, gstart
    

    (See ../pfidl/pff/readgrd.pro)


    READHDR

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads the header of a pff dataset and prints the parameters.
      Procedure options are explained below.
    
      Limit to the number of characters is set by work arrays in pff_slgethdr.f
    
      WARNING: Because dataset will be modified, do not use a loop index
                     for dataset.
       
      Format:  READHDR, dataset, ier, fileid = fid, 
                 pfftype = pfftype, aptype= aptype,
                 version = version, dlength = dlength, resint = resint, 
                 tlabel = tlabel, ntype = ntype, extraint = extraint, 
                 clabel = clabel, ncomment = ncomment, namefile = filename,  
                 stringlen= stringlen, nostrip = nostrip, 
                 precision = precision, quiet = quiet
    
      where:
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  Dataset may also be a string or string variable of two or more 
                  characters or a single character.  See GET_DSET for a better
                  description of the string options.
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
         Caution: Because dataset will be modified, do not use a loop index
                     for dataset.
        ier     - Error indicator
    
      Keywords:
        fileid  - File id of the PFF file containing the dataset
                - Default is the current file
        pfftype - PFF dataset type
                1-scalar data on a uniform 3-D grid (UF3),
                2-scalar data on a uniform 1-D grid (similar to WDF data) (UF1),
                3-scalar data on a non-uniform 3-D grid (NF3),
                4-vector data on a non-uniform grid (NV3),
                5-m x n vertex data - m-dimensional vertices with n-attributes 
                    per vertex (VTX),(m, n, nvert)
                6-integer list and a two float lists (IFL) (nfl, nfa, ni),
                7-n-dimensional vectors on a region of m-dimensional space (NGD)
                    (m, n, nvert),
                8-nonuniform 3D grid (NG3).
                9-scalar data on a non-uniform 3-D grid (NI3),
        aptype  - Application dataset type
        version - Dataset version number
        dlength - Dataset length in 16 bit words
        resint  - Number of non-default reserved integers
        tlabel  - Dataset type label - more than 2 spaces will be replaced 
                  by ' - ' unless NOSTRIP is set 
        ntype   - Number of characters in the type label
        clabel  - Dataset comment label - more than 2 spaces will be replaced 
                  by ' - ' unless NOSTRIP is set
        ncomment- Number of characters in the comment label
        namefile- Up to 160 characters describing the file
        iextra  - Array of extra integers describing the size of the dataset
                   For UF3 or NF3 or NI3 or NV3 or NG3 data
                     iextra(0) = number of blocks
                     iextra(1) = number of X-values in data
                     iextra(2) = number of Y-values in data
                     iextra(3) = number of Z-values in data
                     iextra(4) = number of words in field or each vector
                     iextra(5) = number of spare words in each block
                   For UF1 data
                     iextra(0) = number of blocks
                     iextra(1) = number of X-values in first block
                     iextra(2) = number of words read (header and length info)
                     iextra(3) = number of spare words in each block
                   For Vertex data
                     iextra(0) = vertex dimensions
                     iextra(1) = number of attributes
                     iextra(2) = number of vertices
                     iextra(3) = number of spare words in each block
                   For IFL data
                     iextra(0) = Float array flag
                     iextra(1) = Length of Float-List
                     iextra(2) = Length of Integer array
                     iextra(3) = Length of Float array
                   For NGD data
                     iextra(0) = spatial dimensions (m)
                     iextra(1) = number of vector dimensions
                     iextra(2:m+1) = number of grid points for each
                                     dimension is space
                     iextra(m+2) = number of spare words in each block
    
      stringlen - Currently ignored
                  Maximum of 256 characters for type label
                  Maximum of 2048 characters for comment label
                  Maximum of 192 characters for filename
                    ( Values are stored in PFF_STRINGS.COM )
                    ( Parameters are set in PFF_SLGETHDR by Paul Mix (505)845-7493)
    
        nostrip - If set, the clabel and tlabel will be returned as read.
                  Otherwise, multiple spaces will be replaced with ' - '
        precision - PFF dataset precision.  PRECISION Values:
                   0 - Data stored as a 2-byte integer with offset and scale factor
                   1 - Data stored as a 4-byte real
    
        quiet   - If present and not zero, do not print any data
                  This is ignored if the dataset comment or dataset type labels 
                  are larger than the available buffer.
      Examples:
        Read dataset 34 header in file id 4 and store the dataset comment in com
          readhdr, 34, fil=4, c = com
        Read header of the next dataset of the current file
          readhdr
    

    (See ../pfidl/pff/readhdr.pro)


    READIFL

    [Previous Routine] [Next Routine] [List of Routines]
        READIFL
    
      Reads an integer float list into three arrays
      Procedure options are explained below. PFF dataset type must be IFL
    
      Format:  READIFL, iarray, flist, farray [, dataset] [, FILEID = fileid]
                   [, NAMEFILE = file] [, TLABEL= tlab] [, CLABEL= clab]
                   [, APPTYP = apptyp]
         or    READIFL, STR, /STRUCTURE [, dataset] [, FILEID = fileid]
                   [, NAMEFILE = file] [, TLABEL= tlabel] [, CLABEL= clabel]
                   [, APPTYP = apptyp]
      where:
        iarray  - integer array
        flist   - Float List
        farray  - Float array
        str     - Structure of type = 5
        Structure Tags are:
                Type    - 5
                Size    - Array of 3 longs with the size of the integer array,
                          float list and float array respectively.
                iarray  - Integer array
                flist   - Float list
                farray  - Floating array
                tlabel  - Dataset type label
                clabel  - Dataset comment
                file    - File containing the data
                spare   - Application Dataset type
    
        dataset - indicates a PFF dataset number
                  or is a search string for dataset comments.
                  If dataset is missing or zero, then it is set to the
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        TLabel -  Dataset Type Label
        CLabel -  Dataset Comment
        NameFile - File name
        AppTyp -  Appllication Dataset Type
    
    
      Examples:
        Read dataset 34 in file id 4 into structure LISTS
          readifl, LISTS, 34, fil=4, /structure
        Read next dataset of the current file into structure dd
          readifl, dd, /structure
    

    (See ../pfidl/pff/readifl.pro)


    READNF3

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below.
      Current version limited to 20 blocks by the dimensions in pff_slrnf3
      PFF dataset type must be 3: NF3 = Scalar data on a nonuniform grid
    
      Format:  READNF3, STRUCT  [, dataset] [, FILEID = fileid]
                        [, STRINGLEN = stringlen] [, ARRAY = array]
                        [, XARRAY= xarray] [, YARRAY= yarray]
                        [, ZARRAY= zarray] [APPTYP = apptyp]
                        [, LOCX = locx] [, LOCV = locv]
                        [, CLABEL = clabel] [, TLABEL = tlabel]
                        [, XLABEL = xlabel] [, YLABEL = ylabel] 
                        [, ZLABEL = zlabel] [, BLABEL = blabel]
                        [, NAMEFILE = namefile] [, PFFTYP = pfftyp]
                        [, SPARE = spare] [, IGNORE = ignore]
                        [, WDFARRAY = wdfarray]
      where:
        STRUCT  - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        ignore -    If set, read the P2D data as written.
                    This only applies to P2D data when the third spare word
                    has a value of 1, 2, or 3.
                    Data from the poison solver in QS is stored as X-Y data.
                    The data plane may be in any orientation and the third spare
                    word indicates the true normal direction (1=X, 2=Y, and 3=Z)
                    If ignore is set, Z will be the default normal direction.
                    P2D data is also reduced in size to eliminate the ghost
                    or buffer cells.
             NOTE:  To keep all data and exactly as written into the NF3 dataset,
                    set ignore to negative. 
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Maximum of 64 characters each for each block. 
        array     - If array is present and not zero, then STRUCT will be
                    the array corresponding to block = array.
                    If array is less than 1 then array = 1
                    If array is greater than the number of blocks, array = nblock
                    If array is present and zero, it will contain the vector array
        xarray    - Values for the first dimension
        yarray    - Values for the second dimension
        zarray    - Values for the third dimension
        apptyp    - Application dataset type
        SPARE     - Spare (5, nblock) spare array for each block
        WDFARRAY  - If set, return ordinate data in STRUCT and abscissa data 
                    in XARRAY  
                    If Yarray and Zarray have more than 1 element/block, then 
                      print a warning if wdfarray is positive
                    Valid data is only STRUCT, Xarray, Xlabel, Clabel, Tlabel, 
                      Blabel, NameFile, PFFTYP, APPTYP
                    Note: Blabel is the y Axis label
      x,y,z,blabel- Labels for x, y, z and block
    
      Structure Labels
        type  - 1
        ndim  - number of spatial dimensions
        nvect - number of vector dimensions
        block - number of blocks 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        slice - value of the missing dimension, if known. Default is zero.
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        order - (ndim, nblock) Ordering of blocks in each dimension by initial 
                value of the block, in units of block -1
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x1(locx(0, m-1): locx(0, m)-1) )
        locv  - array of the location of the first point for each block
                vector array- locv = locv(block+1)
                (first vector array for block m is v and is defined by
                v = reform (v1(locv(m-1):locv(m)-1),size(*,m-1))
        x1, x2, ...x(ndim) - spatial arrays
        v1, v2, ...v(nvect) - vector arrays
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        v1lab, v2lab, ...v(nvect)lab - vector labels, Vector label in the case of
                      NGD data and block label in the case of vector and 3d data
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Note: If block > 1 spatial and vector arrays are reformed to linear 
            arrays and stored in the respective arrays.
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readnf3, ch5, 34, fil=4
        Read current dataset of the current file into structure efldstart
          readnf3, efldstart
        Read the current dataset into an array image, and put the x and y 
          coordinates into xar and yar.
          readnf3, image, /arr, xar = xar, yar = yar
    

    (See ../pfidl/pff/readnf3.pro)


    READNG3

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below.
      Current version limited to 24 blocks by the dimensions in pff_rw.inc
      PFF dataset type must be 8: NG3 = Nonuniform 3D grid
    
      Format:  READNG3, STRUCT  [, dataset] [, FILEID = fileid]
                       [, STRINGLEN = stringlen]
                       [, XARRAY= xarray] [, YARRAY= yarray]
                       [, ZARRAY= zarray] [APPTYP = apptyp]
                       [, CLABEL = clabel] [, TLABEL = tlabel]
                       [, XLABEL = xlabel] [, YLABEL = ylabel] 
                       [, ZLABEL = zlabel] [, BLABEL = blabel]
                       [, NAMEFILE = namefile] [, PFFTYP = pfftyp]
                       [, LOCX = locx] [, SPARE = spare]
      where:
        STRUCT  - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels. Currently 64
        xarray    - Values for the first dimension
        yarray    - Values for the second dimension
        zarray    - Values for the third dimension
        apptyp    - Application dataset type
        SPARE     - Spare (mspare, nblock) spare array for each block where 
                    mspare is the maximum number of spare words for each block
      x,y,z,blabel- Labels for x, y, z and block
    
      Structure Labels
        type  - 3
        ndim  - number of spatial dimensions
        block - number of blocks 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        slice - value of the missing dimension, if known. Default is zero.
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        order - (ndim, nblock) Ordering of blocks in each dimension by initial 
                value of the block, in units of block -1
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x(locx(0, m-1): locx(0, m)-1) )
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        proc  - Processor number if available.  Default = 0
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Note: If block > 1 spatial and vector arrays are reformed to linear 
            arrays and stored in the respective arrays.
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readng3, ch5, 34, fil=4
        Read current dataset of the current file into structure efldstart
          readng3, efldstart
        Read the current dataset into an array image, and put the x and y 
          coordinates into xar and yar.
          readng3, image, /arr, xar = xar, yar = yar
    

    (See ../pfidl/pff/readng3.pro)


    READNGD

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below.
      PFF dataset type must be 7 NGD = N-Dimensional Vector on 
          M-spatial dimensions 
      Note - TWO QUICK data is stored as 3D data
             The spatial coordinates are assumed to be the two coordinates
                following the normal direction in a right hand sense.
                ie, If ispare(1) = 2 then the coordinates are ZX.
      Note - If ispare(1) is 2 and two dimensions are passed 
              or 
             If ispare(1) is 2 and three dimensions are passed with the second
                being degenerate 
             then the field data will be transposed.
      Format:  READNGD, structure  [, dataset] [, FILEID = fileid]
                       [, WDFARRAY = wdfarray] [, STRINGLEN = stringlen]
                       [, XZDATA = xzdata]
      where:
        structure - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        xzdata - If set, then no transpose will be done for ispare(1) =2
                 Recall from above that the data is assumed to be zx data if
                 the second spare value is 2.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Maximum of 64 bytes for each label.
        wdfarray - If keyword is set (not equal to zero), return a wdf structure.
    
      Structure Labels
        type  - 1
        ndim  - number of spatial dimensions
        nvect - number of vector dimensions
        block - number of blocks 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        slice - value of the missing dimension, if known. Default is zero.
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        order - (ndim, nblock) Ordering of blocks in each dimension by initial 
                value of the block, in units of block -1
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x1(locx(0, m-1): locx(0, m)-1) )
        locv  - array of the location of the first point for each block
                vector array- locv = locv(block+1)
                (first vector array for block m is v and is defined by
                v = reform (v1(locv(m-1):locv(m)-1),size(*,m-1))
        x1, x2, ...x(ndim) - spatial arrays
        v1, v2, ...v(nvect) - vector arrays
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        v1lab, v2lab, ...v(nvect)lab - vector labels, Vector label in the case of
                      NGD data and block label in the case of vector and 3d data
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Note: If block > 1 spatial and vector arrays are reformed to linear 
            arrays and stored in the respective arrays.
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readfld, ch5, 34, fil=4
        Read next dataset of the current file into structure efldstart
          readfld, efldstart
    

    (See ../pfidl/pff/readngd.pro)


    READNI3

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below.
      Current version limited to 20 blocks by the dimensions in pff_slrnf3
      PFF dataset type must be 9: NI3 = Scalar integer data on a nonuniform grid
    
      Format:  READNI3, STRUCT  [, dataset] [, FILEID = fileid]
                        [, STRINGLEN = stringlen] [, ARRAY = array]
                        [, XARRAY= xarray] [, YARRAY= yarray]
                        [, ZARRAY= zarray] [APPTYP = apptyp]
                        [, LOCX = locx] [, LOCV = locv]
                        [, CLABEL = clabel] [, TLABEL = tlabel]
                        [, XLABEL = xlabel] [, YLABEL = ylabel] 
                        [, ZLABEL = zlabel] [, BLABEL = blabel]
                        [, NAMEFILE = namefile] [, PFFTYP = pfftyp]
                        [, SPARE = spare]
      where:
        STRUCT  - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Maximum of 64 characters for each block.
        array     - If array is present and not zero, then STRUCT will be
                    the array corresponding to block = array.
                    If array is less than 1 then array = 1
                    If array is greater than the number of blocks, array = nblock
                    If array is present and zero, it will contain the vector array
        xarray    - Values for the first dimension
        yarray    - Values for the second dimension
        zarray    - Values for the third dimension
        apptyp    - Application dataset type
        SPARE     - Spare (5, nblock) spare array for each block
      x,y,z,blabel- Labels for x, y, z and block
    
      Structure Labels
        type  - 1
        ndim  - number of spatial dimensions
        nvect - number of vector dimensions
        block - number of blocks 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        slice - value of the missing dimension, if known. Default is zero.
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        order - (ndim, nblock) Ordering of blocks in each dimension by initial 
                value of the block, in units of block -1
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x1(locx(0, m-1): locx(0, m)-1) )
        locv  - array of the location of the first point for each block
                vector array- locv = locv(block+1)
                (first vector array for block m is v and is defined by
                v = reform (v1(locv(m-1):locv(m)-1),size(*,m-1))
        x1, x2, ...x(ndim) - spatial arrays
        v1, v2, ...v(nvect) - vector arrays
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        v1lab, v2lab, ...v(nvect)lab - vector labels, Vector label in the case of
                      NGD data and block label in the case of vector and 3d data
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Note: If block > 1 spatial and vector arrays are reformed to linear 
            arrays and stored in the respective arrays.
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readni3, ch5, 34, fil=4
        Read current dataset of the current file into structure efldstart
          readni3, efldstart
        Read the current dataset into an array image, and put the x and y 
          coordinates into xar and yar.
          readni3, image, /arr, xar = xar, yar = yar
    

    (See ../pfidl/pff/readni3.pro)


    READNV3

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below.
      Current version limited to 20 blocks by the dimensions in pff_slrnv3
      PFF dataset type must be 4: NV3 = Vector data on a nonuniform grid
    
      Format:  READNV3, STRUCT  [, dataset] [, FILEID = fileid]
                        [, STRINGLEN = stringlen] [, ARRAY = array]
                        [, XARRAY= xarray] [, YARRAY= yarray]
                        [, ZARRAY= zarray] [APPTYP = apptyp]
                        [, LOCX = locx] [, LOCV = locv]
                        [, CLABEL = clabel] [, TLABEL = tlabel]
                        [, XLABEL = xlabel] [, YLABEL = ylabel] 
                        [, ZLABEL = zlabel] [, BLABEL = blabel]
                        [, NAMEFILE = namefile] [, PFFTYP = pfftyp]
                        [, SPARE = spare]
      where:
        STRUCT  - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Currently 64 for each for each block
        array     - If array is present and not zero, then STRUCT will be
                    the array corresponding to block = array.
                    If array is less than 1 then array = 1
                    If array is greater than the number of blocks, array = nblock
        xarray    - Values for the first dimension
        yarray    - Values for the second dimension
        zarray    - Values for the third dimension
        apptyp    - Application dataset type
        SPARE     - Spare (5, nblock) spare array for each block
      x,y,z,blabel- Labels for x, y, z and block
    
      Structure Labels
        type  - 1
        ndim  - number of spatial dimensions
        nvect - number of vector dimensions
        block - number of blocks 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        slice - value of the missing dimension, if known. Default is zero.
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        order - (ndim, nblock) Ordering of blocks in each dimension by initial 
                value of the block, in units of block -1
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x1(locx(0, m-1): locx(0, m)-1) )
        locv  - array of the location of the first point for each block
                vector array- locv = locv(block+1)
                (first vector array for block m is v and is defined by
                v = reform (v1(locv(m-1):locv(m)-1),size(*,m-1))
        x1, x2, ...x(ndim) - spatial arrays
        v1, v2, ...v(nvect) - vector arrays
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        v1lab, v2lab, ...v(nvect)lab - vector labels, Vector label in the case of
                      NGD data and block label in the case of vector and 3d data
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Note: If block > 1 spatial and vector arrays are reformed to linear 
            arrays and stored in the respective arrays.
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readnv3, ch5, 34, fil=4
        Read current dataset of the current file into structure efldstart
          readnv3, efldstart
        Read the current dataset into an array image, and put the x and y 
          coordinates into xar and yar.
          readnv3, image, /arr, xar = xar, yar = yar
    

    (See ../pfidl/pff/readnv3.pro)


    READPAR

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a particle distribution into an IDL structure.
      Procedure options are explained below. PFF dataset type must be VTX
        Note: Particle types:
        Type 20 - Particle position
        Type 21 - Particle position and charge
        Type 23 - Particle position and momentum
        Type 24 - Particle position, momentum and charge
        Type 25 - Particle position, momentum, charge and an integer attribute
        Type 26 - Particle trajectory data (position, momentum, charge and 
                    particle number) or (position, momentum and particle number)
                    (Particle number is always in attribute 6)
        Type 27 - Particle position, momentum, charge and kill time
        Type 28 - Particle position, momentum, charge, kill time, and an integer
        Type 29 - 1D Dynaid particle data
    
    
      Format:  READPAR, structure  [, dataset] [, FILEID = fileid]
                       [, ELECTRON= ELECTRON] [, PROTON = PROTON] [, NPTOT = nptot]
                       [, ANALYZE_STEP = analyze_step] [, MIN_STEP = min_step]
                       [, W1= WINDOW1] [, W2= WINDOW2] [, W3= WINDOW3]
                       [, W4= WINDOW4] [, W5= WINDOW5] [, W6= WINDOW6]
                       [, CYL2CART = cyl2cart] [, stringlen = stringlen]
                       [, RADIUS = radius]
      where:
        structure - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently ignored
                    Currently 64 characters for each label
        electron  - If set, normalized particle energy is multiplied by the
                    electron rest energy- See note below.
        proton    - If electron is set, this parameter is ignored.
                    If electron is not set, then the normalized energy is multiplied
                    by p*931.49432.  If proton is input as zero, it is changed to 1.
        nptot     - Total number of particles read from the dataset before window.
        analyze_step- If the application dataset type is 26 (tracer particles),
                    then the number of particles versus number of time steps 
                    will be calculated and printed.  The data will be stored 
                    in maxwdfarray.
                    If analyze_step is less than zero, then detailed statistics
                      will be printed.  Otherwise groups will be printed for more 
                      than 5 vertex points.
        min_step  - If the application dataset type is 26 (tracer particles),
                    then only those particles with at least min_step intervals will
                    be saved. If min_step is greater than zero, then analyze
                    statistics will also be printed.
                    Note: MIN_STEP intervals requires MIN_STEP+1 values.
        W1, W2, ...W6  - Each is an array of 3 or more elements.
                     After filtration by minstep the data is further 
                     windowed in real space or attribute space
                     Last two values in the array are the minimum and maximum
                     values of the window parameter; the first value(s) are the
                     spatial or attribute parameters to be used for the window.
            for example to window all spatial components to [0, 1] use 
                     w1 =[1, 2, 3, 0, 1]
            NOTE:  No provisions are made for PFF rounding.
            NOTE:  Energy has not been calculated. Attributes are as stored in file.
       CYL2CART   - If set and EXTRA(0) eq 2 then the x1 and x2 dimensions will
                    be converted to cartesian coordinates using the following:
                      x1' = x1 * cos(x2)
                      x2' = x1 * sin(x2)
       RADIUS     - If set, 
                    Number of dimensions is set to 4 and a 4th coordinate is 
                      x4 = SQRT(x1*x1 + x2*x2)
                      X4Lab = 'Radius'
                Note:  To plot particles as radius vs Z from cartesian data 
                       in dataset ds:
                            readstr, 1, ds, /readius
                            plotstr, 1, 3, 4                   
                       To overlay conductors from structure 11 in the Z-X plane:
                            plotstr, 11, 3, 1, 0, /ignore, /overplot
    
     NOTE: If the number of attributes is three or larger, a fifth attribute 
           will be added called 'KE/rest_mass'.
           Additional attributes will be moved up 1 position.
           In both cases the 5th attribute is given by the following:
              bg2 = (v1^2 +v2^2 +v3^2)/c^2
              v5  = sqrt(bg2 + 1) -1
           where the v's refer to the attributes and c = 299 792 458
           If electron (/e)is present with ANY value 
            then v5 = v5 * 510999.1e-6 and the label is 'Electon KE (MeV)'
           If proton is present and 1 then (note: /p means proton= 1) 
           (proton = 0 is changed to proton = 1)
               v5 = v5 * 938.27231
           or if p is not equal to 1 then v5=v5*p*931.49432
               In both cases the label is 'Ion KE (MeV)'
    
      Structure Labels
        type  - 2
        ndim  - number of spatial dimensions
        natt  - number of attribute dimensions
        block - number of blocks (=1)
        nvert - number of vertices 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        x1, x2, ...x(ndim) - spatial arrays
        v1, v2, ...v(nvect) - attribute arrays
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        v1lab, v2lab, ...v(nvect)lab - vector labels, Vector label in the case of
                      NGD data and block label in the case of vector and 3d data
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readpar, ch5, 34, fil=4
        Read next dataset of the current file into structure partstart
          readpar, partstart
    

    (See ../pfidl/pff/readpar.pro)


    READUF1

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a time history into an IDL structure.
      Procedure options are explained below.
      Current version limited to 512 blocks by the dimensions in pff_slruf1
      PFF dataset type must be 1 UF1 = Scalar data on a 1D uniform grid
    
      Format:  READUF1, STRUCT  [, dataset] [, FILEID = fileid]
                        [, STRINGLEN = stringlen]
                        [, CLABEL = clabel] [, TLABEL = tlabel]
                        [, XLABEL = xlabel] [, YLABEL = ylabel] 
                        [, BLABEL = blabel] 
                        [, APTYPE = aptype] [, ISPARE = ispare]
                        [, WDFarray = wdfarray] [, NAMEFILE = namefile] 
      where:
        STRUCT  - IDL structure name or WDF array (see WDFarray)
                 
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Maximum of 64 characters for each block.
        tlabel  - Dataset type label
        clabel  - Dataset comment label
        xlabel  - Dataset xlabel for each block
        blabel, ylabel - Dataset block label for each block
        aptype  - Application dataset type
        ispare  - spare array
        NAMEFILE - Name of the PFF file
        WDFarray - If keyword is not zero, STRUCT =[X0, DX, Yarray] where
                   X0 is the initial X value, DX is the X spacing and 
                   YARRAY are the ordinate values.
                   Only single block data may be returned as a WDFarray.
                   If WDFARRAY is zero or omitted then the data will be returned
                   as a structure with the following labels:
    
      Structure Labels
                      type    - 6 type for WDF arrays
                      ndim    - 1 dimension
                      block   - 1 Maximum number of blocks
                      range   - 2 element array with the minimum and maximum
                                abscissa values
                      yrange  - 2 element array with the minimum and maximum
                                ordinate values
                      np      - number of points
                                zero indicates no data in this array
                      x0      - Initial point
                      dx      - Spacing for uniform data; -1 for x-y data
                      x       - Abscissa values
                      y       - Ordinate values
                      xlab    - Abscissa label
                      ylab    - Ordinate label
                      locv    - Array of the location of the first point for each
                                block
                      file    - File from which the data originated
                      clab    - Dataset comment label
                      tlab    - Dataset type label
                      ispare  - Spare array for the first block
    
     If multiple blocks exist, then some of these will be arrays
    
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readuf1, ch5, 34, fil=4
        Read current dataset of the current file into structure efldstart
          readuf1, efldstart
        Read the current dataset into a WDFarray image
          readuf1,  image, /wdf
    

    (See ../pfidl/pff/readuf1.pro)


    READUF3

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below.
      Current version limited to 20 blocks by the dimensions in pff_slruf3
      PFF dataset type must be 1 UF3 = Scalar data on a uniform grid
    
      Format:  READUF3, STRUCT  [, dataset] [, FILEID = fileid]
                        [, STRINGLEN = stringlen] [, ARRAY = array]
                        [, XARRAY= xarray] [, YARRAY= yarray]
                        [, ZARRAY= zarray] [APPTYP = apptyp]
                        [, DX = dx] [, DY = dy] [, DZ = dz]
                        [, X0 = x0] [, Y0 = y0] [, Z0 = z0]
                        [, CLABEL = clabel] [, TLABEL = tlabel]
                        [, XLABEL = xlabel] [, YLABEL = ylabel] 
                        [, ZLABEL = zlabel] [, BLABEL = blabel]
                        [, NAMEFILE = namefile] [, PFFTYP = pfftyp]
      where:
        STRUCT  - IDL structure name
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Maximum of 64 for each for each block
        array     - If array is present and not zero, then STRUCT will be
                    the array corresponding to block = array.
                    If array is less than 1 then array = 1
                    If array is greater than the number of blocks, array = nblock
        xarray    - Values for the first dimension
        yarray    - Values for the second dimension
        zarray    - Values for the third dimension
        apptyp    - Application dataset type
      x,y,z,blabel- Labels for x, y, z and block
    
      Structure Labels
        type  - 1
        ndim  - number of spatial dimensions
        nvect - number of vector dimensions
        block - number of blocks 
        two   - two dimensional missing dimension
                this is 0 for 3d data, 1 for yz data, 2 for zx data, 3 for xy data
        slice - value of the missing dimension, if known. Default is zero.
        size  - array of the size of the spatial dimensions
                size = size(ndim, block)
        range - (2, ndim, nblock+1) two dimensional array of the max and min for
                each block.  Block (0) has overall values.
        order - (ndim, nblock) Ordering of blocks in each dimension by initial 
                value of the block, in units of block -1
        locx  - array of the location of the first point for each block
                spatial array- locx = locx(ndim, block+1)
                (first spatial dimension for block m is x and is defined by
                 x = x1(locx(0, m-1): locx(0, m)-1) )
        locv  - array of the location of the first point for each block
                vector array- locv = locv(block+1)
                (first vector array for block m is v and is defined by
                v = reform (v1(locv(m-1):locv(m)-1),size(*,m-1))
        x1, x2, ...x(ndim) - spatial arrays
        dx1, dx2, ...dx(ndim) - spatial delta values
        v1, v2, ...v(nvect) - vector arrays
        x1lab, x2lab, ...x(ndim)lab - spatial labels
        v1lab, v2lab, ...v(nvect)lab - vector labels, Vector label in the case of
                      NGD data and block label in the case of vector and 3d data
        tlab  - type label
        clab  - dataset comment
        file  - file data read from
        spare - integer array (5)
      Note: If block > 1 spatial and vector arrays are reformed to linear 
            arrays and stored in the respective arrays.
      Examples:
        Read dataset 34 in file id 4 into structure ch5
          readuf3, ch5, 34, fil=4
        Read current dataset of the current file into structure efldstart
          readuf3, efldstart
        Read the current dataset into an array image, and put the x and y 
          coordinates into xar and yar.
          readuf3, image, /arr, xar = xar, yar = yar
    

    (See ../pfidl/pff/readuf3.pro)


    READVTX

    [Previous Routine] [Next Routine] [List of Routines]
    
      Reads a field or charge density into an IDL structure.
      Procedure options are explained below.
      Dataset must be type 5, PFFVTX
    
      Format:  READVTX, ATTRIBUTES  [, dataset] [, FILEID = fileid]
                        [, STRINGLEN = stringlen] 
                        [, NDIM = ndim]  [, NATTR = nattr]
                        [, XARRAY= xarray] [, YARRAY= yarray]
                        [, ZARRAY= zarray] [, TARRAY= tarray]
                        [, APTYPE = aptype] [, ALABEL = alabel]
                        [, CLABEL = clabel] [, TLABEL = tlabel]
                        [, XLABEL = xlabel] [, YLABEL = ylabel] 
                        [, ZLABEL = zlabel] [, X4Label = x4label]
                        [, NAMEFILE = namefile] [, PFFTYP = pfftyp]
                        [, SPARE = spare] [, CONDUCTOR = conductor]
      where:
        ATTRIBUTES  - IDL Attribute Array size= (NVERT, NATTR)
        dataset - indicates a PFF dataset number 
                  or is a search string for dataset comments.  
                  If dataset is missing or zero, then it is set to the 
                  current dataset.
            Note: If dataset is a string, a leading `^' indicates that 
                  the string begins at the start of the dataset comment.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Maximum of 64 for each for each block
        Ndim      - Number of spatial values
        NATTR     - Number of attributes for each vertex
        xarray    - Values for the first dimension
        yarray    - Values for the second dimension
        zarray    - Values for the third dimension
        tarray    - Values for the fourth dimension
        aptype    - Application dataset type
        Alabel(*) - Labels the attributes
        Clabel    - Comment Label
        TLABEL    - Type Label
        SPARE     - Spare (5) spare array for each block
        XLabel    - Label for XARRAY
        YLabel    - Label for YARRAY
        ZLabel    - Label for ZARRAY
        X4Label    - Label for Tarray (not TLABEL because of type label)
        NAMEFILE  - Filename
        APTYPE    - Application dataset type
        Conductor - If set, vertex data is returned in ATTRIBUTES 
                    Conductor = conductor(ndim, nvert)
      Examples:
        Read dataset 34 in file id 4 into array ch5, put x and y values
          into xar and yar
          readvtx, ch5, 34, fil=4, xar = xar, yar = yar
    

    (See ../pfidl/pff/readvtx.pro)


    REPAIR_PFF

    [Previous Routine] [Next Routine] [List of Routines]
      NAME: REPAIR_PFF
    
      Repair a PFF DIRECTORIED file that has been improperly closed.
      User must have write permission.
      This routine attempts to rebuild the directory from the header info 
        in each dataset, one dataset at a time.  If it cannot reconstruct
        the entire directory, it truncates the file after the last dataset
        for which a directory entry was successfully loaded.  It then closes
        the file, rewriting the directory if necessary.
    
      Format: 
         REPAIR_PFF [, File] [, Error = error] [, NDSET =ndset] [, /HELP]
    
      where:
        File   - name of the PFF file to be repaired.  The default file extension
                 is ".PFF". 
                 If file is omitted or undefined or is not a string,
                 PICKFILE will be used to select a file.
                 The initial path in PICKFILE is the current directory or
                 the PATH to the last file selected.
                 NOTE: PATH and FILTER may be used to set the initial path and
                       filter for PICKFILE.
                 NOTE: FULFNAM procedure is used to handle environment variables
                       See FULFNAM for details
        NDSET  - Number of datasets successfully recovered from the file
        Error  - Error parameter
                 -3,   Problem calling the repair procedure
                 -2,   File repaired with potential loss of data
                 -1,   File repaired with no loss of data
                  0,   File not in need of repair
                  1,   No Available PFF File ID's
                  2,   No Available Logical Units
                  3,   Error Opening File
                  4,   File opened for read is empty
                  5,   File has no PFF header
        HELP   - If set, print a help text
    
      Examples:
        Repair a PFF file
          REPAIR_PFF
    
        Determine keywords and parameters for REPAIR_PFF
          REPAIR_PFF, /help
    

    (See ../pfidl/pff/repair_pff.pro)


    WRI

    [Previous Routine] [Next Routine] [List of Routines]
      This procedure writes a WDF array to a PFF file.  
      Format: WRI, WD1 [, FILEID = FID] [, CLABEL = CLABEL]  [,  YLABEL = YLABEL]
                 [, XLABEL = XLABEL] [, TLABEL = tlabel] [, AP = apptype]
                 [, FULL_PRECISION = full_precision]
      where:
        wd1 - WDF array number
        fileid - PFF file id.  If fileid  is missing or 0, the current PFF 
                 file is used.
        tlabel - Dataset type label. If not specified, tlabel = 'WDF Time History'
                 Dataset type string limited to 256 characters.
        clabel - dataset comment.  If not specified, the WDF comment is used.
                 Dataset comment string limited to 2048 characters.
        xlabel - dataset x-axis label.  If not specified, the WDF x-axis 
                 label is used.  Label string limited to 64 characters.
        ylabel - dataset block label (y-axis label).  If not specified, 
                 then the y-axis label is used as the block label.
                 Label string limited to 64 characters.
        AP     - application dataset type (User parameter)
            (default is 3 - the Quicksilver dataset type for time history data)
        FULL_PRECISION - If defined, FARRAY will be written with the indicated
                         precision.  If not defined, FARRAY will be written with
                         the default precision.
               FULL_PRECISION =0    Array written as a scaled 2 byte array
               FULL_PRECISION not 0 Array written as a 32-bit IEEE array
    
      Examples:
      Write WDF array 1 to the current PFF file.
        wri, 1
      Write WDF array 3 to the PFF file with a file id of 4.
        wri, 3, f = 4
      Write WDF array 1 to the PFF file with a file id of 1 and use the dataset 
      comments and block labels indicated.
        wri, 1, f= 1,c='Calculated Diode Power, Shot 4443', y='Power-W'
    

    (See ../pfidl/pff/wri.pro)


    WRIIFL

    [Previous Routine] [Next Routine] [List of Routines]
      WRIIFL
      Write an integer float list to a PFF file.
      Format:  WriIFL, iarray [, flist] [, FARRAY] [, TLABEL = tlabel]
               [, CLABEL = clabel] [, AP = apptype] [, FILEID = fileid]
               [, FULL_PRECISION = full_precision] [, IERROR = ierror]
     
      where:
        iarray - integer array to be written  
              or a type 5 or type 101 structure
              or if n_params()eq 1 and iarray is a scalar then 
                 a structure array number.
        flist  - float list to be written
        farray - floating array
        tlabel - Dataset type label - a maximum of 256 characters are written
        clabel - Dataset comment - a maximum of 256 characters are written
                 CLABEL is put after the SHOT, LOS and DATE in a type 101 structure
        ap - application dataset type (User parameter) (default = -3)
                 AP = 101 if type 101 structure is used
        fileid - file id. If it is omitted or zero, the current file is used.  If 
                 present, the current file pointer will be set to this file.
        FULL_PRECISION - If defined, FARRAY will be written with the indicated
                         precision.  If not defined, FARRAY will be written with
                         the default precision.
               FULL_PRECISION =0   : Array written as a scaled 2 byte array
               FULL_PRECISION not 0: Array written as a 32-bit IEEE array
               Type 101 structures are stored at full precision unless 
                 full_precision = 0 is specified
    
        Note:  Text strings are limited to 240 characters for the write command.
        Ierror  - Error flag.  If zero, file successfully written.
    
      Examples:
         Write the integers representing the load and source type, and the 
             float parameters [a, b, c, d, e, f] as an ifl dataset.
         WRIIFL, [loadtyp, sourtyp], [a, b, c, d, e, f] , $
             t= 'Run Parameters', c = 'Float list: t0, z0, Vmax, tmax, alp, c', $
             ap = -3
    
    

    (See ../pfidl/pff/wriifl.pro)


    WRISTR

    [Previous Routine] [Next Routine] [List of Routines]
     WRISTR
     
     CAUTION: This routine has few seat belts or airbags
              It might work but don't be suprised if it doesn't
    
     For ASCII Write of an image see WRIMSD
    
     LIMITATIONS
              ONLY: Grid, Particle, Field and Vector data are supported.
              Current version does not specifically support 3D uniform data. 
                Only single block uniform data (images) will use UF3.
                Multi-block uniform data will be output as (nf3) nonuniform data. 
                Default dataset types for single block data is NGD and UF3
                NGD limited to 6 spatial dimensions and 6 vector dimensions
                        but this is easily changed.
                Multi block is written as NF3 or NV3
                Integer data is written as NI3 unless it is outside the
                  range= [-32768, 32767].  Integer data outside this range is 
                  converted to real (floats) and written as nf3 data.
    
     Format: WRISTR, STR [, FID] [, CLABEL = clabel] [, TLABEL = TLABEL]
                    [, FILEID = FID] [, APTYPE = aptype] [, NF3] [, /NGD]
                    [, FULL_PRECISION = full_precision]
                    [, MASK_BITS = mskbits] [, SHIFT_BITS = shbits]
           where
           STR    - structure array number or a structure
           FID    - file id of pff file.  Default is fid = 0 -- ie the current file
                    Note: if both FID and FILEID are specified, FID is used.
           TLABEL - Type-label for dataset.  Default is TLAB is used
           CLABEL - Comment label for dataset. Default is the comment label:CLAB
           APTYPE - application dataset type :
                    Caution: If a normal type is used, when the data is read the
                    energy calculation might mess things up for particles!
                    Default values are 15 and 27 for fields and particles.
           Only the first 60 characters are used for labels.
           NF3    - If set, the field data will be written as NF3
           NGD    - If set, the field data will be written as NGD.
                    (limited to single block field data)
     FULL_PRECISION - If defined, FARRAY will be written with the indicated
                      precision.  If not defined, FARRAY will be written with
                      the default precision.
               FULL_PRECISION =0    Array written as a scaled 2 byte array
               FULL_PRECISION not 0 Array written as a 32-bit IEEE array
    
      The following only apply only to NI3 data
        MASK_BITS -  # of bits from input word to be written to dataset
        SHIFT_BITS-  # of bits to be shifted in input word before applying
                  - If mskbits is zero, the supplied input array is simply
                    truncated to 16-bits and all integers in the array must be in
                    the range -32768 to 32767.  shbits is ignored.
                  - If mskbits is nonzero, the value written to the file is shifted
                    and masked from the supplied input iarray, i.e.,
                          ival = mod( iarray/(2**shbits),2**mskbits)
                    Note: In this mode, the supplied values in iarray must be
                          non-negative.
    
     Example:
           Write structure 34 to the current file
             wristr, 34
           Write structure F to the file with file id = 3
             wristr, F, fid = 3
      or     wristr, f, 3
    

    (See ../pfidl/pff/wristr.pro)


    WRITEIFL

    [Previous Routine] [Next Routine] [List of Routines]
      WRITEIFL
      Write an integer float list to a PFF file.
      See also WriIFL
      Both version are present for backward compatibility
    
      Format:  WRITEIFL, fileid, iarray , flist [, FARRAY] [, TLABEL = tlabel]
           [, CLABEL = clabel] [, AP = apptype] [, FULL_PRECISION = full_precision]
     
      where:
        fileid - file id. If it is omitted or zero, the current file is used.  If 
                 present, the current file pointer will be set to this file.
        iarray - integer array to be written
        flist  - float list to be written
        farray - floating array
        tlabel - Dataset type label - a maximum of 256 characters are written
        clabel - Dataset comment - a maximum of 256 characters are written
        ap - application dataset type (User parameter) (default = -3)
        FULL_PRECISION - If defined, FARRAY will be written with the indicated
                         precision.  If not defined, FARRAY will be written with
                         the default precision.
               FULL_PRECISION =0    Array written as a scaled 2 byte array
               FULL_PRECISION not 0 Array written as a 32-bit IEEE array
        Note:  Text strings are limited to 256 characters for the write command.
               (Defined in PFF_STRINGS.COM)
      Examples:
         Write the integers representing the load and source type, and the 
             float parameters [a, b, c, d, e, f] as an ifl dataset.
         WRITEIFL, 0, [loadtyp, sourtyp], [a, b, c, d, e, f] , $
             t= 'Run Parameters', c = 'Float list: t0, z0, Vmax, tmax, alp, c', $
             ap = -3
    
    

    (See ../pfidl/pff/writeifl.pro)


    WRITEPFF

    [Previous Routine] [Next Routine] [List of Routines]
      WRITEPFF
      Write an IDL array to a PFF file.  Only 1-D, 2-D, and 3-D data may be
      written in the present verision of the interface.  The variables are
      the same as for the read command.  Nonuniform 1-D data and all 2-D data
      will be written as 3-D data at the present time.  No interactive 
      input is supported.  Datasets are added sequentially to the end of the file.
      Format:  WRITEPFF, fileid, image [, space] [, TLABEL = tlabel]
               [, CLABEL = clabel] [, BLABEL = blabel] [, XLABEL = xlabel]
               [, YLABEL = ylabel] [, ZLABEL = zlabel] [, LABEL = label]
               [, AP = apptype] [, SPARE = ispare]
      where:
        fileid - file id. If it is omitted or zero, the current file is used.  If 
                 present, the current file pointer will be set to this file.
        image, space - arrays containing the dataset information defined 
                       in READPFF for the same variables.
                       If `space' is not provided, a default grid, beginning at 
                       zero (0.0) with a spacing of 1.0 units  is used for each 
                       dimension.
        tlabel - dataset type label - the first 16 characters are stored 
                 in the directory
        clabel - dataset comment - the first 64 characters are stored 
                 in the directory
        blabel - title or label for this block
        xlabel - first dimension label for this block
        ylabel - second dimension label for this block
        zlabel - third dimension label for this block
        label - array of all the above labels in the order given 
                (label(0) = tlabel, label(1) = clabel, etc.)
                If `LABEL' is provided, all other label keywords will be 
                appended to the front of the string in the `LABEL' array.
        ap - application dataset type (User parameter) (default = -3)
        spare - spare integer array for the application (User specified 
                interger iarray(5))
        Note:  Text strings are limited to 240 characters for the write command.
      Examples:
      Write an IDL array, picture, to the end of the current file.  Since no
      spatial array is provided, a default grid, beginning at zero, with an
      increment of 1.0 will be provided for each dimension of `picture'.
        writepff, 0, picture
      Write an IDL  array, imag, with spatial array, grid, to the end of the file 
      having a file id of 23.  Use the strings provided for the various labels.
        writepff, 23, imag, grid, t='k-alpha image', $
             c = `Unfiltered image in quadrant 1',  $
             x= `Distance - Microns', y= `Distance - Microns', b= `Film Density'
      Write the IDL array, image, with spatial array, space, to the end of
      the current file.  Use the character array, lab, for the labels and 
      comments.  The clabel string will be appended to the beginning of the
      contents of lab(1).
        writepff , 0, image, space, l= lab,  $
            c= `Filtered image & subtracted bkgrd of 0.233'
    

    (See ../pfidl/pff/writepff.pro)


    WRIVTX

    [Previous Routine] [List of Routines]
    
      Write a field or charge density into an IDL structure.
      Procedure options are explained below.
      Dataset must be type 5, PFFVTX
    
      Format:  WRIVTX [, ATTRIBUTES] [, FILEID = fileid]
                       [, XARRAY= xarray] [, YARRAY= yarray]
                       [, ZARRAY= zarray] [, TARRAY= tarray]
                       [, APTYPE = aptype] [, ALABEL = alabel]
                       [, CLABEL = clabel] [, TLABEL = tlabel]
                       [, XLABEL = xlabel] [, YLABEL = ylabel] 
                       [, ZLABEL = zlabel] [, X4Label = x4label]
                       [, FULL_PRECISION = full_precision]
                       [, SPARE = spare]
      where:
        ATTRIBUTES  - IDL Attribute Array size= (NVERT, NATTR)
                      If dataset has no attributes, enter nothing or zero.
                      If valid, the first dimension should have the same size
                        as Xarray.
        fileid -  file id of the PFF file containing the data
        stringlen - Currently Ignored
                    Maximum number of characters in the spatial labels and the
                    field labels.  Currently 64 for each for each block
            
       Note: The following 4 spatial arrays must have the same number of elements
                or they will be assumed to not contain valid data. 
             The number of elements in XARRAY is taken as NVERT
             The number of spatial arrays with the number of elements equal 
                to NVERT is taken as NDIM (the number of dimensions).
             
        xarray    - Values for the first dimension 
        yarray    - Values for the second dimension
        zarray    - Values for the third dimension
        tarray    - Values for the fourth dimension
                
        aptype    - Application dataset type
        Alabel(*) - Labels the attributes
                    Must have the same number of elements as the second dimension
                      of ATTRIBUTES.
        Clabel    - Comment Label
        TLABEL    - Type Label
        SPARE     - Spare (5) spare array for each block. Default = -3
        XLabel    - Label for XARRAY
        YLabel    - Label for YARRAY
        ZLabel    - Label for ZARRAY
        X4Label    - Label for Tarray
        FULL_PRECISION - If defined, FARRAY will be written with the indicated
                         precision.  If not defined, FARRAY will be written with
                         the default precision.
               FULL_PRECISION =0    Array written as a scaled 2 byte array
               FULL_PRECISION not 0 Array written as a 32-bit IEEE array
      Examples:
        Write arrays into a vertex dataset
          Wrivtx, 0,xar= x, yar = y, zar = z 
    
        Read a vertex dataset from dataset 10 and write it back out.
       readvtx, a, 10, ndim = ndim, natt= nat, xa= xa,ya= ya, za = za, ta = ta, $ 
       xl = xl, ylab = yl, zlab = zl, x4 = x4, alab = al, clab= clab, tlab=tlab, $
        spare= spare, name = name, aptyp=aptyp
       Do some stuff  - open another file if necessary
       wrivtx, a, xa= xa,ya= ya, za = za, ta = ta, $
       xl = xl, ylab = yl, zlab = zl, x4 = x4, alab = al, clab= clab, tlab=tlab, $
       spare= spare, aptyp=aptyp
    
    

    (See ../pfidl/pff/wrivtx.pro)