home *** CD-ROM | disk | FTP | other *** search
/ Space Science Sampler 2 / NASASpaceScienceSamplerV2.cdr / labels.txt < prev    next >
Text File  |  1987-04-12  |  13KB  |  317 lines

  1. BRIEF SUMMARY OF PDS LABELS AND DATA FORMAT DESCRIPTIONS
  2.  
  3. This  document briefly describes the characteristics of  the  PDS 
  4. labels which document the files included on this disk.
  5.  
  6. PDS Label Components.
  7. ---------------------
  8.  
  9. The  PDS  labels  for data files on this disk  can  be  logically 
  10. grouped into several categories:
  11.  
  12. SFDU Registration Group.
  13. ------------------------
  14.  
  15. Registers  the  file as conforming to PDS data definition  rules. 
  16. All  PDS  labelled  files on this disk  use  the  following  SFDU 
  17. registration label:
  18.  
  19. NJPL1I00PDSnnnnnnnn     = PDS_SFDU_LABEL
  20.  
  21. NJPL is the JPL control authority.
  22.  
  23. 1 version id, indicates that the sfdu length is represented as an 
  24.   ASCII string.
  25.  
  26. I class id,  indicates that this is an information or data object 
  27.   class of SFDU.
  28.  
  29. 00 are reserved characters filled with ascii zeros.
  30.  
  31. PDS0  is  the data definition record identifier,  identifies  the 
  32.       SFDU  format as being a STANDARD PDS  LABELLED  file,  with 
  33.       embedded format specification statements.
  34.  
  35. nnnnnnnn  is the length of the file minus 20 bytes, (which is the 
  36.           length  of  the  sfdu  label  itself).   The  length is 
  37.           expressed in ASCII numerals,  if this value is  unknown 
  38.           use 00000000.
  39.  
  40. File Identification Group.
  41. --------------------------
  42.  
  43. This group of information identifies the source,  type and format 
  44. of  a particular data file.  Special file types which  have  been 
  45. defined  for PDS are described in the PDS File Formats section of 
  46. this  document.  Examples of some potential  file  identification 
  47. labels are as follows:
  48.  
  49. FILE_TYPE        = TEXT, TABLE, BINARY_TABLE, IMAGE, CUBE, QUBE.
  50. RECORD_TYPE      = FIXED_LENGTH, VARIABLE_LENGTH, STREAM.
  51. HARDWARE_TYPE    = VAX, PDP, UNIVAC, IBM_370, IBMPC
  52. OPERATING_SYSTEM = VMS, MS_DOS, UNIX, OS/MVS
  53. FILE_ENCODING    = NONE, HUFFMAN, KERMIT, RUN_LENGTH 
  54.  
  55. Record Identification Group.
  56. ----------------------------
  57.  
  58. The  record  identification group describes the contents  of  the 
  59. logical records in the data file. The major descriptive terms for 
  60. all   files  are  RECORD_TYPE,   RECORD_BYTES  and  FILE_RECORDS. 
  61. Descriptions  for individual logical records within a  data  file 
  62. vary  depending on file type.  Record format information shall be 
  63. expressed  in the simplest terms for common data  formats  (text, 
  64. tables,  images),  but  shall  also  provide  the  capability  to 
  65. describe  of define complex record formats using either FORTRAN77 
  66. format statements or a simple record format table compatible with 
  67. PDS data dictionary standards.
  68.  
  69. File Description Group.
  70. -----------------------
  71.  
  72. This  section  describes  the keywords used for the  majority  of 
  73. files on this disk, the text, table and image file types.
  74.  
  75. Text file type (extension ".TXT").
  76. ----------------------------------
  77. The  default  text file consists of ASCII text in  STREAM  format 
  78. with  each  line separated by a carriage return/line  feed  pair. 
  79. Lines  should  be 71 characters or less,  and there should be  no 
  80. embedded control characters other than the form feed  (control-L) 
  81. and tab characters (Control-I). 
  82.  
  83.  
  84. Table file type (extension ".TAB")
  85. ----------------------------------
  86.  
  87. The  default  PDS  table file type is  a  uniform  collection  of 
  88. records containing ASCII values. The values may contain any legal 
  89. value  field  as  specified  in  the  label  formats  descriptive 
  90. material.  Value  fields are delimited with space,  comma or  tab 
  91. characters, or for fixed-length tables, are specifically defined.
  92.  
  93. The  default  record  type  for a table  is  STREAM  format  with 
  94. carriage   return/line   feed  pairs  delimiting   each   record. 
  95. Fixed_length record_types are also allowed. 
  96.  
  97. Parameters used to define table contents are as follows:
  98.  
  99. TABLE_RECORDS The number of physical records. Usually the same as 
  100. table_rows.
  101.  
  102. TABLE_ROWS The number of logical table entries. 
  103.  
  104. ROW_COLUMNS The number of items of information in each table row.
  105.  
  106. COLUMN_NAME  The name of each data item or column in a table row. 
  107. This  field  is normally represented as a parenthesized  list  of 
  108. names (eg "COLUMN_NAME = (TIME,LATITUDE,LONGITUDE,VALUE)").
  109.  
  110. COLUMN_TYPE  The  data type of  the  data  item,  INTEGER,  REAL, 
  111. DOUBLE, LITERAL, TIME, STRING.
  112.  
  113. COLUMN_FORMAT  A  fortran representation of the format  statement 
  114. needed to read or write the data item.
  115.  
  116. COLUMN_START_BYTE  The  byte position (counting from  1)  of  the 
  117. beginning of the data item within the row.
  118.  
  119. COLUMN_BYTES The number of bytes containing the data item.
  120.  
  121. COLUMN_UNITS The units of measure of the data item.
  122.  
  123. COLUMN_NOTE Descriptive notes about the data item.
  124.  
  125.  
  126. Binary_Table file type (extension ".TAB").
  127. ------------------------------------------
  128.  
  129. The   BINARY_TABLE  differs  from  the  TABLE  type  in  that  it 
  130. contains data items stored in binary (or mixed binary and  ASCII) 
  131. format.   The   default   RECORD_TYPE  of  a  binary   table   is 
  132. FIXED_LENGTH.  The  parameters  which define a  BINARY_TABLE  are 
  133. identical to those for the TABLE,  except the default meaning  of 
  134. the  column type refers to a binary storage format.  For example, 
  135. the column type integer in a BINARY_TABLE would indicate a signed
  136. 4 byte (32 bit)  binary  value.  These data types  are  discussed 
  137. later in this document.
  138.  
  139. Image file type (extension ".IMG").
  140. -----------------------------------
  141.  
  142. The  image  file  format is designed for  simple  two-dimensional 
  143. arrays of regular instrument sample values from imaging and other 
  144. instruments (cameras, radar, etc.). For fixed  format image files 
  145. there may be a  label  group,  a  header  group, a history group, 
  146. an  array  group (called  the  image  for this file  type)  and a 
  147. trailer group, each of which will require a separate  definition.  
  148. In  addition,  it is common for  the  data records to have either 
  149. prefix  or suffix  bytes  with  each record of data, representing 
  150. time  tags,  line  numbers or  engineering parameters specific to 
  151. a certain line of data.
  152.  
  153. The  physical and logical structure of any of these files can  be 
  154. defined with the following label parameters:
  155.  
  156. RECORD_BYTES  The record length parameter represents the physical 
  157. length of each record in the file. It also represents the DEFAULT 
  158. logical record length for components of the file. 
  159.  
  160. FILE_RECORDS The file records parameter represents the number  of 
  161. physical records within the file with each record having a length 
  162. equal to the RECORD_BYTES value.
  163.  
  164. Record_bytes  *  file_records should always be equal to the  file 
  165. size.
  166.  
  167. If  defaults  are necessary for  these  parameters,  the  logical 
  168. choice would be 512.
  169.  
  170. These two parameters provide a framework within which the logical 
  171. file  structure is built.  The most common situation is that  the 
  172. record  components have logical length values which are equal  to 
  173. the physical values,  HOWEVER,  the physical length values can be 
  174. overridden  for  any component of an image file by  specifying  a 
  175. "component_RECORD_BYTES" parameter.
  176.  
  177. The data format keywords for the IMAGE file type are:
  178.  
  179. LABEL_RECORDS  Number  of  records containing  PDS  text  labels. 
  180. Generally  the  label  area  will be filled so  that  the  labels 
  181. consume    a   multiple   of   the    RECORD_LENGTH    parameter. 
  182.  
  183. LABEL_RECORD_BYTES  Length of each label record.  This  parameter 
  184. defaults to the RECORD_LENGTH if no value is provided. 
  185.  
  186. HEADER_RECORDS  Number  of records containing non-PDS  labels  or 
  187. binary header records which precede the image data.
  188.  
  189. HEADER_RECORD_BYTES Length of each header record.  This parameter 
  190. defaults to the RECORD_LENGTH if no value is provided.
  191.  
  192. HISTORY_RECORDS Number of records in the history group.
  193.  
  194. IMAGE_RECORDS Number of records containing image data.
  195.  
  196. IMAGE_RECORD_BYTES  Length  of each line record.  This  parameter 
  197. defaults to the RECORD_LENGTH if no value is provided. This value 
  198. must be an integral number of 8-bit bytes.
  199.  
  200. IMAGE_LINES  Number  of  lines  in  image.   Normally  equal   to 
  201. IMAGE_RECORDS value.
  202.  
  203. LINE_PREFIX_BYTES Number of bytes of data which precede the image 
  204. data in each line record. 
  205.  
  206. LINE_SAMPLES  Number  of  sample values contained  in  each  line 
  207. record.
  208.  
  209. SAMPLE_BITS  Number of bits of data comprising one sample  value. 
  210. Common values are 1 (bit),  4 (nibble),  8 (byte), 16 (halfword), 
  211. 32 (fullword).
  212.  
  213. LINE_SUFFIX_BYTES  Number of bytes of data which follow the  last 
  214. sample value in a line record.
  215.  
  216. TRAILER_RECORDS  Number  of records which follow the  last  image 
  217. line record in a file.
  218.  
  219. TRAILER_RECORD_BYTES   Length  of  each  trailer   record.   This 
  220. parameter defaults to the RECORD_LENGTH if no value is provided.
  221.  
  222. DATA TYPE AND FORMAT SPECIFICATIONS
  223. -----------------------------------
  224.  
  225. DATA TYPE SPECIFICATIONS. 
  226.  
  227. The  data type definition segments of the PDS label structure use 
  228. a  simple syntax to define the data types of stored data  values. 
  229. The data format specifications indicate to the parser the type of 
  230. data  in a field,  the starting byte location and the  length  in 
  231. bytes.  An  optional format specification can be given for use in 
  232. displaying data item values. 
  233.  
  234. Data  values  may be represented within data files  in  ASCII  or 
  235. BINARY  format.  The  ASCII  storage format is  much  simpler  to 
  236. transfer  between  different  hardware systems and  even  between 
  237. different languages on the same computer. 
  238.  
  239. On  the  other  hand,  all numerics are  stored  and  manipulated 
  240. internally in binary numeric types;  thus ASCII data values  must 
  241. be converted to internal  formats  before  they can be processed. 
  242. Also, the   ASCII   representation   of   most   numeric   values 
  243. requires  more  storage space than does the  binary  format.  For 
  244. example,  each 8 bit pixel value in an image file would require 3 
  245. bytes  if  stored  in ASCII format (four bytes if it was a signed 
  246. quantity. 
  247.  
  248. The  current  specification uses the same set of data  types  for 
  249. both  ASCII and binary data values.  The basic interpretation  of 
  250. whether  a data value is stored in ASCII or BINARY format  within 
  251. the data record is derived from the file type. For TEXT and TABLE 
  252. files  the default representation is that the data type is stored 
  253. in an ASCII format.  For the BINARY_TABLE,  IMAGE,  CUBE and QUBE 
  254. file  types the default representation is that the data value  is 
  255. stored in binary format. 
  256.  
  257. The following data types can be specified: 
  258.  
  259. INTEGER - A signed integer value [default = 4 bytes]. 
  260. UNSIGNED_INTEGER - An unsigned integer value. 
  261. REAL - A real (floating point) value [default = 4 bytes]. 
  262. BIT - A binary value. Usage not currently defined. 
  263. COMPLEX - A complex value. Usage not currently defined. 
  264. LITERAL - A text string of 30 characters or less. 
  265. CHARACTER (or STRING) - A text string. 
  266. TIME - Time value. Must be stored in
  267. ASCII format. 
  268.  
  269. The  interpretation  of these values is determined by  the  field 
  270. length (bytes) parameter,  thus an integer field specified with a 
  271. field_bytes  value of 2 would be interpreted as a 16  bit  signed 
  272. binary value. The following type specifiers can optionally be
  273. used to define the data type.
  274.  
  275. INTEGER_1 - A signed 1 byte integer value. 
  276. INTEGER_2 - A signed 2 byte integer value. 
  277. INTEGER_4 - A signed 4 byte integer value. 
  278.  
  279. UNSIGNED_INTEGER_1 - An unsigned 1 byte integer value. 
  280. UNSIGNED_INTEGER_2 - An unsigned 2 byte integer value. 
  281. UNSIGNED_INTEGER_4 - An unsigned 4 byte integer value. 
  282.  
  283. DOUBLE (or REAL_8) - An 8 byte double precision floating point value. 
  284. Doubles  should  be used if the precision required for a  numeric 
  285. value exceeds 7 digits. 
  286.  
  287. DOUBLE_G  - A  special  format to handle the  VAX  G-type  double 
  288. precision type. 
  289.  
  290. DATA FORMAT SPECIFICATIONS.
  291.  
  292. This   discussion   is  a  great  simplification  of   the   data 
  293. formatspecification  question.   It  only  addresses  fundamental 
  294. types.  The  data format specification is used to  determine  the 
  295. format  for display of a data value.  A 4 byte binary integer can 
  296. store  values  in the range of  -2,147,483,648  to  2,147,483,647 
  297. however the actual values stored in the field may only range from 
  298. - 9999  to  9999.  In this case is is convenient to  specify  the 
  299. output length with a format statement "I5" where I indicates that 
  300. the  value  is an integer and 5 indicates the number  of  display 
  301. positions (one for the sign and 4 for the numeric value).
  302.  
  303. The following data format specifications will be used where 
  304.  
  305.  
  306. w        = Total number of positions in the output field (including
  307.            sign, decimal point or "E").
  308. d        = Number of positions to the right of the decimal point.
  309. e        = Number of positions in exponent length field.
  310.  
  311. Aw       - Character (alphanumeric) data value.
  312. Iw       - Integer value.
  313. Fw.d     - Floating point value, displayed in decimal format.
  314. Ew.d[Ee] - Floating point value, displayed in exponential
  315.            format.
  316.  
  317.