next up previous
Next: Character Arrays
Up: Examples
Previous: Formatting

Structures

Let us move on to a different example HDS file to demonstrate some of the other parameters of HDSTRACE.

    % hdstrace $ADAM_USER/global valind=18 
  
    GLOBAL  <STRUC>
       LUT            <ADAM_PARNAME>     {structure}
          NAMEPTR        <_CHAR*132>        'xmascomet_lut' 

       IMAGE_OVERLAY  <ADAM_PARNAME>     {structure} 
          NAMEPTR        <_CHAR*132>        'ikonov' 

       GRAPHICS_DEVICE  <ADAM_PARNAME>   {structure}
          NAMEPTR        <_CHAR*132>        'ikon' 

       IMAGE_DISPLAY  <ADAM_PARNAME>     {structure}
          NAMEPTR        <_CHAR*132>        'ikon' 

       DATA_ARRAY     <ADAM_PARNAME>     {structure}
          NAMEPTR        <_CHAR*132>        'cac1d' 

       HDSOBJ         <_CHAR*132>        'AST_ROOT:<DATA.DEMO>PSS_DEMO' 
       SST_SOURCE     <_CHAR*132>        'TRACE.FOR' 
                                                                             
    End of Trace.

This HDS file stores the values of global parameters shared by ADAM applications. LUT, GRAPHICS_DEVICE etc. are structures, and therefore instead of listing values, HDSTRACE writes the comment {structure}. Each of these structures contains one object, NAMEPTR, which is indented in the trace. HDSTRACE inserts a blank line after listing the contents at the end of a structure for clarity.

On VMS the command would be

    $ HDSTRACE ADAM_USER:GLOBAL VALIND=18
Structures can also be arrays, as in the following example of an NDF.

    % hdstrace moimp

    MOIMP  <NDF>
       DATA_ARRAY(512,512)  <_REAL>   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                      ... 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
       TITLE          <_CHAR*16>      'created with pro'
       UNITS          <_CHAR*18>      'NORMALIZED       B'
       AXIS(2)        <AXIS>          {array of structures}

       Contents of AXIS(1)
          DATA_ARRAY(512)  <_REAL>       -3542.08,-3512.186,-3482.291,
                                         ... 11644.38,11674.27,11704.17,11734.06
          LABEL          <_CHAR*18>      'PIXELS           B'

       MORE           <EXT>           {structure}
          FITS(31)       <_CHAR*80>      'SIMPLE  =                    T / St...'
                                         ... 'HISTORY  ESO-DESCRIPTOR...','','END'
                                                                             
    End of Trace.
AXIS is an array of structures. Therefore it has no values and TRACE puts the comment {array of structures}. By default HDSTRACE only lists the contents of the first element of an array of structures. To obtain a full trace of arrays of structures you must set the parameter FULL to be true.

    % hdstrace MOIMP FULL

    MOIMP  <NDF>
       DATA_ARRAY(512,512)  <_REAL>   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                      ... 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
       TITLE          <_CHAR*16>      'created with pro'
       UNITS          <_CHAR*18>      'NORMALIZED       B'
       AXIS(2)        <AXIS>          {array of structures}

       Contents of AXIS(1)
          DATA_ARRAY(512)  <_REAL>       -3542.08,-3512.186,-3482.291,
                                         ... 11644.38,11674.27,11704.17,11734.06
          LABEL          <_CHAR*18>      'PIXELS           B'

       Contents of AXIS(2)
          DATA_ARRAY(512)  <_REAL>       11734.1,11704.21,11674.31,11644.42,
                                         ... -3482.252,-3512.146,-3542.041
          LABEL          <_CHAR*18>      'PIXELS           B'

       MORE           <EXT>           {structure}
          FITS(31)       <_CHAR*80>      'SIMPLE  =                    T / St...'
                                         ... 'HISTORY  ESO-DESCRIPTOR...','','END'

    End of Trace.


next up previous
Next: Character Arrays
Up: Examples
Previous: Formatting

HDSTRACE --- Listing HDS Data Files
Starlink User Note 102
Malcolm J. Currie
1993 November 5
E-mail:ussc@star.rl.ac.uk

Copyright © 2009 Science and Technology Facilities Council