PDS_VERSION_ID        = PDS3
RECORD_TYPE           = STREAM
OBJECT                = TEXT
  PUBLICATION_DATE      = 2008-02-22
  NOTE                  = "Description of the contents of the SAMPLES dir."
END_OBJECT            = TEXT

END

This file documents the SAMPLES sub-directory of all New Horizons
PEPSSI instrument archives.  

The purpose of the SAMPLES sub-directory is to hold files 
that have, in ASCII form, a subset of the contents of a
sampling of binary data files, specifically FITS Primary 
Data Units (PDUs) and Extension Data Units (EDUs).

The data sampled ensure that one ASCII sample of each available 
unique combination of three-letter prefix, ApID (Application ID), and 
CODMAC level (Raw or Calibrated) is present in all datasets for a given 
instrument.  Data from the Jupiter mission phase were searched first, and 
in the event that a combination of Prefix, ApID and Level were present in 
the Launch mission phase and but not in the Jupiter mission phase, then 
data were included from the Launch mission phase as well.  

As noted below, the user may refer to the PRODUCT_ID and the VOLUME_ID 
in the ASCII sample to locate the binary data file.  

/DOCUMENT/ Top-level Directory containing supplemental documentation
  |         for PEPSSI data.
  |
  +-/SAMPLES/   Sub-directory containing data samples
      |
      +- PEPSSI_SAMPLES.LBL          PDS label for sample files
      |
      +- XXX_0035402758_7B0_E_1_00.ASC    Sample data file for PDU (_00) of
      |                                     Raw (_e_ => _eng_) data file.  
      |
      +- XXX_0035402758_7B0_S_1_02.ASC    Sample data file for 2nd (_02) EDU 
                                            of Calibrated (_s_ => _sci_) 
                                            data file.  

The sample file naming convention is a modified version of the data set
Filename and Product ID convention (see AAREADME.TXT for more details 
of the data set convention).

"XXX" is a three-letter prefix dependent on the instrument and/or 
observation parameters (e.g. filter, if applicable). 

At its core, the sample file name convention is the same as the data set 
convention with the extension number added.  However, in order to stay 
within PDS filename length restrictions, each sample file name has had 
two of its corresponding data file's filename components shortened.

Specifically:

1) Removed 0X prefix before ApID

The application ID (e.g. 0X7B0) component has had the 0X prefix removed.
This prefix indicates that the ApID is hexadecimal and is superfluous
because all ApIDs in the filenames and product IDs are hexadecimal.  


2) Shortened ENG & SCI components.

The _ENG_ & _SCI_ components, which indicate Raw and Calibrated data,
have been shortened to _E_ and _S_, respectively. 


3) Added extension number.

Each sample file corresponds to one data object in a data file.  In FITS
jargon, the data objects are either the Primary Data Unit (PDU) or one of 
the Extension Data Units (EDUs).  Sample files containing ASCII versions 
of a PDU will have a suffix of "_00" before the .ASC final suffix.  Sample
files containing ASCII version of EDUs will have a suffix "_NN" with the 
Extension number, where the Extension number of the first EDU after the 
PDU is EDU 1.  


For example, the files associated with Product ID 

  LOR_0035402758_0X7B0_ENG_1 

will become

  LOR_0035402758_7B0_E_1_NN.ASC

via the following steps:

  LOR_00354002758_0X7B0_ENG_1
  |              | /           1) Remove 0X prefix before ApID 0X07B0
  LOR_00354002758_7B0_ENG_1
  |                   |/       2) Shorten ENG to E
  LOR_00354002758_7B0_E_1
  |                     |\     3) Add extension numbers and .ASC suffix
  |                     | \
  LOR_00354002758_7B0_E_1_NN.ASC

Also, the Product ID, the data set path, and the generic volume ID are
included in the .ASC file as described in the document label.  

If all else fails, the user will be able to search for the data product
by inverting the steps above (truncate before _NN.ASC; expand _E_ or _S_
to _ENG_ or _SCI_, respectively; insert 0X before ApID characters i.e. 
after the second underscore) to reconstruct the Product ID, and use that 
Product ID to look up the data file in the index table.  

